Skip to content

Commit

Permalink
feat(ingress): make ingress pathType configurable (#513)
Browse files Browse the repository at this point in the history
k8s supports different values for `pathType` for ingresses, as [documented here](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types).
Make the ingress pathType configurable for the gms and frontend charts so that users can set different values based on their ingress deployment strategy.
  • Loading branch information
rohanag12 authored Oct 22, 2024
1 parent 1a27410 commit fa35a08
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for DataHub
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.4.31
version: 0.4.32
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.14.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- $fullName := include "datahub-frontend.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $ingressApiVersion := include "datahub-frontend.ingress.apiVersion" . -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
apiVersion: {{ template "datahub-frontend.ingress.apiVersion" . }}
kind: Ingress
metadata:
Expand Down Expand Up @@ -37,7 +38,7 @@ spec:
{{- range .redirectPaths }}
- path: {{ .path }}
{{- if eq $ingressApiVersion "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ .name }}
Expand All @@ -56,7 +57,7 @@ spec:
{{- range .paths }}
- path: {{ . }}
{{- if eq $ingressApiVersion "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $fullName }}
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ingress:
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
pathType: ImplementationSpecific

auth:
sessionTTLHours: "24"
Expand Down
5 changes: 3 additions & 2 deletions charts/datahub/subcharts/datahub-gms/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- $fullName := printf "%s-%s" .Release.Name "datahub-gms"}}
{{- $svcPort := .Values.global.datahub.gms.port -}}
{{- $ingressApiVersion := include "datahub-gms.ingress.apiVersion" . -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
apiVersion: {{ template "datahub-gms.ingress.apiVersion" . }}
kind: Ingress
metadata:
Expand Down Expand Up @@ -37,7 +38,7 @@ spec:
{{- range .redirectPaths }}
- path: {{ .path }}
{{- if eq $ingressApiVersion "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ .name }}
Expand All @@ -56,7 +57,7 @@ spec:
{{- range .paths }}
- path: {{ . }}
{{- if eq $ingressApiVersion "networking.k8s.io/v1" }}
pathType: ImplementationSpecific
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $fullName }}
Expand Down
1 change: 1 addition & 0 deletions charts/datahub/subcharts/datahub-gms/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ ingress:
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
pathType: ImplementationSpecific

# Extra labels for Deployment
extraLabels: {}
Expand Down

0 comments on commit fa35a08

Please sign in to comment.