Skip to content

Commit

Permalink
Update helm chart to include proxy deployment (#174)
Browse files Browse the repository at this point in the history
Add proxy service to helm chart

Co-authored-by: Luke Lombardi <[email protected]>
  • Loading branch information
luke-lombardi and Luke Lombardi authored Apr 30, 2024
1 parent 98b4b5f commit 99431ef
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 5 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/release-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
registry-type: public
mask-password: 'true'

- name: Build and push container image to Amazon ECR
- name: Build and push gateway container image to Amazon ECR
uses: docker/build-push-action@v5
with:
file: ./docker/Dockerfile.gateway
Expand All @@ -64,6 +64,17 @@ jobs:
${{ steps.login-ecr.outputs.registry }}/n4e0e1y0/beta9-gateway:latest
target: release
platforms: linux/amd64

- name: Build and push proxy container image to Amazon ECR
uses: docker/build-push-action@v5
with:
file: ./docker/Dockerfile.proxy
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/n4e0e1y0/beta9-proxy:${{ steps.set-version.outputs.app_version }}
${{ steps.login-ecr.outputs.registry }}/n4e0e1y0/beta9-proxy:latest
target: release
platforms: linux/amd64

- name: Package and push Helm chart to Amazon ECR
env:
Expand Down
6 changes: 3 additions & 3 deletions deploy/charts/beta9/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 2.5.0
- name: beam-blobcache-chart
repository: oci://public.ecr.aws/n4e0e1y0
version: 0.1.0
version: 0.1.1
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 18.9.1
Expand All @@ -29,5 +29,5 @@ dependencies:
- name: fluent-bit
repository: https://fluent.github.io/helm-charts
version: 0.43.0
digest: sha256:e49708089b6f7bc39642e2097318a1332b861a1efb3d9402d6d80836620d7c9b
generated: "2024-02-09T11:44:51.71411-05:00"
digest: sha256:17271b1ca6c3380af46d27e5c547912200b4135e2a44de7defc3632926b83080
generated: "2024-04-30T14:51:10.219492-04:00"
13 changes: 13 additions & 0 deletions deploy/charts/beta9/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ controllers:
port: 1994
securityContext:
privileged: true
proxy:
type: deployment
containers:
main:
command:
- /usr/local/bin/proxy
image:
repository: {{ .Values.images.proxy.repository }}
tag: "{{ .Values.images.proxy.tag | default .Chart.AppVersion }}"
pullPolicy: {{ .Values.images.proxy.pullPolicy | default "IfNotPresent" }}
securityContext:
privileged: true
hostNetwork: true
service:
gateway:
controller: gateway
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/beta9/values.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ images:
repository: registry.localhost:5000/beta9-gateway
tag: latest
pullPolicy: Always
proxy:
repository: registry.localhost:5000/beta9-proxy
tag: latest
pullPolicy: Always

service:
gateway:
Expand Down
26 changes: 25 additions & 1 deletion deploy/charts/beta9/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ images:
repository: public.ecr.aws/n4e0e1y0/beta9-gateway
tag: # Defaults to chart's app version
pullPolicy: # Defaults to IfNotPresent
proxy:
repository: public.ecr.aws/n4e0e1y0/beta9-proxy
tag: # Defaults to chart's app version
pullPolicy: # Defaults to IfNotPresent

controllers:
gateway:
Expand All @@ -33,7 +37,27 @@ controllers:
until nc -z redis-master.beta9 6379; do echo "Waiting on Redis..."; sleep 2; done;
until nc -z juicefs-redis-master.beta9 6379; do echo "Waiting on Redis (JuiceFS)..."; sleep 2; done;
echo "All systems ready!"
proxy:
enabled: false
annotations: {}
labels: {}
replicas: 1
strategy: Recreate # Can be Recreate or RollingUpdate
rollingUpdate:
unavailable:
surge:
initContainers:
wait-on-backends:
image:
repository: busybox
tag: latest
command:
- sh
- -c
- |
until nc -z redis-master.beta9 6379; do echo "Waiting on Redis..."; sleep 2; done;
echo "All systems ready!"
persistence:
images:
enabled: true
Expand Down
2 changes: 2 additions & 0 deletions sdk/src/beta9/runner/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import time
import traceback

import cloudpickle
import grpc
Expand Down Expand Up @@ -174,6 +175,7 @@ def main(channel: Channel):

result = handler(context, *args, **kwargs)
except BaseException as exc:
print(traceback.format_exc())
result = error = exc
task_status = TaskStatus.Error
finally:
Expand Down

0 comments on commit 99431ef

Please sign in to comment.