Skip to content

Commit

Permalink
refactor: remove separated ingress functionality (#2586)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: remove separated ingress functionality and only keep the global combined ingress

Release-As: 0.0.0-8.7.0-alpha2
  • Loading branch information
aabouzaid authored Nov 19, 2024
1 parent fe99c9c commit 3d12988
Show file tree
Hide file tree
Showing 30 changed files with 458 additions and 1,634 deletions.
928 changes: 439 additions & 489 deletions charts/camunda-platform-alpha/README.md

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions charts/camunda-platform-alpha/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Now you can connect your workers and clients to `localhost:26500`


As part of the Helm charts, an ingress definition can be deployed, but you require to have an Ingress Controller for that Ingress to be Exposed.
In order to deploy the ingress manifest, set `<service>.ingress.enabled` to `true`. Example: `operate.ingress.enabled=true`

If you don't have an ingress controller you can use `kubectl port-forward` to access the deployed web application from outside the cluster:

Expand Down Expand Up @@ -111,7 +110,7 @@ as well, otherwise, a login will not be possible. Make sure you use `18080` as a
{{- end }}
{{- end }}

Now you can point your browser to one of the service's login pages. Example: http://localhost:8081 for Operate.
Now you can point your browser to one of the service's login pages.
{{ if .Values.identity.firstUser.enabled }}
{{- if .Values.identity.firstUser.existingSecret }}
Default user: "{{ .Values.identity.firstUser.username }}", and for password, run:
Expand Down Expand Up @@ -145,12 +144,12 @@ Default user and password: "{{ .Values.identity.firstUser.username -}}/{{ .Value
{{- end }}

{{- if .Values.core.ingress.grpc.enabled }}
- Zeebe Gateway gRPC: {{ include "camundaPlatform.zeebeGatewayGRPCExternalURL" . }}
- Camunda gRPC API: {{ include "camundaPlatform.zeebeGatewayGRPCExternalURL" . }}
{{- end }}

{{- if .Values.core.ingress.http.enabled }}
{{ $proto := ternary "https" "http" .Values.core.ingress.http.tls.enabled -}}
- Zeebe Gateway REST: {{ $proto }}://{{ tpl .Values.core.ingress.http.host $ }}
- Camunda REST API: {{ $proto }}://{{ tpl .Values.core.ingress.http.host $ }}
{{- end }}

{{ if .Values.global.createReleaseInfo -}}
Expand Down
11 changes: 2 additions & 9 deletions charts/camunda-platform-alpha/templates/camunda/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,7 @@ Usage: {{ include "camundaPlatform.getExternalURL" (dict "component" "operate" "
*/}}
{{- define "camundaPlatform.getExternalURL" -}}
{{- if (index .context.Values .component "enabled") -}}
{{- if (index .context.Values .component "ingress" "enabled") }}
{{- $proto := ternary "https" "http" (index .context.Values .component "ingress" "tls" "enabled") -}}
{{- printf "%s://%s" $proto (index .context.Values .component "ingress" "host") -}}
{{- else if $.context.Values.global.ingress.enabled -}}
{{- if $.context.Values.global.ingress.enabled -}}
{{ $proto := ternary "https" "http" .context.Values.global.ingress.tls.enabled -}}
{{- printf "%s://%s%s" $proto .context.Values.global.ingress.host (index .context.Values .component "contextPath") -}}
{{- else -}}
Expand Down Expand Up @@ -455,11 +452,7 @@ Web Modeler templates.

{{- define "camundaPlatform.getExternalURLModeler" -}}
{{- if .context.Values.webModeler.enabled -}}
{{- $ingress := .context.Values.webModeler.ingress }}
{{- if index $ingress "enabled" }}
{{- $proto := ternary "https" "http" (index $ingress .component "tls" "enabled") -}}
{{- printf "%s://%s" $proto (index $ingress .component "host") -}}
{{- else if $.context.Values.global.ingress.enabled -}}
{{- if $.context.Values.global.ingress.enabled -}}
{{ $proto := ternary "https" "http" .context.Values.global.ingress.tls.enabled -}}
{{- if eq .component "websockets" }}
{{- printf "%s://%s%s" $proto .context.Values.global.ingress.host (include "webModeler.websocketContextPath" .context) -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
port:
number: {{ .Values.console.service.port }}
path: {{ .Values.console.contextPath }}
pathType: {{ .Values.console.ingress.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
{{- end }}
{{- if .Values.identity.enabled }}
{{- if or .Values.identityKeycloak.enabled .Values.global.identity.keycloak.internal }}
Expand All @@ -39,14 +39,14 @@ spec:
pathType: {{ .Values.identityKeycloak.ingress.pathType | default .Values.global.ingress.pathType }}
{{- end }}
{{- /* Disable Identiy endpoint if a seperated Ingress is used because it overlaps with Keycloak endpoints */ -}}
{{- if and .Values.identity.contextPath (not .Values.identity.ingress.enabled) }}
{{- if .Values.identity.contextPath }}
- backend:
service:
name: {{ template "identity.fullname" . }}
port:
number: {{ .Values.identity.service.port }}
path: {{ .Values.identity.contextPath }}
pathType: {{ .Values.identity.ingress.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
{{- end }}
{{- end }}
{{- if and .Values.webModeler.enabled .Values.webModeler.contextPath }}
Expand All @@ -56,14 +56,14 @@ spec:
port:
number: {{ .Values.webModeler.webapp.service.port }}
path: {{ .Values.webModeler.contextPath }}
pathType: {{ .Values.webModeler.ingress.webapp.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
- backend:
service:
name: {{ template "webModeler.websockets.fullname" . }}
port:
number: {{ .Values.webModeler.websockets.service.port }}
path: {{ template "webModeler.websocketContextPath" . }}
pathType: {{ .Values.webModeler.ingress.websockets.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
{{- end }}
{{- /* Orchestration Group */ -}}
{{- if and .Values.core.enabled .Values.core.contextPath }}
Expand All @@ -74,15 +74,15 @@ spec:
port:
number: {{ .Values.core.service.httpPort }}
path: {{ .Values.core.contextPath }}
pathType: {{ .Values.core.ingress.http.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
# Core - Optimize.
- backend:
service:
name: {{ template "optimize.fullname" . }}
port:
number: {{ .Values.optimize.service.port }}
path: {{ .Values.optimize.contextPath }}
pathType: {{ .Values.optimize.ingress.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
{{- end }}
{{- if and .Values.connectors.enabled .Values.connectors.contextPath }}
# Connectors.
Expand All @@ -92,7 +92,7 @@ spec:
port:
number: {{ .Values.connectors.service.serverPort }}
path: {{ .Values.connectors.contextPath }}
pathType: {{ .Values.connectors.ingress.pathType | default .Values.global.ingress.pathType }}
pathType: {{ .Values.global.ingress.pathType }}
{{- end }}
{{- if .Values.global.ingress.tls.enabled }}
tls:
Expand Down
39 changes: 0 additions & 39 deletions charts/camunda-platform-alpha/templates/connectors/ingress.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions charts/camunda-platform-alpha/templates/console/ingress.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions charts/camunda-platform-alpha/templates/identity/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ Create a default fully qualified app name.
{{- $host := .Values.global.ingress.host -}}
{{- $path := .Values.identity.contextPath | default "" -}}
{{- printf "%s://%s%s" $proto $host $path -}}
{{- else if .Values.identity.ingress.enabled -}}
{{- $proto := ternary "https" "http" .Values.identity.ingress.tls.enabled -}}
{{- $host := .Values.identity.ingress.host -}}
{{- printf "%s://%s" $proto $host -}}
{{- else -}}
{{- "http://localhost:8080" -}}
{{- end -}}
Expand Down
39 changes: 0 additions & 39 deletions charts/camunda-platform-alpha/templates/identity/ingress.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions charts/camunda-platform-alpha/templates/optimize/ingress.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@ Define match labels for Web Modeler websockets to be used in matchLabels selecto
{{- define "webModeler.publicWebsocketHost" -}}
{{- if and .Values.global.ingress.enabled .Values.webModeler.contextPath }}
{{- .Values.global.ingress.host }}
{{- else }}
{{- .Values.webModeler.ingress.enabled | ternary .Values.webModeler.ingress.websockets.host .Values.webModeler.websockets.publicHost }}
{{- end }}
{{- end -}}

Expand All @@ -317,11 +315,7 @@ Define match labels for Web Modeler websockets to be used in matchLabels selecto
{{- if and .Values.global.ingress.enabled .Values.webModeler.contextPath }}
{{- .Values.global.ingress.tls.enabled | ternary "443" "80" }}
{{- else }}
{{- if .Values.webModeler.ingress.enabled }}
{{- .Values.webModeler.ingress.websockets.tls.enabled | ternary "443" "80" }}
{{- else }}
{{- .Values.webModeler.websockets.publicPort }}
{{- end }}
{{- .Values.webModeler.websockets.publicPort }}
{{- end }}
{{- end -}}

Expand All @@ -331,8 +325,6 @@ Define match labels for Web Modeler websockets to be used in matchLabels selecto
{{- define "webModeler.websocketTlsEnabled" -}}
{{- if and .Values.global.ingress.enabled .Values.webModeler.contextPath }}
{{- .Values.global.ingress.tls.enabled }}
{{- else }}
{{- and .Values.webModeler.ingress.enabled .Values.webModeler.ingress.websockets.tls.enabled }}
{{- end }}
{{- end -}}

Expand Down
51 changes: 0 additions & 51 deletions charts/camunda-platform-alpha/templates/web-modeler/ingress.yaml

This file was deleted.

Loading

0 comments on commit 3d12988

Please sign in to comment.