Open Shalucik opened 2 years ago
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 (https://github.com/kubernetes-sigs/kustomize/issues/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:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
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:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
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:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
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 kustomize replaces config map generator hashes for cronjob, but does not do that for deployment
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
/triage accepted
(org members only)/close
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? If not, is anything planned at all to address this?
I'd like to avoid using vars
which is deprecated but replacements
which was supposed to "replace" it doesn't have nearly the same functionality.
+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:
source: kind: ConfigMap fieldPath: metadata.name name: filebeat-infra-config-generated targets:
select: name: filebeat-infra kind: DaemonSet fieldPaths:
It is still not replacing checksum in daemonset with filebeat-infra-config-generated-hashvalue.
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