Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Add support for patchesJson6902 #1037

Closed
tblaisot opened this issue Jul 23, 2019 · 1 comment · Fixed by #1049
Closed

Add support for patchesJson6902 #1037

tblaisot opened this issue Jul 23, 2019 · 1 comment · Fixed by #1049

Comments

@tblaisot
Copy link

Expected behavior

Adding patchesJson6902 field in the main kustomisation.yaml file should work as in kustomize when using ship update

Actual behavior

Ship update delete all added field in kustomization.yaml

Information

  • Ship version: 0.49.0
  • helm: 2.14.1
  • kustomize: 2.0.3
  • terraform: 0.11.14
  • Docker version: 18.09.7
  • Command line run: ship update

Steps to reproduce the behavior

  1. do a ship init git::https://gitlab.com/charts/gitlab/
  2. create any patch
  3. create a file my-patch.json containing:
[{"op":"remove","path":"/metadata/labels/release"}]
  1. edit the root kustomization.yaml to add
patchesJson6902:
  - target:
      kind: Deployment
      namespace: default
      name: gitlab-unicorn
    path: my-patch.json
  1. do a ship update
  2. open root kustomization.yaml => the added code has disappeared

Even if the UI doesn't support such avanced kustomization it will be nice if it doesn't delete all or if there was a way to add patches because kustomize patchesStrategicMerge doesn't allow deletion of resources

@laverya
Copy link
Member

laverya commented Jul 23, 2019

This makes sense, and shouldn't be too much work to persist - though I don't think we'll be adding a UI for json patches soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants