Skip to content

fix: Allow Helm dynamic overrides#1214

Merged
metacosm merged 3 commits intoquarkiverse:mainfrom
xstefank:helm-overrides
Jan 20, 2026
Merged

fix: Allow Helm dynamic overrides#1214
metacosm merged 3 commits intoquarkiverse:mainfrom
xstefank:helm-overrides

Conversation

@xstefank
Copy link
Member

@xstefank xstefank commented Dec 1, 2025

No description provided.

@xstefank xstefank requested a review from a team as a code owner December 1, 2025 13:04
@xstefank
Copy link
Member Author

xstefank commented Dec 1, 2025

@jcechace can you try this one please?

@xstefank xstefank marked this pull request as draft December 1, 2025 13:46
@xstefank xstefank force-pushed the helm-overrides branch 2 times, most recently from 899853c to e30a4ca Compare December 3, 2025 07:01
@jcechace
Copy link
Contributor

@xstefank will give it a try this weekend. Sorry for the delay, it was a bit busier week than anticipated. I haven't forgotten though!

@@ -1,4 +1,4 @@
{{ if eq $.Values.watchNamespaces "JOSDK_WATCH_CURRENT" }}
{{ if eq $.Values.app.envs.QUARKUS_OPERATOR_SDK_CONTROLLERS_EXPOSEDAPP_NAMESPACES "JOSDK_WATCH_CURRENT" }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xstefank this doesn't look right the envvar is named differently based on the controller name. Here it looks like you are hardcoding EXPOSEDAPP.

Also testing with my example operator, this is exactly the case

in values.yaml I have

app:
  envs:
    QUARKUS_OPERATOR_SDK_CONTROLLERS_WEBSITERECONCILER_NAMESPACES: JOSDK_ALL_NAMESPACES

But then later in websitereconciler-crd-role-binding.yaml

{{ if eq $.Values.app.envs.QUARKUS_OPERATOR_SDK_CONTROLLERS_EXPOSEDAPP_NAMESPACES "JOSDK_WATCH_CURRENT" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding

@jcechace
Copy link
Contributor

jcechace commented Jan 4, 2026

@xstefank looks like we are getting there but one more mistake.

Signed-off-by: xstefank <xstefank122@gmail.com>
Signed-off-by: xstefank <xstefank122@gmail.com>
Signed-off-by: xstefank <xstefank122@gmail.com>
@xstefank xstefank requested a review from jcechace January 6, 2026 11:29
@xstefank xstefank marked this pull request as ready for review January 6, 2026 15:03
@xstefank
Copy link
Member Author

@jcechace please take a look

Copy link
Member

@metacosm metacosm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@metacosm
Copy link
Member

Merging this as this seems like a reasonable fix for now. Please open a new issue if this doesn't address your concerns and we'll issue a further fix later.

@metacosm metacosm merged commit 4cd96ea into quarkiverse:main Jan 20, 2026
15 of 28 checks passed
@jcechace
Copy link
Contributor

Haven't had the chance to deploy but it seem to produce correct template files.

@@ -1,4 +1,4 @@
{{ if eq $.Values.watchNamespaces "JOSDK_WATCH_CURRENT" }}
{{ if eq $.Values.app.envs.QUARKUS_OPERATOR_SDK_CONTROLLERS_{reconciler-name-uppercase}_NAMESPACES "JOSDK_WATCH_CURRENT" }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause issue if the reconciler name has '-' in it

Such as

@ControllerConfiguration(
        name = "artifactory-secretsyncreconciler",
        maxReconciliationInterval = @MaxReconciliationInterval(interval = 5, timeUnit = TimeUnit.MINUTES),
        finalizerName = ArtifactorySecretSync.FINALIZER)

Is invalid Helm template

{{ if eq $.Values.app.envs.QUARKUS_OPERATOR_SDK_CONTROLLERS_ARTIFACTORY-SECRETSYNCRECONCILER_NAMESPACES "JOSDK_WATCH_CURRENT" }}
artifactory-secretsyncreconciler-crd-role-binding.yaml:1): bad character U+002D '-'

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

Successfully merging this pull request may close these issues.

4 participants