diff --git a/chart/templates/generator-application.yaml b/chart/templates/generator-application.yaml index 814aa11..afea7d7 100644 --- a/chart/templates/generator-application.yaml +++ b/chart/templates/generator-application.yaml @@ -157,7 +157,9 @@ spec: {{- end }} - imagePullPolicy: Always name: tunnel - image: "{{ .Values.tunnel.image }}:{{ .Values.tunnel.tag }}" + image: "{{ .Values.tunnel.image }}:{{ .Values.tunnel.tag }}" + command: + - tcp-over-websocket args: - server - -listen_ws diff --git a/fleet/argo/workflow/fleet.yaml b/fleet/argo/workflow/fleet.yaml index ac58f42..ac3454e 100644 --- a/fleet/argo/workflow/fleet.yaml +++ b/fleet/argo/workflow/fleet.yaml @@ -25,6 +25,9 @@ helm: - key: "node-role.kubernetes.io/etcd" operator: "Exists" controller: + extraEnv: + - name: DEFAULT_REQUEUE_TIME + value: 1s resources: requests: memory: "256Mi" diff --git a/tunnel/Dockerfile b/tunnel/Dockerfile index 55f0233..2d040fd 100644 --- a/tunnel/Dockerfile +++ b/tunnel/Dockerfile @@ -2,8 +2,18 @@ FROM golang:alpine AS builder # Build the binary. RUN go install github.com/trazfr/tcp-over-websocket@latest -FROM scratch +FROM alpine as argo +ADD https://github.com/argoproj/argo-workflows/releases/download/v3.5.2/argo-linux-amd64.gz /argo-linux-amd64.gz +RUN gunzip /argo-linux-amd64.gz +RUN chmod +x argo-linux-amd64 + +ADD aldaas.sh /aldaas +RUN chmod +x /aldaas + +FROM alpine as aldaas # Copy our static executable. -COPY --from=builder /go/bin/tcp-over-websocket /go/bin/tcp-over-websocket +COPY --from=builder /go/bin/tcp-over-websocket /bin/tcp-over-websocket +COPY --from=argo /argo-linux-amd64 /bin/argo +COPY --from=argo /aldaas /bin/aldaas # Run the binary. -ENTRYPOINT ["/go/bin/tcp-over-websocket"] \ No newline at end of file +ENTRYPOINT ["/bin/tcp-over-websocket"] \ No newline at end of file diff --git a/tunnel/aldaas.sh b/tunnel/aldaas.sh new file mode 100644 index 0000000..52ffcf3 --- /dev/null +++ b/tunnel/aldaas.sh @@ -0,0 +1,5 @@ +#!/bin/sh +ALDAAS_NAMESPACE=aldaas +ALDAAS_AWT=aldaas-chart + +argo -n $ALDAAS_NAMESPACE submit --from workflowtemplate/$ALDAAS_AWT --watch \ No newline at end of file