Skip to content

Commit

Permalink
Fail on likely cloud metadata access misconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Aug 2, 2023
1 parent 3927ebe commit 7c7523c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions jupyterhub/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@


{{- /*
Warnings for likely misconfiguration
Warnings for likely misconfigurations
*/}}

{{- if and (not .Values.scheduling.podPriority.enabled) (and .Values.scheduling.userPlaceholder.enabled .Values.scheduling.userPlaceholder.replicas) }}
Expand All @@ -114,7 +114,7 @@


{{- /*
Breaking changes.
Breaking changes and failures for likely misconfigurations.
*/}}

{{- $breaking := "" }}
Expand Down Expand Up @@ -148,6 +148,11 @@
{{- end }}


{{- if and .Values.singleuser.cloudMetadata.blockWithIptables (and .Values.singleuser.networkPolicy.enabled .Values.singleuser.networkPolicy.egressAllowRules.cloudMetadataServer) }}
{{- $breaking = print $breaking "\n\nCHANGED: singleuser.cloudMetadata.blockWithIptables must as of version 3.0.0 not be configured together with singleuser.networkPolicy.egressAllowRules.cloudMetadataServer as it leads to an ambiguous configuration." }}
{{- end }}


{{- if $breaking }}
{{- fail (print $breaking_title $breaking "\n\n") }}
{{- end }}
2 changes: 1 addition & 1 deletion tools/templates/lint-and-validate-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ singleuser:
networkPolicy:
enabled: true
egressAllowRules:
cloudMetadataServer: true
cloudMetadataServer: false
dnsPortsPrivateIPs: true
nonPrivateIPs: false
privateIPs: false
Expand Down

0 comments on commit 7c7523c

Please sign in to comment.