8000 Operator helm chart: add option to set operator pod affinity · Issue #55262 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Operator helm chart: add option to set operator pod affinity #55262

Description

@linasdev

Enhancement Description

Add affinity or extraValues to keycloak-operator-helm chart, so that the operator pod itself can have affinities.

Value Proposition

In the keycloak-operator-helm chart, there is currently no way to set the operator's own affinity.

Goals

Add a way of setting the node affinity of the operator pod itself (or passthrough an extraValues field`, so that any value could be set)

Non-Goals

This is about the operator's pod itself, not about keycloak deployments.

Discussion

No response

Notes

Two options I see here, either add an affinity field, or extraValues which would be passed through to the operator's pod spec.

Activity

  1. added
    kind/enhancement
    on Nov 17, 2026
  2. linasdev commented on Nov 17, 2026

    @linasdev
    Author

    If we could bump io.quarkiverse.helm:quarkus-helm to 1.5.0 this would become trivial with quarkus.helm.expressions being able to create missing fields.

  3. added
    area/operator
    status/labeled-by-bot
    on Nov 19, 2026
  4. DrFaust92 commented on Nov 25, 2026

    @DrFaust92

    I'd like to work on this, together with #54334 if that's fine, since both need the same thing: values the generated chart can't express today.

    Update: this works with the quarkus-helm 1.4.1 that Keycloak already gets from the platform BOM, no version bump needed. I prototyped it locally:

    • quarkus.helm.expressions replace an existing path, so resources becomes {{- toYaml .Values.operator.resources | nindent 12 }}. Same defaults, and --set operator.resources.limits.cpu=null now drops the CPU limit (Operator Helm chart: a resource request or limit cannot be removed (e.g. the CPU limit) #54334).
    • For fields the generated Deployment doesn't have, a partial Deployment in operator/src/main/kubernetes/kubernetes.yml adds affinity: {} and nodeSelector: {kubernetes.io/os: linux}. Quarkus merges it, so they also show up in the kubectl manifests, and expressions plus quarkus.helm.values-schema types turn them into operator.affinity / operator.nodeSelector values. operator.tolerations is rendered from the same expression, only when set. (An empty nodeSelector: {} or tolerations: [] placeholder gets dropped by the merge, hence that shape.)
    • helm lint --strict passes; with defaults the Deployment renders the same apart from affinity: {} and the node selector.

    If that direction is OK for you, I'll open a PR for both. quarkus-helm 1.5.0 (quarkiverse/quarkus-helm#549) would allow creating those fields without placeholders, so it could be simplified once the BOM ships it.

  5. added a commit that references this issue on Nov 26, 2026
    e194a58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/operatorkind/enhancementstatus/labeled-by-botstatus/triageteam/cloud-native

    Fields

    Value

    None yet

    Effort

    None yet

    Votes

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0