_networking.tpl 758 B

123456789101112131415161718192021222324252627282930
  1. {{/*
  2. DNS Configuration
  3. */}}
  4. {{- define "dnsConfiguration" }}
  5. dnsPolicy: {{ .Values.dnsPolicy }}
  6. {{- if .Values.dnsConfig }}
  7. dnsConfig:
  8. {{- toYaml .Values.dnsConfig | nindent 2 }}
  9. {{- end }}
  10. {{- end }}
  11. {{/*
  12. Get configuration for host network
  13. */}}
  14. {{- define "hostNetworkingConfiguration" -}}
  15. {{- $host := default false .Values.hostNetwork -}}
  16. {{- if or .Values.externalInterfaces (eq $host false) -}}
  17. {{- print "false" -}}
  18. {{- else -}}
  19. {{- print "true" -}}
  20. {{- end -}}
  21. {{- end -}}
  22. {{/* Validate portal port */}}
  23. {{- if .Values.enableUIPortal }}
  24. {{- if and (not .Values.hostNetwork) (lt .Values.portalDetails.port 9000) }}
  25. {{- fail (printf "Port (%d) is too low. Minimum allowed port is 9000." .Values.portalDetails.port) }}
  26. {{- end }}
  27. {{- end }}