diff --git a/helm-msa/templates/deployment/myaktion-postgres-db-deployment.yaml b/helm-msa/templates/deployment/myaktion-db-deployment.yaml similarity index 66% rename from helm-msa/templates/deployment/myaktion-postgres-db-deployment.yaml rename to helm-msa/templates/deployment/myaktion-db-deployment.yaml index e9f698fa3b22354f96030bd8ba63d2b8c31d79d3..c191506df24e3df5ed4c43b222fad22fcfdbad11 100644 --- a/helm-msa/templates/deployment/myaktion-postgres-db-deployment.yaml +++ b/helm-msa/templates/deployment/myaktion-db-deployment.yaml @@ -1,21 +1,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: myaktion-postgres-db + name: myaktion-db spec: replicas: 1 selector: matchLabels: - app: myaktion-postgres-db + app: myaktion-db template: metadata: annotations: linkerd.io/inject: enabled labels: - app: myaktion-postgres-db + app: myaktion-db spec: containers: - - name: myaktion-postgres-db + - name: myaktion-db image: postgres:14.5 imagePullPolicy: IfNotPresent ports: @@ -24,17 +24,17 @@ spec: - name: POSTGRES_USER valueFrom: secretKeyRef: - name: user-db-secret + name: myaktion-db-secret key: DATABASE_USER - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: user-db-secret + name: usmyaktioner-db-secret key: DATABASE_PASSWORD volumeMounts: - mountPath: /var/lib/postgresql/data - name: myaktion-postgres-db-pv-claim + name: myaktion-db-pv-claim volumes: - - name: myaktion-postgres-db-pv-claim + - name: myaktion-db-pv-claim persistentVolumeClaim: - claimName: myaktion-postgres-db-pv-claim \ No newline at end of file + claimName: myaktion-db-pv-claim \ No newline at end of file diff --git a/helm-msa/templates/deployment/myaktion-deployment.yaml b/helm-msa/templates/deployment/myaktion-deployment.yaml index 4af59080b76286e1ff9ca64e9ac9402a43ace369..6d1bf3b9fb9f5a07a1c5adc851cbac0c0e486549 100644 --- a/helm-msa/templates/deployment/myaktion-deployment.yaml +++ b/helm-msa/templates/deployment/myaktion-deployment.yaml @@ -27,3 +27,13 @@ spec: value: "http://myaktion-monitor-service/donations" - name: SPRING_REDIS_HOST value: "redis-service" + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + name: user-db-secret + key: DATABASE_USER + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: user-db-secret + key: DATABASE_PASSWORD diff --git a/helm-msa/templates/persistent_volume/myaktion-postgres-db-storage.yml b/helm-msa/templates/persistent_volume/myaktion-db-storage.yml similarity index 79% rename from helm-msa/templates/persistent_volume/myaktion-postgres-db-storage.yml rename to helm-msa/templates/persistent_volume/myaktion-db-storage.yml index 77dcd99fd0cef6a8a5dc5769cd0f57d1be32a68d..dde606ef87e206c3bc60cdb8203db1af385a45c9 100644 --- a/helm-msa/templates/persistent_volume/myaktion-postgres-db-storage.yml +++ b/helm-msa/templates/persistent_volume/myaktion-db-storage.yml @@ -1,7 +1,7 @@ kind: PersistentVolume apiVersion: v1 metadata: - name: myaktion-postgres-db-pv + name: myaktion-db-pv labels: type: local spec: @@ -17,8 +17,8 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: - app: myaktion-postgres-db - name: myaktion-postgres-db-pv-claim + app: myaktion-db + name: myaktion-db-pv-claim spec: storageClassName: standard accessModes: diff --git a/helm-msa/templates/secret/myaktion-db-secret.yml b/helm-msa/templates/secret/myaktion-db-secret.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3cce28a6f377a3f2d11e1bee6f8afe9e0494545 --- /dev/null +++ b/helm-msa/templates/secret/myaktion-db-secret.yml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: myaktion-db-secret +data: + DATABASE_USER: dXNlcjE= + DATABASE_PASSWORD: cGFzc3dvcmQx \ No newline at end of file diff --git a/helm-msa/templates/service_profile/server-test-service-profile.yml b/helm-msa/templates/service_profile/myaktion-service-profile.yml similarity index 90% rename from helm-msa/templates/service_profile/server-test-service-profile.yml rename to helm-msa/templates/service_profile/myaktion-service-profile.yml index 5dfc7b7d08a275d33b04aa82d1921bcaa91b7cae..8c5eeacb4208efefe0c4553964bede7a635e7a26 100644 --- a/helm-msa/templates/service_profile/server-test-service-profile.yml +++ b/helm-msa/templates/service_profile/myaktion-service-profile.yml @@ -2,7 +2,7 @@ apiVersion: linkerd.io/v1alpha2 kind: ServiceProfile metadata: creationTimestamp: null - name: server-test-service-profile + name: myaktion-service-profile namespace: default spec: routes: