-
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
Var reference does not work in volumes #1540
Comments
@phillebaba You can solve that the complicated way by changing the variable reference configuration. varReference:
- path: spec/template/spec/volumes[]/nfs
kind: Deployment or you can do it the easy way leveraging this PR. Check how much more simple the configuration is. In any case, I don't think there is a bug in kustomize. |
Yes you are right that this is not a bug. In hindsight I realize that I should have spent more time researching my issues. Your example solved my issue, and I must thank you @jbrette as they were really detailed and easy to understand. I guess the reason I thought this was a bug was because I dont really understand why kustomize does variable replacement in some fields by default and not in others. I will be following your PR as I do agree that it creates a much clean kustomization file. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Var reference does not work when used in volumes.
When kustomizing this manifest with a varible that references a Service ClusterIP the following is outputed.
I would expect the
$(NFS_SERVER)
in the volume to also be replaced with the ClusterIP. I need this as there are currently issues with using the service dns to resolve the ip of a nfs server running in the same cluster.The text was updated successfully, but these errors were encountered: