one-acre-fund/oaf-public-charts

Unable to set tls secretName in ingress

BennyG93 opened this issue · 0 comments

Hey, I am trying to deploy this helm chart with my own custom domain using SSL (with cert-manager), I am using these values:

growthbook:
  extraEnvVars:
    NODE_ENV: production
    APP_ORIGIN: https://growthbook.internal.dev.mydomain.com:443
    API_HOST: https://growthbook.external.dev.mydomain.com:443
  jwtSecret: jwtSecretString
  encryptionKey: encryptionKeyString

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-origin: "https://growthbook.internal.dev.mydomain.com"
    nginx.ingress.kubernetes.io/cors-allow-headers: "Authorization,Referer,sec-ch-ua,sec-ch-ua-mobile,sec-ch-ua-platform,User-Agent,X-Organization,Content-Type"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-dev
    cert-manager.io/acme-challenge-type: "dns01"
    cert-manager.io/issue-temporary-certificate: "true"
  # Specify your app-origin, api-host without 'https://' prefix
  appOriginName: growthbook.internal.dev.mydomain.com
  apiHostName: growthbook.external.dev.mydomain.com

However I am getting these errors:

Configuration for growthbook/growthbook-ingress was added or updated ; with warning(s): TLS termination for host 'growthbook.external.dev.mydomain.com' requires specifying a TLS secret or configuring a global wildcard TLS secret
Skipped a TLS block: spec.tls[0].secretName: Required value

The ingress template has an unset variable for the secretName which is causing this problem.

number: {{ .Values.port.backendPort }}
tls:
- hosts:
- {{ .Values.ingress.appOriginName }}
- {{ .Values.ingress.apiHostName }}
secretName: {{ .secretName }}
{{- end -}}

Is it possible to set this var in the values? Or should this template be updated to be something like {{ .Values.ingress.tls.secretName }}?

Thanks!