diff --git a/templates/api/api-config.yaml b/templates/api/api-config.yaml index 1a3ee02009c469d69667e2947ce72f59c01b7be2..d19846f4b1e8ecb9a91e38072cf33a64b04a93bb 100644 --- a/templates/api/api-config.yaml +++ b/templates/api/api-config.yaml @@ -4,6 +4,6 @@ kind: ConfigMap metadata: name: {{ include "MyAppCtx.fullname" . }}-api-config data: - DB_ENDPOINT: "postgres:5432" - DB_NAME: "{{ .Values.name }}-db" + DB_ENDPOINT: "{{ include "MyAppCtx.fullname" . }}-service:5432" + DB_NAME: "computerdb-db" {{- end}} diff --git a/templates/api/api-deployment.yaml b/templates/api/api-deployment.yaml index 706f493f88ddde684d0f958a16208306a8f81544..276926efc1e9af46287d5735ae61150163cb022e 100644 --- a/templates/api/api-deployment.yaml +++ b/templates/api/api-deployment.yaml @@ -14,6 +14,9 @@ spec: metadata: labels: app: {{ include "MyAppCtx.fullname" . }}-api + annotations: + checksum/config: {{ include (print $.Template.BasePath "/api/api-config.yaml") . | sha256sum }} + checksum/config-db: {{ include (print $.Template.BasePath "/database/pg-config.yaml") . | sha256sum }} spec: securityContext: runAsUser: 1001 diff --git a/templates/database/pg-config.yaml b/templates/database/pg-config.yaml index 7c118c9854ba62b3e93a02280d4fbb1af7ebd7a1..ad40444e0e667e54d706ee3a5c6c6b09aced8041 100644 --- a/templates/database/pg-config.yaml +++ b/templates/database/pg-config.yaml @@ -4,6 +4,6 @@ kind: ConfigMap metadata: name: {{ include "MyAppCtx.fullname" . }}-pg-config data: - db_name: "{{ .Values.name }}-db" + db_name: "computerdb-db" db_path: "/var/lib/postgresql/data/pgdata" {{- end}} diff --git a/templates/database/pg-deployment.yaml b/templates/database/pg-deployment.yaml index d6d5524975c88d17905afeb263b6a5357b45a2bd..0dc10cd76a9fc59f7f11bc40e701a9170d505808 100644 --- a/templates/database/pg-deployment.yaml +++ b/templates/database/pg-deployment.yaml @@ -14,6 +14,8 @@ spec: metadata: labels: app: {{ include "MyAppCtx.fullname" . }}-pg + annotations: + checksum/config: {{ include (print $.Template.BasePath "/database/pg-config.yaml") . | sha256sum }} spec: containers: - name: postgres diff --git a/templates/front/front-deployment.yaml b/templates/front/front-deployment.yaml index fe164b0aba871d60b98838d26513e37ea101f51a..9c288703fa236aabfa18b678602ee87dab0546ad 100644 --- a/templates/front/front-deployment.yaml +++ b/templates/front/front-deployment.yaml @@ -14,6 +14,8 @@ spec: metadata: labels: app: {{ include "MyAppCtx.fullname" . }}-front + annotations: + checksum/config: {{ include (print $.Template.BasePath "/front/front-config.yaml") . | sha256sum }} spec: imagePullSecrets: - name: takima-school-registry diff --git a/values.staging.yaml b/values.staging.yaml new file mode 100644 index 0000000000000000000000000000000000000000..169b5b37e658902938191ba488b20a0a827cda1a --- /dev/null +++ b/values.staging.yaml @@ -0,0 +1,13 @@ +# Default values for CDB app. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +# We have only done front for now +nameOverride: cdb-stage + +api: + ingress: + host: api-staging.lherve.takima.school + +front: + ingress: + host: www-staging.lherve.takima.school \ No newline at end of file