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

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

策略实例示例

服务的externalIP仅允许allowedIPs中定义的IP。

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sExternalIPs
metadata:
  name: external-ips
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Service"]
  parameters:
    allowedIPs:
      - "203.0.113.0"
support.huaweicloud.com/usermanual-ucs/ucs_01_0241.html