Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to specify loadBalancerClass for the exposed services #877

Open
zentavr opened this issue Aug 28, 2024 · 1 comment
Open

Possibility to specify loadBalancerClass for the exposed services #877

zentavr opened this issue Aug 28, 2024 · 1 comment

Comments

@zentavr
Copy link

zentavr commented Aug 28, 2024

Proposal

It would be great to be able to specify '/spec/loadBalancerClass' value when setting up a service exposure.
We have several load balancer and MetallB catch only the configuration which is specified with that field.

Use-Case

No response

Is this a feature you are interested in implementing yourself?

No

Anything else?

no

@zentavr
Copy link
Author

zentavr commented Aug 28, 2024

As a workaround you can install kubemod operator inside your cluster and patch the service on the fly, like:

---
apiVersion: api.kubemod.io/v1beta1
kind: ModRule
metadata:
  name: zabbix-database-pgbouncer-svc-mod
  namespace: zabbix
spec:
  type: Patch

  match:
    # Match Services ...
    - select: '$.kind'
      matchValue: Service
    - select: '$.metadata.name'
      matchValue: zabbix-database-pgbouncer

    # ... created by the percona operator.
    - select: '$.metadata.labels["app.kubernetes.io/component"]'
      matchValue: pgbouncer
    - select: '$.metadata.labels["app.kubernetes.io/instance"]'
      matchValue: zabbix-database
    - select: '$.metadata.labels["app.kubernetes.io/managed-by"]'
      matchValue: percona-postgresql-operator

  patch:
    # Add custom annotation.
    - op: add
      path: /spec/loadBalancerClass
      value: metallb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant