mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Support for ignoring specific Resources via annotation.
Resources annotated with `config.kubernetes.io/local-config` will be ignored by Kustomize
This commit is contained in:
@@ -105,6 +105,25 @@ metadata:
|
||||
expectedOut: []ifc.Kunstructured{testConfigMap, testConfigMap},
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "localConfigYaml",
|
||||
input: []byte(`
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: winnie-skip
|
||||
annotations:
|
||||
# this annotation causes the Resource to be ignored by kustomize
|
||||
config.kubernetes.io/local-config: ""
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: winnie
|
||||
`),
|
||||
expectedOut: []ifc.Kunstructured{testConfigMap},
|
||||
expectedErr: false,
|
||||
},
|
||||
{
|
||||
name: "garbageInOneOfTwoObjects",
|
||||
input: []byte(`
|
||||
|
||||
Reference in New Issue
Block a user