apiVersion: kyverno.io/v2beta1
kind: Policy
metadata:
  name: pol-clone-sync-invalid
  namespace: default
spec:
  rules:
  - name: pol-clone-sync-invalid-rule
    match:
      any:
      - resources:
          kinds:
          - ConfigMap
    generate:
      apiVersion: v1
      kind: Secret
      name: newsecret
      namespace: default
      synchronize: true
      clone:
        name: regcred
        namespace: foo
