Skip to content
Discussion options

You must be logged in to vote

@srenatus answer was

package kubernetes.validating.existence
import future.keywords

deny contains msg if {
	invalidSCN(input)
	msg := "Every resource must have a storageClassName"
}

invalidSCN(obj) {
  obj.spec.storageClassName == ""
}

invalidSCN(obj) {
  not obj.spec.storageClassName
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@erezo9
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by erezo9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants