ingress-https.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {{- if and .Values.ingress.create (eq .Values.ingress.type "nginx-ssl") -}}
  2. apiVersion: networking.k8s.io/v1beta1
  3. kind: Ingress
  4. metadata:
  5. name: gethue
  6. annotations:
  7. kubernetes.io/ingress.class: nginx
  8. cert-manager.io/cluster-issuer: letsencrypt-website-prod
  9. cert-manager.io/acme-challenge-type: http01
  10. nginx.ingress.kubernetes.io/ssl-redirect: "true"
  11. nginx.ingress.kubernetes.io/affinity: "cookie"
  12. nginx.ingress.kubernetes.io/session-cookie-name: "gethue-website"
  13. nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
  14. nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
  15. {{ if .Values.ingress.hasAuth }}
  16. nginx.ingress.kubernetes.io/auth-type: basic
  17. nginx.ingress.kubernetes.io/auth-secret: basic-auth-gethue
  18. nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required'
  19. {{ end }}
  20. spec:
  21. rules:
  22. {{ if .Values.docs.enabled }}
  23. - host: {{ .Values.docs.domain }}
  24. http:
  25. paths:
  26. - backend:
  27. serviceName: docs
  28. servicePort: 9001
  29. path: /
  30. {{ end }}
  31. {{ if .Values.website.enabled }}
  32. - host: {{ .Values.website.domain }}
  33. http:
  34. paths:
  35. - backend:
  36. serviceName: website
  37. servicePort: 9002
  38. path: /
  39. {{ end }}
  40. {{ if .Values.website.jp.enabled }}
  41. - host: {{ .Values.website.jp.domain }}
  42. http:
  43. paths:
  44. - backend:
  45. serviceName: website-jp
  46. servicePort: 9002
  47. path: /
  48. {{ end }}
  49. tls:
  50. - hosts:
  51. {{ if .Values.docs.enabled }}
  52. - {{ .Values.docs.domain }}
  53. {{ end }}
  54. {{ if .Values.website.enabled }}
  55. - {{ .Values.website.domain }}
  56. {{ end }}
  57. {{ if .Values.website.jp.enabled }}
  58. - {{ .Values.website.jp.domain }}
  59. {{ end }}
  60. secretName: letsencrypt-website-prod-tls
  61. {{- end -}}