Skip to content

Commit e772037

Browse files
authored
chore(helm): decouple temporal namespace (#1344)
Because - Temporal is going to be completely decoupled from the Instill Core Helm chart for better future maintenance. This commit - decouples Temporal from Instill Core Helm chart.
1 parent c868787 commit e772037

27 files changed

+80
-1123
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ ELASTICSEARCH_HOST_PORT=9200
140140
# Temporal
141141
TEMPORAL_IMAGE=temporalio/auto-setup
142142
TEMPORAL_VERSION=1.27
143+
TEMPORAL_HELM_CHART_VERSION=0.64.0
143144
TEMPORAL_HOST=temporal
144145
TEMPORAL_PORT=7233
145146
# exposed port

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ INSTILL_CORE_IMAGE_NAME := instill/instill-core
3636

3737
CONTAINER_COMPOSE_INTEGRATION_TEST_NAME := instill-core-compose-integration-test
3838

39-
HELM_NAMESPACE := instill-ai
40-
HELM_RELEASE_NAME := core
39+
INSTILL_CORE_KUBERNETES_NAMESPACE := instill-ai
40+
INSTILL_CORE_HELM_RELEASE_NAME := core
4141

4242
# By default, these files are used to load the secrets (OAuth, API keys, etc.)
4343
ENV_SECRETS_COMPONENT := .env.secrets.component
@@ -50,6 +50,7 @@ CONFIG_DIR_PATH := ./configs/compose
5050
GIT_COMMIT_SHA := $(shell git rev-parse --short=7 HEAD 2>/dev/null)
5151

5252
# 3rd-party Kubernetes namespaces
53+
TEMPORAL_KUBERNETES_NAMESPACE := temporal
5354
MINIO_KUBERNETES_NAMESPACE := minio
5455
MILVUS_KUBERNETES_NAMESPACE := milvus
5556

Makefile.helper

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,26 @@ define HELM
3434
@helm repo add influxdata https://helm.influxdata.com
3535
@helm repo add milvus-operator https://zilliztech.github.io/milvus-operator
3636
@helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
37+
@helm repo add temporal https://go.temporal.io/helm-charts
38+
@echo ""
3739
@echo "Update Helm dependencies"
3840
@cd charts/core && helm dependency update
41+
@echo ""
42+
@echo "Install Temporal"
43+
@helm install --namespace ${TEMPORAL_KUBERNETES_NAMESPACE} --create-namespace temporal temporal/temporal --version ${TEMPORAL_HELM_CHART_VERSION} --values configs/helm/temporal/values.yaml
44+
@echo ""
3945
@echo "Install MinIO in single-tenant mode"
4046
@helm install --namespace ${MINIO_KUBERNETES_NAMESPACE} --create-namespace operator minio/operator --version ${MINIO_OPERATOR_HELM_CHART_VERSION} --values configs/helm/minio/operator.values.yaml
4147
@helm install --namespace ${MINIO_KUBERNETES_NAMESPACE} --create-namespace tenant minio/tenant --version ${MINIO_OPERATOR_HELM_CHART_VERSION} --values configs/helm/minio/tenant.values.yaml
48+
@echo ""
4249
@echo "Install Milvus in standalone mode"
4350
@helm install --namespace ${MILVUS_KUBERNETES_NAMESPACE} --create-namespace milvus-operator milvus-operator/milvus-operator --version ${MILVUS_OPERATOR_HELM_CHART_VERSION} --values configs/helm/milvus/values.yaml
4451
@kubectl apply --namespace ${MILVUS_KUBERNETES_NAMESPACE} -f configs/helm/milvus/secret.yaml
4552
@kubectl apply --namespace ${MILVUS_KUBERNETES_NAMESPACE} -f configs/helm/milvus/standalone.yaml
53+
@echo ""
4654
@echo "Install Instill Core Helm chart"
47-
@helm install ${HELM_RELEASE_NAME} charts/core \
48-
--namespace ${HELM_NAMESPACE} --create-namespace \
55+
@helm install ${INSTILL_CORE_HELM_RELEASE_NAME} charts/core \
56+
--namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} --create-namespace \
4957
--set edition=$(if $(filter true,$(1)),k8s-ce:test,k8s-ce) \
5058
--set tags.observability=$(OBSERVE_ENABLED) \
5159
--set pipelineBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
@@ -96,20 +104,24 @@ endef
96104

