Skip to content

Commit

Permalink
fix: add db connection details to celery deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Salaton committed Apr 15, 2024
1 parent 8225ca6 commit 418a11d
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ env:
jobs:
deploy_to_testing:
name: Deploy testing server to google kubernetes engine
if: ${{ github.ref == 'refs/heads/develop'}}
if: ${{ github.ref == 'refs/heads/celery-fixes'}}
runs-on: ubuntu-latest
environment:
name: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,43 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}

- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,43 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}

- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,44 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}


- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,43 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}

- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,43 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}

- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,43 @@ spec:
value: {{ .Values.app.container.env.redisPort | quote }}

- name: DEBUG
value: {{ .Values.app.container.env.debug | quote }}
value: {{ .Values.app.container.env.debug | quote }}

- name: DB_HOST
value: {{ .Values.app.container.env.dbHost | quote }}

- name: DB_PORT
value: {{ .Values.app.container.env.dbPort | quote }}

- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: DB_PASSWORD
value: {{ .Values.app.container.env.dbPassword | quote }}

- name: API_HOST
value: {{ .Values.app.container.env.redisHost | quote }}

- name: API_PORT
value: {{ .Values.app.container.env.redisPort | quote }}

- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.33.2
command: [
"/cloud_sql_proxy",
"-instances={{ .Values.app.container.env.databaseInstanceConnectionName }}=tcp:5432",
"-credential_file={{ .Values.app.container.env.googleApplicationCredentialsSecret.filePath }}"]

securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
readOnly: true

volumes:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
secret:
secretName: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}

0 comments on commit 418a11d

Please sign in to comment.