-
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
ConfigMap generated hashes don't get replaced when using replacements #4475
Comments
Went to add a test for this, and realized one already exists! There is an older issue that ended up not getting addressed due to lack of bandwidth (#4034). In general, I agree that replacements would ideally keep track of name references. I will see if I have the bandwidth to work on this in the next few weeks. /triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
hi, I was wondering if anyone was working on this issue? |
We had a discussion quite a while ago discussing name references in replacements, and concluded that with the current implementation of name references, doing this in replacements is impractical. I think we need to think more about this, as this ties in with some discussion about rewriting the way we do name references and fieldspecs. Using the name reference transformer directly as suggested here may help. /triage under-consideration |
What's the status? Kustomize v5.0.0 was released in February officially deprecating vars, but replacements still lack this essential functionality. |
facing the same issue |
Currently there are bugs in "replacements" transformer that cannot replace hashed ConfigMap or Secret names. See: kubernetes-sigs/kustomize#4475
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
Is any work being done on this? I'd like to avoid using |
+1 for this. We too experience the same issues, and will prevent us from upgrading kustomize at this point. Is there any accepted/documented work arounds? |
How is this implemented using vars? replacements:
|
Describe the bug
I'm trying to replace vars with replacements.
I have a var that is used to give an Deployments env value the name of a ConfigMap created by a configMapGenerator
When using replacements for this, the env value is replaced without the generated hash suffix
Files that can reproduce the issue
kustomization.yaml
deployment.yaml
Expected output
Actual output
Kustomize version
4.5.2
Platform
Linux
Additional context
The text was updated successfully, but these errors were encountered: