apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sDepLatestVersion
metadata:
  name: deployment-resources
spec:
  match:
    kinds:
      - apiGroups: ["*"]
        kinds: ["Deployment"]
    namespaces:
      - "opa-test"
  parameters:
    allowedOps: ["CREATE","UPDATE"]
    errMsg: "INVALID_DEPLOYMENT_LATEST_VERSION"
