2.6.8.2. コンソールからの gatekeeper ポリシーの作成
コンソールから gatekeeper ポリシーを作成して、インストールします。
クラスターにログインしたら、Governance ページに移動します。
Create policy を選択します。フォームを完了したら、Specifications フィールドから GatekeeperOperator を選択します。ポリシーのパラメーター値が自動的に設定され、ポリシーはデフォルトで inform に設定されます。gatekeeper をインストールするには、修復アクションを enforce に設定します。サンプルを表示するには、policy-gatekeeper-operator.yaml を参照してください。
+ 注記: デフォルト値が Operator によって生成可能であることに留意してください。gatekeeper Operator ポリシーに使用できるオプションのパラメーターの説明については、Gatekeeper Helm Chart を参照してください。
2.6.8.2.1. gatekeeper Operator CR リンクのコピーリンクがクリップボードにコピーされました!
apiVersion: operator.gatekeeper.sh/v1alpha1
kind: Gatekeeper
metadata:
name: gatekeeper
spec:
audit:
replicas: 1
logLevel: DEBUG
auditInterval: 10s
constraintViolationLimit: 55
auditFromCache: Enabled
auditChunkSize: 66
emitAuditEvents: Enabled
resources:
limits:
cpu: 500m
memory: 150Mi
requests:
cpu: 500m
memory: 130Mi
validatingWebhook: Enabled
webhook:
replicas: 2
logLevel: ERROR
emitAdmissionEvents: Enabled
failurePolicy: Fail
resources:
limits:
cpu: 480m
memory: 140Mi
requests:
cpu: 400m
memory: 120Mi
nodeSelector:
region: "EMEA"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
auditKey: "auditValue"
topologyKey: topology.kubernetes.io/zone
tolerations:
- key: "Example"
operator: "Exists"
effect: "NoSchedule"
podAnnotations:
some-annotation: "this is a test"
other-annotation: "another test"