You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
I need to override the NFS server volume to be different in 3 environments: dev, staging and production
I used Kustomize in a standard base vs overlays layout where each of the dev / staging / production directories inherits from base which contains the helm chart and values.yaml and then just overrides specific bits of the generated yaml
This works well for many applications, I've been doing this for years, as you can see here:
Unfortunately the Jenkins JCasC configuration doesn't lend itself to standard Kustomize patching because it's one huge ugly string with embedded literal newlines as described in #1024
This means that it cannot be traversed in Kustomize yaml patch overrides to replace individual JCasC fields
Describe the solution you'd like
I'm not sure if I'm missing something obvious here but I think the problem is that Kustomize cannot traverse a big string field
I'm not sure if this could be rewritten to be actual subfields and recomposed into the yaml file the kiwi sidecar is expecting or if that would require changing or replacing the kiwi sidecar
Tbh I'd like some feedback on this as a more granular alternative to the workaround I've done as shown below:
Describe alternatives you've considered
I've considered just having a separate values.yaml, but this would be duplicating hundreds of lines of values.yaml for the same of 4 lines of NFS config and would be more prone to errors and configuration drift over time, which is why I put it in base and only override a few lines here and there.
I've taken the lesser of two evils and forked the JCasC config to its own configmap patch which is much fewer lines of dupliction between environments
I've ended up wholesale patch replacing the jcasc-default-config.yaml field like this:
Is your feature request related to a problem? Please describe
I need to override the NFS server volume to be different in 3 environments: dev, staging and production
I used Kustomize in a standard base vs overlays layout where each of the dev / staging / production directories inherits from base which contains the helm chart and values.yaml and then just overrides specific bits of the generated yaml
This works well for many applications, I've been doing this for years, as you can see here:
https://github.com/HariSekhon/Kubernetes-configs
Unfortunately the Jenkins JCasC configuration doesn't lend itself to standard Kustomize patching because it's one huge ugly string with embedded literal newlines as described in #1024
This means that it cannot be traversed in Kustomize yaml patch overrides to replace individual JCasC fields
Describe the solution you'd like
I'm not sure if I'm missing something obvious here but I think the problem is that Kustomize cannot traverse a big string field
I'm not sure if this could be rewritten to be actual subfields and recomposed into the yaml file the kiwi sidecar is expecting or if that would require changing or replacing the kiwi sidecar
Tbh I'd like some feedback on this as a more granular alternative to the workaround I've done as shown below:
Describe alternatives you've considered
I've considered just having a separate values.yaml, but this would be duplicating hundreds of lines of values.yaml for the same of 4 lines of NFS config and would be more prone to errors and configuration drift over time, which is why I put it in base and only override a few lines here and there.
I've taken the lesser of two evils and forked the JCasC config to its own configmap patch which is much fewer lines of dupliction between environments
I've ended up wholesale patch replacing the
jcasc-default-config.yaml
field like this:https://github.com/HariSekhon/Kubernetes-configs/blob/master/jenkins/overlay/kustomization.yaml
https://github.com/HariSekhon/Kubernetes-configs/blob/master/jenkins/overlay/jcasc-cm.patch.yaml
Additional context
No response
The text was updated successfully, but these errors were encountered: