Created
December 15, 2022 15:42
-
-
Save iainsproat/6398526fd1a9bf9eece320a6a8a843d5 to your computer and use it in GitHub Desktop.
Kustomize delete a single key from a map. The key includes a backslash / character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
resources: | |
- namespace.yaml | |
patchesJson6902: | |
# deletes a single label from a kubernetes resource. | |
# the label includes a slash '/' character | |
# we replace the '/' character with '~1'. | |
- target: | |
version: v1 | |
kind: Namespace | |
name: my-namespace | |
patch: |- | |
- op: remove | |
path: "/metadata/labels/pod-security.kubernetes.io~1enforce" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment