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 17, 2024
1 parent 8225ca6 commit 6e4b940
Show file tree
Hide file tree
Showing 9 changed files with 251 additions and 13 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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ spec:
- name: DB
value: {{ .Values.app.container.env.db | quote }}

- name: ES_HOST
value: {{ .Values.app.container.env.elasticSearchHost | quote }}
- name: ES_HOSTS
value: "fcf2cd805eea4d25b3b0d0f084a7782a.eu-west-1.aws.found.io:443"

- name: ES_PORT
value: {{ .Values.app.container.env.elasticSearchPort | quote }}
- name: ES_USER
value: "elastic"

- name: ES_PASSWORD
value: "XXNHEPFJ7KBzmf3MeeW4h8wF"

- name: ES_SCHEME
value: "https"
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/openconceptlab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ image:
repository: openconceptlab/oclapi2
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "production"
tag: "2.3.69-0de65637"

oclweb:
port: 4000
Expand All @@ -28,7 +28,7 @@ oclweb:
repository: openconceptlab/oclweb2
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "production"
tag: "2.1.107-3d701072"

service:
type: NodePort
Expand Down

0 comments on commit 6e4b940

Please sign in to comment.