airshipctl/manifests/function/airshipctl-cleanup/patch.yaml
Alexey Odinokov b927934b8c Switching to the approach with cleanup by selector
Previously we needed to delete each catalogue separatelly.
After bumping to new kustoimize 3.9.2 it's started to be
possible to use patching of several documents by selector [1],
that can be kind, name, label &etc

[1]
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/patchMultipleObjects.md
+
https://github.com/kubernetes-sigs/kustomize/issues/2945

Change-Id: Ic6a2d2a4716ab0304872c4aad196a7259e58aa53
2021-04-14 15:44:51 +00:00

40 lines
706 B
YAML

apiVersion: builtin
kind: PatchTransformer
metadata:
name: delete-variable-catalogues
target:
kind: VariableCatalogue
patch: |
apiVersion: not-important
kind: not-important
metadata:
name: not-important
$patch: delete
---
apiVersion: builtin
kind: PatchTransformer
metadata:
name: delete-versions-catalogues
target:
kind: VersionsCatalogue
patch: |
apiVersion: not-important
kind: not-important
metadata:
name: not-important
$patch: delete
---
apiVersion: builtin
kind: PatchTransformer
metadata:
name: delete-network-catalogues
target:
kind: NetworkCatalogue
patch: |
apiVersion: not-important
kind: not-important
metadata:
name: not-important
$patch: delete