Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use pathType ImplementationSpecific for regex #272

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
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
10 changes: 9 additions & 1 deletion charts/devlake/templates/ingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ spec:
- path: /{{ include "devlake.grafanaEndpointPrefix" . }}
{{- end }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
{{- if .Values.ingress.useDefaultNginx }}
pathType: ImplementationSpecific
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be good enough, but why not making the pathType itself a variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact, I just copy paste exactly what was working before:

              {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
              service:
                name: {{ .Values.grafana.ingressServiceName | default ( include "grafana.fullname" (dict "Values" .Values.grafana "Chart" (dict "Name" "grafana") "Release" .Release ) ) }}
                port:
                  number: {{ .Values.grafana.ingressServicePort | default .Values.grafana.service.port }}
              {{- else }}
              serviceName: {{ .Values.grafana.ingressServiceName | default ( include "grafana.fullname" (dict "Values" .Values.grafana "Chart" (dict "Name" "grafana") "Release" .Release ) ) }}
              servicePort: {{ .Values.grafana.ingressServicePort | default .Values.grafana.service.port }}
              {{- end }}

{{- else }}
pathType: Prefix
{{- end }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
Expand All @@ -82,8 +86,12 @@ spec:
- path: /{{ include "devlake.uiEndpointPrefix" . }}
{{- end}}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
{{- if .Values.ingress.useDefaultNginx }}
pathType: ImplementationSpecific
{{- else }}
pathType: Prefix
{{- end }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
Expand Down Expand Up @@ -133,7 +141,7 @@ spec:
paths:
- path: /{{ include "devlake.grafanaEndpointPrefix" . }}(/|$)(.*)
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
pathType: ImplementationSpecific
{{- end }}
backend: # dummy to config-ui, actual 302 forearding for external grafana
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
Expand Down