-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add base path support * Remove trailing - * Add base path support to Studio Ingress * Remove trailing slash in the ingress rule for UI * Use template for base path * Split Ingress resources * Add regex groups to paths * Fix regex in paths * Fix borked installation when basePath is set to / * Fix UI health check endpoint * Don't strip path prefix in UI * Revert "Fix UI health check endpoint" This reverts commit d5599a7. * Add BASE_PATH variable for Studio frontend * Revert "Add BASE_PATH variable for Studio frontend" This reverts commit 65b0237. * Revert "Revert "Fix UI health check endpoint"" This reverts commit 67d95b8. * /api/health -> /fapi/health * Set BASE_PATH automatically * Update charts/studio/templates/ingress-studio-webhook.yaml Co-authored-by: Marcin Jasion <5058132+mjasion@users.noreply.github.com> * Update charts/studio/templates/ingress-studio-ui.yaml Co-authored-by: Marcin Jasion <5058132+mjasion@users.noreply.github.com> * Update charts/studio/templates/ingress-studio-api.yaml Co-authored-by: Marcin Jasion <5058132+mjasion@users.noreply.github.com> * Update charts/studio/templates/deployment-studio-ui.yaml Co-authored-by: Marcin Jasion <5058132+mjasion@users.noreply.github.com> * Fix version * Fix version again * Upgrade appVersion in chart --------- Co-authored-by: Marcin Jasion <5058132+mjasion@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
152 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{- if .Values.global.ingress.enabled -}} | ||
{{- if and .Values.global.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.global.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.global.ingress.annotations "kubernetes.io/ingress.class" .Values.global.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-studio-api | ||
labels: | ||
{{- include "studio-ui.labels" . | nindent 4 }} | ||
annotations: | ||
{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }} | ||
nginx.ingress.kubernetes.io/rewrite-target: /$1 | ||
{{- end }} | ||
{{- with .Values.global.ingress.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.global.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.global.ingress.className }} | ||
{{- end }} | ||
{{- if and .Values.global.ingress.tlsEnabled .Values.global.ingress.hostnameEnabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.global.host }} | ||
secretName: {{ .Values.global.ingress.tlsSecretName }} | ||
{{- end }} | ||
rules: | ||
- http: | ||
paths: | ||
{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }} | ||
- path: /{{ include "studio.basePath" . }}/(api(?:/|$).*) | ||
{{- else }} | ||
- path: /api | ||
{{- end }} | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
pathType: ImplementationSpecific | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: studio-backend | ||
port: | ||
number: {{ .Values.studioBackend.service.port }} | ||
{{- else }} | ||
serviceName: studio-backend | ||
servicePort: {{ .Values.studioBackend.service.port }} | ||
{{- end }} | ||
{{- if .Values.global.ingress.hostnameEnabled }} | ||
host: {{ .Values.global.host }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{- if .Values.global.ingress.enabled -}} | ||
{{- if and .Values.global.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.global.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.global.ingress.annotations "kubernetes.io/ingress.class" .Values.global.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-studio-ui | ||
labels: | ||
{{- include "studio-ui.labels" . | nindent 4 }} | ||
annotations: | ||
{{- with .Values.global.ingress.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.global.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.global.ingress.className }} | ||
{{- end }} | ||
{{- if and .Values.global.ingress.tlsEnabled .Values.global.ingress.hostnameEnabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.global.host }} | ||
secretName: {{ .Values.global.ingress.tlsSecretName }} | ||
{{- end }} | ||
rules: | ||
- http: | ||
paths: | ||
{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }} | ||
- path: /{{ include "studio.basePath" . }}((?:/|$).*) | ||
{{- else }} | ||
- path: / | ||
{{- end }} | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
pathType: ImplementationSpecific | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: studio-ui | ||
port: | ||
number: {{ .Values.studioUi.service.port }} | ||
{{- else }} | ||
serviceName: studio-ui | ||
servicePort: {{ .Values.studioUi.service.port }} | ||
{{- end }} | ||
{{- if .Values.global.ingress.hostnameEnabled }} | ||
host: {{ .Values.global.host }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters