Skip to content

Commit

Permalink
add one more customcheck sample
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusfm committed May 17, 2023
1 parent 33ed427 commit 7785d3c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions config/samples/zora_v1alpha1_customcheck_labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: zora.undistro.io/v1alpha1
kind: CustomCheck
metadata:
labels:
app.kubernetes.io/name: customcheck
app.kubernetes.io/instance: custom-002
app.kubernetes.io/part-of: zora
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: zora
name: custom-002
spec:
message: "Required labels"
severity: Low
category: Custom
match:
resources:
- group: ""
version: v1
resource: pods
params:
requiredLabels:
- app
validations:
- expression: >
has(object.metadata.labels) &&
!object.metadata.labels.all(label,
params.requiredLabels.all(
req, req != label
)
)
message: "Pod without required labels"

0 comments on commit 7785d3c

Please sign in to comment.