Skip to content

Commit

Permalink
feat: exposing worker health endpoint (#49)
Browse files Browse the repository at this point in the history
* feat(EE): exposing worker health endpoint

* fix(EE): setting ubuntu version for lint workflow

* feat: add worker host to helm upgrade in workflow

* feat: use repo variable for worker host

* chore: adding worker host to list of hosts

* chore: changed worker path from health to regex

* feat: added multiwoven worker service

* chore: fixed indentation

* fix: ports format in worker service

* fix: removed trailing spaces in values

* fix: wrong ingress service name for worker

* fix: only expose the health endpoint for the worker

* fix: regex for path instead of hardcoded health path

* fix: revert to specific path definition

* fix: reverting path defintion for worker service in ingress
  • Loading branch information
RafaelOAiSquared authored Oct 21, 2024
1 parent 3afad04 commit ff61eb5
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ jobs:
use-kubelogin: 'true'

- name: Deploy chart to staging
env:
WORKER_HOST: ${{ vars.WORKER_HOST }}
run: |
helm upgrade -i --reuse-values multiwoven ./charts/multiwoven
helm upgrade -i --reuse-values multiwoven ./charts/multiwoven \
--set multiwovenConfig.workerHost=$WORKER_HOST
kubectl rollout restart deployment/multiwoven-worker -n multiwoven
kubectl rollout restart deployment/multiwoven-server -n multiwoven
kubectl rollout restart deployment/multiwoven-ui -n multiwoven
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
lint-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions charts/multiwoven/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: multiwoven
description: Open-source reverse ETL, an alternative to Hightouch, Census etc. 🔥
type: application
version: 0.29.0
appVersion: "0.29.0"
version: 0.30.0
appVersion: "0.30.0"
maintainers:
- name: subintp
- name: RafaelOAiSquared
Expand Down
11 changes: 11 additions & 0 deletions charts/multiwoven/templates/multiwoven-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
- hosts:
- {{ .Values.multiwovenConfig.uiHost }}
- {{ .Values.multiwovenConfig.apiHost }}
- {{ .Values.multiwovenConfig.workerHost }}
{{ if .Values.temporal.enabled }}
- {{ .Values.multiwovenConfig.temporalUiHost }}
{{ end }}
Expand All @@ -45,6 +46,16 @@ spec:
name: '{{ include "chart.fullname" . }}-server'
port:
number: {{ (index .Values.multiwovenServer.ports 0).port }}
- host: {{ .Values.multiwovenConfig.workerHost }}
http:
paths:
- path: /(.*)
pathType: Prefix
backend:
service:
name: '{{ include "chart.fullname" . }}-worker'
port:
number: {{ .Values.multiwovenWorker.healthPort }}
{{ if .Values.temporal.enabled }}
- host: {{ .Values.multiwovenConfig.temporalUiHost }}
http:
Expand Down
19 changes: 19 additions & 0 deletions charts/multiwoven/templates/multiwoven-worker-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "chart.fullname" . }}-worker
namespace: {{ .Values.kubernetesNamespace }}

labels:
io.kompose.service: {{ include "chart.fullname" . }}-worker
{{- include "chart.labels" . | nindent 4 }}
annotations:
kompose.cmd: kompose convert
kompose.version: 1.32.0 (HEAD)
spec:
type: {{ .Values.multiwovenWorker.type }}
selector:
io.kompose.service: {{ include "chart.fullname" . }}-worker
{{- include "chart.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.multiwovenWorker.ports | toYaml | nindent 2 -}}
6 changes: 6 additions & 0 deletions charts/multiwoven/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ multiwovenConfig:
viteBrandColor: ""
viteBrandHoverColor: ""
viteFavIconUrl: ""
workerHost: worker.multiwoven.com

hpa:
enabled: true
Expand Down Expand Up @@ -229,7 +230,12 @@ multiwovenWorker:
requests:
cpu: "500m"
memory: 1Gi
ports:
- name: "4567"
port: 4567
targetPort: 4567
replicas: 1
type: ClusterIP
pvc:
pvc:
storageRequest: 100Mi
Expand Down

0 comments on commit ff61eb5

Please sign in to comment.