gatekeeper
gatekeeper copied to clipboard
Demo constraints all_ns_must_have_gatekeeper.yaml got map not string
What steps did you take and what happened:
I have installed gatekeeper and tried demo but after install: k8srequiredlabels_template.yaml I tried install :
constrain: all_ns_must_have_gatekeeper.yaml but get issue
error: error validating "../constraints/all_ns_must_have_gatekeeper.yaml": error validating data: ValidationError(K8sRequiredLabels.spec.parameters.labels[0]): invalid type for sh.gatekeeper.constraints.v1beta1.K8sRequiredLabels.spec.parameters.labels: got "map", expected "string"; if you choose to ignore these errors, turn validation off with --validate=false
What did you expect to happen: Install constrain without error.
Anything else you would like to add:
Solved.
Change from :
parameters: labels: - key : "gatekeeper"
to
parameters: label: - gatekeeper
Environment: Kubernetes
- Gatekeeper version: 3.7.1
- Kubernetes version: (use
kubectl version
):v1.21.2
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.