kustomize
kustomize copied to clipboard
kustomize edit set image should be idempotent
Version:kustomize/v4.4.1
Is your feature request related to a problem? Please describe.
When running kustomize edit set image
multiple times with the same parameters the result is multiple images blocks.
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- app-deployment.yaml
- app-service.yaml
images:
- name: app:latest
newTag: "123456"
newName: anyregistry/app
images:
- name: app:latest
newTag: "123456"
newName: anyregistry/app
Describe the solution you'd like
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- app-deployment.yaml
- app-service.yaml
images:
- name: app:latest
newTag: "123456"
newName: anyregistry/app
/triage accepted /kind bug
At the very least, the kustomization file should not end up with two different images fields. It should also be possible to deduplicate the images field.
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:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
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:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
@simon-an hi, would you like to provide detail setup on how to reproduce it? I was unable to reproduce in my mac ( I'm running kustomize v5.1.1)