检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
- apiGroups: [""] kinds: ["Service"] 符合策略实例的资源定义 Servie类型非Nodeport,符合策略实例。
- apiGroups: [""] kinds: ["Pod"] namespaces: - "default" parameters: repos: - "openpolicyagent/" 符合策略实例的资源定义 容器镜像以
kinds: - apiGroups: [""] kinds: ["Pod"] 符合策略实例的资源定义 示例中readOnlyRootFilesystem字段为true,符合策略实例。
- apiGroups: [""] kinds: ["Service"] excludedNamespaces: - "ingress-nginx-private" - "ingress-nginx-public" 符合策略实例的资源定义
- apiGroups: - "" - events.k8s.io resources: - events verbs: - create - patch - update - apiGroups
- apiGroups: [""] kinds: ["Pod"] excludedNamespaces: ["kube-system"] 符合策略实例的资源定义 示例中privileged设置为false,符合策略实例。
spec: match: kinds: - apiGroups: [""] kinds: ["Pod"] excludedNamespaces: ["kube-system"] 符合策略实例的资源定义 Pod的automountServiceAccountToken
spec: match: kinds: - apiGroups: [""] kinds: ["Pod"] 符合策略实例的资源定义 示例中allowPrivilegeEscalation的值为false,符合策略实例。
- apiGroups: [""] kinds: ["Pod"] 符合策略实例的资源定义 示例中hostPID和hostIPC均为false,符合策略实例。
- apiGroups: [""] kinds: ["Pod"] namespaces: - "default" 符合策略实例的资源定义 容器镜像包含digest,符合策略实例。
kinds: - apiGroups: [""] kinds: ["Pod"] namespaces: - "default" parameters: tags: ["latest"] exemptImages
apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sPSPProcMount metadata: name: psp-proc-mount spec: match: kinds: - apiGroups
apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sExternalIPs metadata: name: external-ips spec: match: kinds: - apiGroups
- apiGroups: [""] kinds: ["Pod"] parameters: cpu: "200m" memory: "1Gi" 符合策略实例的资源定义 CPU和内存的Limit符合策略实例。
- apiGroups: [""] kinds: ["Pod"] parameters: forbiddenSysctls: # - "*" # * may be used to forbid all sysctls - kernel
- apiGroups: [""] kinds: ["Pod"] parameters: allowedHostPaths: - readOnly: true pathPrefix: "/foo" 符合策略实例的资源定义 示例中hostPath
spec: match: kinds: - apiGroups: [""] kinds: ["Pod"] parameters: limits: - memory requests: - cpu
apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sPSPFSGroup metadata: name: psp-fsgroup spec: match: kinds: - apiGroups:
apiGroups: [""] kinds: ["Namespace"] parameters: message: "All namespaces must have an `owner` label that points to your company
apiVersion: constraints.gatekeeper.sh/v1beta1 kind: K8sReplicaLimits metadata: name: replica-limits spec: match: kinds: - apiGroups