Open cinimins opened 1 year ago
Try this
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "akhq.fullname" . -}}
{{- $ingressPaths := .Values.ingress.paths -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "akhq.name" . }}
helm.sh/chart: {{ include "akhq.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.secretName }}
ingressClassName: nginx
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}
port:
number: 8080
{{- end }}
Maybe the ingress controllers in our kubernetes clusters have some weird configuration, I don't know. If it's just a rare corner case, I'm fine with my own ingress, but if not, I was wondering whether it wouldn't be better to make the ingress template a bit more customizable.
The way it is currently implemented with the loop over the ingressPaths, I don't see an elegant way to make the pathType customizable.
I'm happy to make a PR, I just don't know whether anyone else has the same issue.
@cinimins you can provide a PR for sure, just try to be non breaking compatibility
I didn't find time to look at this earlier. I don't think it's possible to extend the Helm chart without breaking backward compatibility. It might be related to #664 but I couldn't get that solution to work. I think we will stick with disabling the ingress in the helm chart and deploying a separate Ingress.
Feel free to close this issue, if noone else has this issue.
Hi,
the ingress in my cluster is not working. It forwards to
/ui
but then outputsNo server is available to handle this request
.My values.yaml looks like this (I left out tls and cert-manager annotations):
When modifying the ingress to use
pathType: Prefix
(instead ofImplementationSpecific
), it works. My default ingressclass is nsx, but it also doesn't work with nginx.My current workaround is to deploy my own ingress instead of using the one from the helm chart. Is there a cleaner way?