Skip to content

Commit

Permalink
feat: add validation error message (#398)
Browse files Browse the repository at this point in the history
* add error message when someone is trying to install on old cluster (v1.18.x)

Co-authored-by: shalev avhar <[email protected]>
  • Loading branch information
shalev007 and shalev avhar authored Jun 29, 2023
1 parent bdebf93 commit bb5bdc8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{{- if and (.Values.datree.multiplePolicies) (.Values.datree.policy)}}
{{- fail "You can't use both policy and multiplePolicies at the same time" }}
{{- end }}
{{- if and (semverCompare "<1.19.x" .Capabilities.KubeVersion.Version) (.Values.securityContext.seccompProfile)}}
{{- fail "it seems you are running Kubernetes version < 1.19.x. To run Datree in version < v1.19.x, please set securityContext.seccompProfile=null" }}
{{- end }}

{{/* don't allow the same policy to be used more than once */}}
{{- if .Values.datree.multiplePolicies}}
Expand Down

0 comments on commit bb5bdc8

Please sign in to comment.