-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Variable substitution only partly working on Jobs #1782
Comments
I have trouble to reproduce your issue. Can you share more info on how setup:
I tested your example, and
|
Hi thanks for the reply. As I mentioned we're using the
Which I believe according to the README.md in this repo is still v.2.0.3. What's the suggested approach, use the standalone kustomize? |
The kubectl version lags significantly - suggest trying the standalone. |
We are using kustomize bundled with kubectl and have some issues with variable replacement.
We have a
Job
andDeployment
both make use ofinitContainers
and in all we'd like to use kustomizevars
that should automatically apply a prefix.When applying kustomize, for the
Deployment
the variables get correctly substituted and prefixed.Deployment definition
Deployment Kustomize substitution
As expected
$(BACKEND_SERVICE_NAME)
gets substituted with:test-backend-service
in both the command and the env var of both container and initContainer 👍The same thing with the
Job
Job definition
Job Kustomize substitution
The same setup for Jobs. First as exptected
$(SERVICE_NAME)
gets substituted withtest-service
but only the variable in thecontainer
section! Everything underinitContainers
remains as is. If I change the type fromJob
toDeployment
the substitution works as expected.Is this a known issue?
My current workaround is to to patch the values with an overlay instead of using the variables.
The text was updated successfully, but these errors were encountered: