apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-labels
  annotations:
    pod-policies.kyverno.io/autogen-controllers: none
spec:
  validationFailureAction: Audit
  background: false
  rules:
    - name: require-team
      match:
        any:
          - resources:
              kinds:
                - Pod/*
      validate:
        message: 'The label `team` is required.'
        pattern:
          metadata:
            labels:
              team: '?*'
