An ingress path is always required for k8s-at-home charts
While working on adding a link shortener to my cluster, I created a helmrelease based on k8s-at-home's shlink chart. The helmrelease failed with:
{"level":"error","ts":"2022-07-09T06:47:39.813Z","logger":"controller.helmrelease","msg":"Reconciler error","reconciler group":"helm.toolkit.fluxcd.io","reconciler kind":"HelmRelease","name":"shlink","namespace":"shlink","error":"Helm install failed: template: shlink/templates/NOTES.txt:1:4: executing \"shlink/templates/NOTES.txt\" at <include \"common.notes.defaultNotes\" .>: error calling include: template: shlink/charts/common/templates/_notes.tpl:33:16: executing \"common.notes.defaultNotes\" at <first .paths>: error calling first: runtime error: invalid memory address or nil pointer dereference"}
This obscure link led me to the answer - based on the way the k8s-at-home charts render NOTES.txt
, it's always necessary to define ingress.main.hosts[].path
, presumably so that NOTES.txt
can inform the user about the necessary path.
So, adding a path to my helmrelease did indeed fix the problem:
ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: true
hosts:
- host: fnky.nz
paths:
- path: /
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: "letsencrypt-prod"
tls:
secretName: letsencrypt-wildcard-cert
hosts:
- host: fnky.nz
Now the helmrelease has happily reconciled, and my link-shortener is ready for action!