Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CI assertion treats missing and explicitly null cpu fields alike, so it fails to catch the reported invalid-rendering regression.
1 open issue
What changed in this PR
This PR makes the generated Operator Helm chart’s resources and pod scheduling configurable, addressing #54334 and #55262 without upgrading quarkus-helm.
Changes:
- Renders resources as a whole object so individual requests or limits can be removed with
null. - Adds affinity, node selector, and toleration values, with Deployment placeholders needed by quarkus-helm 1.4.1.
- Documents the new values and adds CI checks for resource removal and scheduling overrides.
| File | Description |
|---|---|
operator/src/main/resources/application.properties |
Adds Helm expressions and scheduling value schemas. |
operator/src/main/kubernetes/kubernetes.yml |
Adds affinity and Linux node selector placeholders. |
docs/guides/operator/installation.adoc |
Documents resource removal and scheduling values. |
.github/workflows/operator-ci.yml |
Adds rendering checks for resource and scheduling overrides. |
Review effort: Balanced
The generated chart rendered each resource request and limit individually, so none could be removed, and it had no way to set the operator pod's affinity, node selector or tolerations. - Replace the generated resources block with a toYaml of operator.resources through a quarkus.helm expression. The defaults are unchanged, and a request or limit set to null is dropped. - Add affinity and a kubernetes.io/os node selector to the operator Deployment through src/main/kubernetes/kubernetes.yml, and render them, plus optional tolerations, from operator.affinity, operator.nodeSelector and operator.tolerations. This works with the quarkus-helm version from the platform BOM; empty nodeSelector/tolerations placeholders are dropped by the merge, hence the node selector default. - Document the values and check them in the Helm CI job. Closes keycloak#55262 Closes keycloak#54334 Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
DrFaust92
force-pushed
the
operator-helm-values
branch
from
November 26, 2026 00:02
a144e2e to
e194a58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #55262
Closes #54334
The generated operator Helm chart renders each resource request and limit as its own field, so none can be removed (#54334), and it has no way to set the operator pod's affinity, node selector or tolerations (#55262).
This works with the quarkus-helm version Keycloak already gets from the platform BOM (1.4.1); no version bump is needed:
quarkus.helm.expressionsentry replaces the generatedresourcesblock with{{- toYaml .Values.operator.resources | nindent 12 }}.values.yamlkeeps the same defaults, and a request or limit set tonullis dropped, e.g.--set operator.resources.limits.cpu=null.operator/src/main/kubernetes/kubernetes.ymladdsaffinity: {}andnodeSelector: {kubernetes.io/os: linux}. Quarkus merges it into the generated Deployment (so the kubectl manifests get them too), and expressions plusquarkus.helm.values-schematypes turn them intooperator.affinityandoperator.nodeSelector.operator.tolerationsis rendered from the same expression, only when set. An emptynodeSelector: {}ortolerations: []placeholder is dropped by the merge, hence the node selector default and the tolerations handling.helm template — resources and scheduling valuesstep in the Helm job checks them.quarkus-helm 1.5.0 (quarkiverse/quarkus-helm#549) lets expressions create missing fields, so the placeholders could go once the platform BOM ships it (quarkiverse/quarkus-operator-sdk#1445).
Testing
./mvnw -Poperator -Pcluster-wide -pl :keycloak-operator -am package -DskipTests, thenhelm lint --stricton the generated chart.helm templatewith defaults: same Deployment as the published 26.8.2 chart apart fromaffinity: {}and thekubernetes.io/os: linuxnode selector.operator.resources.limits.cpu=null, a pod anti-affinity, aNoScheduletoleration andoperator.nodeSelector.pool=ops: no CPU limit, the other requests/limits unchanged, and the affinity, toleration and both node selector entries rendered; the output parses as YAML.This PR was prepared with an AI assistant (Claude Code) and reviewed by me.