97105
# Function to cleanup helm release
98106
define REMOVE_HELM_RESOURCES
107+
@if helm list --namespace ${MILVUS_KUBERNETES_NAMESPACE} 2>/dev/null | grep -q "milvus-operator" 2>/dev/null; then \
108+
kubectl delete milvus milvus -n milvus >/dev/null 2>&1; \
109+
helm uninstall milvus-operator --namespace ${MILVUS_KUBERNETES_NAMESPACE}; \
110+
kubectl delete namespace ${MILVUS_KUBERNETES_NAMESPACE}; \
111+
fi
99112
@if helm list --namespace ${MINIO_KUBERNETES_NAMESPACE} 2>/dev/null | grep -q "operator" 2>/dev/null; then \
100113
helm uninstall operator --namespace ${MINIO_KUBERNETES_NAMESPACE}; \
101114
helm uninstall tenant --namespace ${MINIO_KUBERNETES_NAMESPACE}; \
102115
kubectl delete namespace ${MINIO_KUBERNETES_NAMESPACE}; \
103116
fi
104-
@if helm list --namespace ${MILVUS_KUBERNETES_NAMESPACE} 2>/dev/null | grep -q "milvus-operator" 2>/dev/null; then \
105-
kubectl delete milvus milvus -n milvus >/dev/null 2>&1; \
106-
helm uninstall milvus-operator --namespace ${MILVUS_KUBERNETES_NAMESPACE}; \
107-
kubectl delete namespace ${MILVUS_KUBERNETES_NAMESPACE}; \
117+
@if helm list --namespace ${TEMPORAL_KUBERNETES_NAMESPACE} 2>/dev/null | grep -q "temporal" 2>/dev/null; then \
118+
helm uninstall temporal --namespace ${TEMPORAL_KUBERNETES_NAMESPACE}; \
119+
kubectl delete namespace ${TEMPORAL_KUBERNETES_NAMESPACE}; \
108120
fi
109121
@# Remove Helm release
110-
@if helm list --namespace ${HELM_NAMESPACE} 2>/dev/null | grep -q "${HELM_RELEASE_NAME}" 2>/dev/null; then \
111-
helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE}; \
112-
kubectl delete namespace ${HELM_NAMESPACE}; \
122+
@if helm list --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} 2>/dev/null | grep -q "${INSTILL_CORE_HELM_RELEASE_NAME}" 2>/dev/null; then \
123+
helm uninstall ${INSTILL_CORE_HELM_RELEASE_NAME} --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE}; \
124+
kubectl delete namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE}; \
113125
ps aux | grep "[k]ubectl port-forward" | awk '{print $$2}' | xargs -r kill -9 2>/dev/null || true; \
114126
fi
115127
endef
@@ -131,13 +143,13 @@ endef
131143
# Function to run Helm backend integration test
132144
define HELM_INTEGRATION_TEST
133145
@$(MAKE) helm-run CI=true
134-
@bash -c 'while [[ "$$(kubectl get pods --namespace ${HELM_NAMESPACE} -l app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core -o jsonpath={..status.phase})" != *"Running"* ]]; do \
135-
echo "$$(kubectl get pods --namespace ${HELM_NAMESPACE})"; \
146+
@bash -c 'while [[ "$$(kubectl get pods --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} -l app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core -o jsonpath={..status.phase})" != *"Running"* ]]; do \
147+
echo "$$(kubectl get pods --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE})"; \
136148
sleep 10; \
137149
done; \
138-
echo "$$(kubectl get pods --namespace ${HELM_NAMESPACE})"'
139-
@kubectl --namespace ${HELM_NAMESPACE} port-forward $$(kubectl get pods --namespace ${HELM_NAMESPACE} -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
140-
@kubectl --namespace ${HELM_NAMESPACE} port-forward $$(kubectl get pods --namespace ${HELM_NAMESPACE} -l "app.kubernetes.io/component=database,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") ${POSTGRESQL_PORT}:${POSTGRESQL_PORT} > /dev/null 2>&1 &
150+
echo "$$(kubectl get pods --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE})"'
151+
@kubectl --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} port-forward $$(kubectl get pods --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
152+
@kubectl --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} port-forward $$(kubectl get pods --namespace ${INSTILL_CORE_KUBERNETES_NAMESPACE} -l "app.kubernetes.io/component=database,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") ${POSTGRESQL_PORT}:${POSTGRESQL_PORT} > /dev/null 2>&1 &
141153
@echo "Waiting for port-forwarding to be ready..."
142154
@timeout=120; \
143155
while ! nc -z localhost ${API_GATEWAY_PORT} >/dev/null 2>&1 || ! nc -z localhost ${POSTGRESQL_PORT} >/dev/null 2>&1; do \

