Skip to content
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

updater removes patch section of patchesJson6902 in existing kustomization.yaml #247

Closed
yosefy opened this issue Aug 26, 2021 · 0 comments · Fixed by #274
Closed

updater removes patch section of patchesJson6902 in existing kustomization.yaml #247

yosefy opened this issue Aug 26, 2021 · 0 comments · Fixed by #274
Labels
bug Something isn't working

Comments

@yosefy
Copy link

yosefy commented Aug 26, 2021

Describe the bug
overwriting parts of kustomization.yaml file wich not supposed to be touched
in our case it is "patch" part of patchesJson6902 being removed

before:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../base

commonLabels:
  env: prod

namespace: XXX

images:
- name: gcr.io/AAA/BBB
  newTag: "0.67"


patchesJson6902:
- target:
    group: apps
    version: v1
    kind: Deployment
    name: utils
  patch: |-
    - op: add
      path: /metadata/annotations/link.argocd.argoproj.io~1external-link
      value: http://my.domain.com:8080/node

after

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../base

commonLabels:
  env: prod

namespace: XXX

images:
- name: gcr.io/AAA/BBB
  newTag: "0.69"


patchesJson6902:
- target:
    group: apps
    version: v1
    kind: Deployment
    name: utils
@yosefy yosefy added the bug Something isn't working label Aug 26, 2021
jannfis pushed a commit that referenced this issue Oct 21, 2021
* fix: use kyaml to preserve kustomization

fixes #250
fixes #268
fixes #247

* chore: linter error

* fix: tests and linting

* go mod tidy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant