Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions helm-chart/eoapi/templates/services/ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
{{- if (and (.Values.ingress.tls.enabled) (.Values.ingress.tls.certManager)) }}
cert-manager.io/issuer: {{ .Values.ingress.tls.certManagerIssuer }}
{{- end }}
spec:
{{- if (and (.Values.ingress.className) (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion)) }}
ingressClassName: {{ .Values.ingress.className }}
Expand Down Expand Up @@ -52,6 +55,54 @@ spec:
port:
number: 80
{{- end }}
{{- if (and (not .Values.testing) (.Values.ingress.host)) }}
host: {{ .Values.ingress.host }}
{{- end }}
{{- if (and (not .Values.testing) (.Values.ingress.host) (.Values.ingress.tls.enabled)) }}
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end }}
---
{{- if (and (.Values.ingress.tls.enabled) (.Values.ingress.tls.certManager)) }}
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: {{ .Values.ingress.tls.certManagerEmail }}
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging-key
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-prod
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: {{ .Values.ingress.tls.certManagerEmail }}
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod-key
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
{{- end }}
{{/* END: if .Values.ingress.className "nginx" */}}
{{- end }}
7 changes: 7 additions & 0 deletions helm-chart/eoapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ ingress:
# `"nginx"` will create a `kind:Service` with a `spec.port:ClusterIP` and a single NLB and path rewrites for /vector, /stac, /raster
enabled: true
className: "nginx"
host: ""
tls:
enabled: false
secretName: eoapi-tls
certManager: false
certManagerIssuer: letsencrypt-prod
cerrtManagerEmail: ""

raster:
enabled: true
Expand Down