charts/core/Chart.lock

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ dependencies:
88
- name: ray-cluster
99
repository: https://ray-project.github.io/kuberay-helm
1010
version: 1.3.2
11-
- name: elasticsearch
12-
repository: https://helm.elastic.co
13-
version: 8.5.1
1411
- name: opentelemetry-collector
1512
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
1613
version: 0.129.0
1714
- name: kube-prometheus-stack
1815
repository: https://prometheus-community.github.io/helm-charts
1916
version: 70.3.0
20-
digest: sha256:2ebc6024831a9f7066305f92fc6fda9f9f6de6dc9b13302f2b36030804ae8675
21-
generated: "2025-08-01T02:23:16.271247+01:00"
17+
digest: sha256:558768b45afe203a97d32d5c894b6b62afe81abfb5c0c32b333d9b9b7578f262
18+
generated: "2025-08-02T02:09:25.778758+01:00"

charts/core/Chart.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ dependencies:
3030
repository: https://ray-project.github.io/kuberay-helm
3131
version: 1.3.2
3232
condition: ray-cluster.enabled
33-
- name: elasticsearch
34-
repository: https://helm.elastic.co
35-
version: 8.5.1
36-
condition: elasticsearch.enabled
3733
- name: opentelemetry-collector
3834
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
3935
version: 0.129.0

charts/core/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ The Helm chart of Instill Core
88

99
| Repository | Name | Version |
1010
|------------|------|---------|
11-
| https://helm.elastic.co | elasticsearch | 8.5.1 |
1211
| https://helm.influxdata.com | influxdb2 | 2.1.1 |
1312
| https://open-telemetry.github.io/opentelemetry-helm-charts | opentelemetry-collector | 0.129.0 |
1413
| https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 70.3.0 |

charts/core/templates/_helpers.tpl

Lines changed: 15 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -170,71 +170,6 @@ console
170170
{{- printf "3000" -}}
171171
{{- end -}}
172172

173-
{{/*
174-
Temporal
175-
*/}}
176-
{{- define "core.temporal" -}}
177-
{{- printf "%s-temporal" (include "core.fullname" .) -}}
178-
{{- end -}}
179-
180-
{{- define "core.temporal.admintools" -}}
181-
{{- printf "%s-temporal-admintools" (include "core.fullname" .) -}}
182-
{{- end -}}
183-
184-
{{- define "core.temporal.ui" -}}
185-
{{- printf "%s-temporal-ui" (include "core.fullname" .) -}}
186-
{{- end -}}
187-
188-
{{/* Temporal container frontend gRPC port */}}
189-
{{- define "core.temporal.frontend.grpcPort" -}}
190-
{{- printf "7233" -}}
191-
{{- end -}}
192-
193-
{{/* Temporal container frontend membership port */}}
194-
{{- define "core.temporal.frontend.membershipPort" -}}
195-
{{- printf "6933" -}}
196-
{{- end -}}
197-
198-
{{/* Temporal container history gRPC port */}}
199-
{{- define "core.temporal.history.grpcPort" -}}
200-
{{- printf "7234" -}}
201-
{{- end -}}
202-
203-
{{/* Temporal container history membership port */}}
204-
{{- define "core.temporal.history.membershipPort" -}}
205-
{{- printf "6934" -}}
206-
{{- end -}}
207-
208-
{{/* Temporal container matching gRPC port */}}
209-
{{- define "core.temporal.matching.grpcPort" -}}
210-
{{- printf "7235" -}}
211-
{{- end -}}
212-
213-
{{/* Temporal container matching membership port */}}
214-
{{- define "core.temporal.matching.membershipPort" -}}
215-
{{- printf "6935" -}}
216-
{{- end -}}
217-
218-
{{/* Temporal container worker gRPC port */}}
219-
{{- define "core.temporal.worker.grpcPort" -}}
220-
{{- printf "7239" -}}
221-
{{- end -}}
222-
223-
{{/* Temporal container worker membership port */}}
224-
{{- define "core.temporal.worker.membershipPort" -}}
225-
{{- printf "6939" -}}
226-
{{- end -}}
227-
228-
{{/* Temporal web container port */}}
229-
{{- define "core.temporal.ui.port" -}}
230-
{{- printf "8088" -}}
231-
{{- end -}}
232-
233-
{{/* temporal metrics core at the service using the SDK */}}
234-
{{- define "core.temporal.metrics.port" -}}
235-
{{- printf "8096" -}}
236-
{{- end -}}
237-
238173
{{/*
239174
KubeRay
240175
*/}}
@@ -518,6 +453,21 @@ Allow KubeVersion to be overridden.
518453
{{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}}
519454
{{- end -}}
520455

