3 changed files with 55 additions and 0 deletions
@ -0,0 +1,29 @@ |
|||||
|
apiVersion: compliance.mcm.ibm.com/v1alpha1 |
||||
|
kind: Compliance |
||||
|
metadata: |
||||
|
name: compliance1 |
||||
|
namespace: mcm |
||||
|
spec: |
||||
|
runtime-rules: |
||||
|
- apiVersion: policy.mcm.ibm.com/v1alpha1 |
||||
|
kind: Policy |
||||
|
metadata: |
||||
|
name: policy01 |
||||
|
spec: |
||||
|
remediationAction: "enforce" # or inform |
||||
|
namespaces: |
||||
|
include: ["default"] |
||||
|
exclude: ["kube*"] |
||||
|
role-templates: |
||||
|
- kind: RoleTemplate |
||||
|
apiVersion: roletemplate.mcm.ibm.com/v1alpha1 |
||||
|
complianceType: "musthave" # at this level, it means the role must exist with the rules that it musthave below |
||||
|
metadata: |
||||
|
namespace: "" # will be inferred |
||||
|
name: operator |
||||
|
rules: |
||||
|
- complianceType: "musthave" # at this level, it means if the role exists the rule is a musthave |
||||
|
policyRule: |
||||
|
apiGroups: ["extensions", "apps"] |
||||
|
resources: ["deployments"] |
||||
|
verbs: ["get", "list", "watch", "create", "delete","patch"] |
@ -0,0 +1,14 @@ |
|||||
|
apiVersion: mcm.ibm.com/v1alpha1 |
||||
|
kind: PlacementPolicy |
||||
|
metadata: |
||||
|
name: placement1 |
||||
|
namespace: mcm |
||||
|
spec: |
||||
|
clusterNames: |
||||
|
- "icp3" |
||||
|
# clusterLabels: |
||||
|
# matchLabels: |
||||
|
# cloud: "IBM" |
||||
|
# clusterConditions: |
||||
|
# - type: "OK" |
||||
|
# status: "True" |
@ -0,0 +1,12 @@ |
|||||
|
apiVersion: mcm.ibm.com/v1alpha1 |
||||
|
kind: PlacementBinding |
||||
|
metadata: |
||||
|
name: binding1 |
||||
|
namespace: mcm |
||||
|
placementRef: |
||||
|
name: placement1 |
||||
|
subjects: |
||||
|
- name: compliance1 |
||||
|
kind: Compliance |
||||
|
- name: deployable-simple |
||||
|
kind: DestinationPolicy |
Loading…
Reference in new issue