Aucune description

ingress.yaml 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {{- if .Values.ingress.enabled }}
  2. apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
  3. kind: Ingress
  4. metadata:
  5. name: {{ template "common.names.fullname" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  8. {{- if or .Values.ingress.annotations .Values.commonAnnotations }}
  9. {{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" .) }}
  10. annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
  11. {{- end }}
  12. spec:
  13. {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
  14. ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
  15. {{- end }}
  16. rules:
  17. {{- if .Values.ingress.hostname }}
  18. - host: {{ .Values.ingress.hostname }}
  19. http:
  20. paths:
  21. {{- if .Values.ingress.extraPaths }}
  22. {{- toYaml .Values.ingress.extraPaths | nindent 10 }}
  23. {{- end }}
  24. - path: {{ .Values.ingress.path }}
  25. {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
  26. pathType: {{ .Values.ingress.pathType }}
  27. {{- end }}
  28. backend: {{- include "common.ingress.backend" (dict "serviceName" (include "shuffle.frontend.name" .) "servicePort" "http" "context" $) | nindent 14 }}
  29. - path: {{ .Values.ingress.backendPath }}
  30. {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
  31. pathType: {{ .Values.ingress.backendPathType }}
  32. {{- end }}
  33. backend: {{- include "common.ingress.backend" (dict "serviceName" (include "shuffle.backend.name" .) "servicePort" "http" "context" $) | nindent 14 }}
  34. {{- end }}
  35. {{- range .Values.ingress.extraHosts }}
  36. - host: {{ .name | quote }}
  37. http:
  38. paths:
  39. - path: {{ default "/" .path }}
  40. {{- if eq "true" (include "common.ingress.supportsPathType" $) }}
  41. pathType: {{ default "ImplementationSpecific" .pathType }}
  42. {{- end }}
  43. backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
  44. {{- end }}
  45. {{- if .Values.ingress.extraRules }}
  46. {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
  47. {{- end }}
  48. {{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
  49. tls:
  50. {{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
  51. - hosts:
  52. - {{ .Values.ingress.hostname | quote }}
  53. secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
  54. {{- end }}
  55. {{- if .Values.ingress.extraTls }}
  56. {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
  57. {{- end }}
  58. {{- end }}
  59. {{- end }}