456+
{{/*
457+
Temporal
458+
*/}}
459+
{{- define "temporal.host" -}}
460+
{{- printf "temporal-frontend-headless.temporal.svc.cluster.local" -}}
461+
{{- end -}}
462+
463+
{{- define "temporal.frontend.grpcPort" -}}
464+
{{- printf "7233" -}}
465+
{{- end -}}
466+
467+
{{- define "temporal.frontend.metricsPort" -}}
468+
{{- printf "9090" -}}
469+
{{- end -}}
470+
521471
{{/*
522472
MinIO
523473
*/}}

charts/core/templates/api-gateway/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ spec:
8282
until tctl cluster health 2>&1 > /dev/null; do echo waiting for Temporal; sleep 2; done
8383
env:
8484
- name: TEMPORAL_CLI_ADDRESS
85-
value: "{{ include "core.temporal" . }}-frontend:{{ include "core.temporal.frontend.grpcPort" . }}"
85+
value: "{{ include "temporal.host" . }}:{{ include "temporal.frontend.grpcPort" . }}"
8686
{{- end }}
8787
{{- with .Values.apiGateway.extraInitContainers }}
8888
{{- toYaml . | nindent 8 }}

charts/core/templates/mgmt-backend/configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ data:
7474
replicationtimeframe: 1
7575
{{- end }}
7676
temporal:
77-
hostport: {{ default (printf "%s-frontend-headless:%s" (include "core.temporal" .) (include "core.temporal.frontend.grpcPort" .)) .Values.mgmtBackend.temporal.hostPort }}
77+
hostport: {{ default (printf "%s:%s" (include "temporal.host" .) (include "temporal.frontend.grpcPort" .)) .Values.mgmtBackend.temporal.hostPort }}
7878
namespace: {{ default "mgmt-backend" .Values.mgmtBackend.temporal.namespace }}
7979
serverrootca: {{ default "" .Values.mgmtBackend.temporal.serverRootCA }}
8080
clientcert: {{ default "" .Values.mgmtBackend.temporal.clientCert }}
8181
clientkey: {{ default "" .Values.mgmtBackend.temporal.clientKey }}
8282
serverName: {{ default "" .Values.mgmtBackend.temporal.serverName }}
8383
insecureskipverify: {{ default "true" .Values.mgmtBackend.temporal.insecureSkipVerify }}
84+
metricsport: {{ include "temporal.frontend.metricsPort" . }}

charts/core/templates/mgmt-backend/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec:
8080
if [[ ! $(tctl --namespace mgmt-backend namespace list | grep mgmt-backend) ]]; then tctl --namespace mgmt-backend namespace register; fi
8181
env:
8282
- name: TEMPORAL_CLI_ADDRESS
83-
value: "{{ include "core.temporal" . }}-frontend:{{ include "core.temporal.frontend.grpcPort" . }}"
83+
value: "{{ include "temporal.host" . }}:{{ include "temporal.frontend.grpcPort" . }}"
8484
{{- end }}
8585
{{- if .Values.isPrimaryCluster }}
8686
- name: mgmt-backend-migration

0 commit comments

Comments
 (0)