4.9. Security Context Constraints ポリシー
Kubernetes 設定ポリシーコントローラーは、Security Context Constraints ポリシーのステータスを監視します。Security Context Constraints (SCC) ポリシーを適用し、ポリシーで条件を定義して Pod のパーミッションを制御します。
以下のセクションで、SCC ポリシーの詳細を説明します。
4.9.1. SCC ポリシー YAML の設定 リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
name:
namespace:
annotations:
policy.open-cluster-management.io/standards:
policy.open-cluster-management.io/categories:
policy.open-cluster-management.io/controls:
policy.open-cluster-management.io/description:
spec:
remediationAction:
disabled:
policy-templates:
- objectDefinition:
apiVersion: policy.open-cluster-management.io/v1
kind: ConfigurationPolicy
metadata:
name:
spec:
remediationAction:
severity:
namespaceSelector:
exclude:
include:
matchLabels:
matchExpressions:
object-templates:
- complianceType:
objectDefinition:
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name:
allowHostDirVolumePlugin:
allowHostIPC:
allowHostNetwork:
allowHostPID:
allowHostPorts:
allowPrivilegeEscalation:
allowPrivilegedContainer:
fsGroup:
readOnlyRootFilesystem:
requiredDropCapabilities:
runAsUser:
seLinuxContext:
supplementalGroups:
users:
volumes:
...