华为云UCS-k8sallowedrepos:策略实例示例

时间:2024-09-12 15:06:02

策略实例示例

以下策略实例定义容器镜像必须以“openpolicyagent/”开头。

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sAllowedRepos
metadata:
  name: repo-is-openpolicyagent
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
    namespaces:
      - "default"
  parameters:
    repos:
      - "openpolicyagent/"
support.huaweicloud.com/usermanual-ucs/ucs_01_0249.html