diff --git a/.github/workflows/deploy_collab.yml b/.github/workflows/deploy_collab.yml index 4d3ad09cbc..b866d9080c 100644 --- a/.github/workflows/deploy_collab.yml +++ b/.github/workflows/deploy_collab.yml @@ -120,6 +120,12 @@ jobs: export ZED_DO_CERTIFICATE_ID=$(doctl compute certificate list --format ID --no-header) export ZED_IMAGE_ID="registry.digitalocean.com/zed/collab:${GITHUB_SHA}" + export ZED_SERVICE_NAME=collab envsubst < crates/collab/k8s/collab.template.yml | kubectl apply -f - - kubectl -n "$ZED_KUBE_NAMESPACE" rollout status deployment/collab --watch - echo "deployed collab.template.yml to ${ZED_KUBE_NAMESPACE}" + kubectl -n "$ZED_KUBE_NAMESPACE" rollout status deployment/$ZED_SERVICE_NAME --watch + echo "deployed ${ZED_SERVICE_NAME} to ${ZED_KUBE_NAMESPACE}" + + export ZED_SERVICE_NAME=api + envsubst < crates/collab/k8s/collab.template.yml | kubectl apply -f - + kubectl -n "$ZED_KUBE_NAMESPACE" rollout status deployment/$ZED_SERVICE_NAME --watch + echo "deployed ${ZED_SERVICE_NAME} to ${ZED_KUBE_NAMESPACE}" diff --git a/crates/collab/k8s/collab.template.yml b/crates/collab/k8s/collab.template.yml index 9ff7cee9e1..bc05fe5f3d 100644 --- a/crates/collab/k8s/collab.template.yml +++ b/crates/collab/k8s/collab.template.yml @@ -9,7 +9,7 @@ kind: Service apiVersion: v1 metadata: namespace: ${ZED_KUBE_NAMESPACE} - name: collab + name: ${ZED_SERVICE_NAME} annotations: service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443" service.beta.kubernetes.io/do-loadbalancer-certificate-id: ${ZED_DO_CERTIFICATE_ID} @@ -17,7 +17,7 @@ metadata: spec: type: LoadBalancer selector: - app: collab + app: ${ZED_SERVICE_NAME} ports: - name: web protocol: TCP @@ -29,17 +29,17 @@ apiVersion: apps/v1 kind: Deployment metadata: namespace: ${ZED_KUBE_NAMESPACE} - name: collab + name: ${ZED_SERVICE_NAME} spec: replicas: 1 selector: matchLabels: - app: collab + app: ${ZED_SERVICE_NAME} template: metadata: labels: - app: collab + app: ${ZED_SERVICE_NAME} annotations: ad.datadoghq.com/collab.check_names: | ["openmetrics"] @@ -55,7 +55,7 @@ spec: ] spec: containers: - - name: collab + - name: ${ZED_SERVICE_NAME} image: "${ZED_IMAGE_ID}" args: - serve @@ -130,6 +130,26 @@ spec: secretKeyRef: name: blob-store key: bucket + - name: CLICKHOUSE_URL + valueFrom: + secretKeyRef: + name: clickhouse + key: url + - name: CLICKHOUSE_USER + valueFrom: + secretKeyRef: + name: clickhouse + key: user + - name: CLICKHOUSE_PASSWORD + valueFrom: + secretKeyRef: + name: clickhouse + key: password + - name: CLICKHOUSE_DATABASE + valueFrom: + secretKeyRef: + name: clickhouse + key: database - name: INVITE_LINK_PREFIX value: ${INVITE_LINK_PREFIX} - name: RUST_BACKTRACE