This might be caused to #483
I have a StatefulSet spec that doesn't use volumeClaimTemplates, but when I kustomize it with common labels, it adds it to the spec, which causes it to fail validation:
My base spec:
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: test
spec:
serviceName: "test"
replicas: 1
selector:
matchLabels:
app: test
template:
metadata:
labels:
app: test
spec:
containers:
- name: nginx
image: nginx
After kustomize:
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: test
spec:
serviceName: "test"
replicas: 1
selector:
matchLabels:
app: test
template:
metadata:
labels:
app: test
spec:
containers:
- name: nginx
image: nginx
volumeClaimTemplates:
metadata:
labels:
app: my-label
Error:
error validating data: ValidationError(StatefulSet.spec.volumeClaimTemplates): invalid type for io.k8s.api.apps.v1.StatefulSetSpec.volumeClaimTemplates: got "map", expected "array"; if you choose to ignore these errors, turn validation off with --validate=false
This might be caused to #483
I have a StatefulSet spec that doesn't use volumeClaimTemplates, but when I kustomize it with common labels, it adds it to the spec, which causes it to fail validation:
My base spec:
After kustomize:
Error: