Skip to content

Commit 9d32649

Browse files
beam secrets for credentials (replace since ADC has had issues)
1 parent 6d97363 commit 9d32649

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

helm/beametl/templates/deployment.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@ spec:
2222
labels:
2323
app: beampod
2424
spec:
25+
volumes:
26+
- name: servacc-vol
27+
secret:
28+
secretName: servacc-creds
2529
containers:
2630
#assumes GCP ADC is provided on the GKE cluster's pods for pubsub/bigtable access
2731
- name: beametl-container
2832
image: {{ .Values.image }}
33+
#requires a file named "/secrets/ac.json" with service-acc creds
34+
volumeMounts:
35+
- name: servacc-vol
36+
mountPath: /secrets
37+
readOnly: true
2938
resources:
3039
{{- with .Values.resourceOptions }}
3140
requests:
@@ -41,5 +50,5 @@ spec:
4150
{{- end }}
4251
envFrom:
4352
- configMapRef:
44-
name: beametl-conf
53+
name: beametl-conf
4554
---

services/beampipeline/pipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def getargs():
5757

5858
def main():
5959
# (optional - auth with credentials sa file) (recommended - ADC)
60-
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "<path-to-sa-credentials>"
60+
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/secrets/ac.json"
6161
known_args, pipeline_args = getargs()
6262
pipeOpts = PipelineOptions(
6363
streaming=True,
@@ -81,4 +81,5 @@ def main():
8181
table_id=known_args.table)
8282
)
8383

84+
8485
main()

taskfile.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,21 @@ tasks:
9494
cmds:
9595
- helm install verne verne/verne -n verne -f ./dev-values.yaml
9696

97-
verne-helm-deploy-prod:
97+
helm-verne-deploy-prod:
9898
desc: deploy verne helm package for prod (GKE cluster)
9999
cmds:
100100
- helm install verne verne/verne -n verne -f ./k8s/prod/verne/prod-values.yaml
101101

102-
beametl-helm-deploy-prod:
102+
helm-beametl-deploy-prod:
103103
desc: deploy beametl helm package for prod (GKE cluster)
104104
cmds:
105105
- helm install beametl beametl/beametl -n beametl -f ./k8s/prod/beametl/values.yaml
106106

107+
helm-beametl-update-prod:
108+
desc: update beametl after values/chart changes in helm
109+
cmds:
110+
- helm upgrade beametl beametl/beametl -n beametl -f ./k8s/prod/beametl/values.yaml
111+
107112
verne-get-ip:
108113
desc: get verne broker load balancer IP to access
109114
cmds:

0 commit comments

Comments
 (0)