apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
name:
namespace:
spec:
complianceType:
remediationAction:
namespaces:
exclude:
include:
object-templates:
- complianceType:
objectDefinition:
kind: RoleBinding # role binding must exist
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: operate-pods-rolebinding
subjects:
- kind: User
name: admin # Name is case sensitive
apiGroup:
roleRef:
kind: Role #this must be Role or ClusterRole
name: operator # this must match the name of the Role or ClusterRole you wish to bind to
apiGroup: rbac.authorization.k8s.io
...
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:name:namespace:spec:complianceType:remediationAction:namespaces:exclude:include:object-templates:-complianceType:objectDefinition:kind: RoleBinding # role binding must existapiVersion: rbac.authorization.k8s.io/v1
metadata:name: operate-pods-rolebinding
subjects:-kind: User
name: admin # Name is case sensitiveapiGroup:roleRef:kind: Role #this must be Role or ClusterRolename: operator # this must match the name of the Role or ClusterRole you wish to bind toapiGroup: rbac.authorization.k8s.io
...
Copy to ClipboardCopied!Toggle word wrapToggle overflow