From b94c94985bfb6415509fb3fa3237d2e4ff823a30 Mon Sep 17 00:00:00 2001 From: Shirou-kun Date: Mon, 11 Nov 2024 19:22:08 +0900 Subject: [PATCH] fx: secret db name + argo app template name --- iac/pulumi-gcp/infra/k8s-tools/argocd/appset/gitops.yaml | 4 ++-- iac/pulumi-gcp/infra/whisper-notes-db/index.jsonnet | 2 +- iac/services/backend/kustomization.yaml | 1 + iac/services/backend/secret.yaml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iac/pulumi-gcp/infra/k8s-tools/argocd/appset/gitops.yaml b/iac/pulumi-gcp/infra/k8s-tools/argocd/appset/gitops.yaml index 225463bf..823be7d2 100644 --- a/iac/pulumi-gcp/infra/k8s-tools/argocd/appset/gitops.yaml +++ b/iac/pulumi-gcp/infra/k8s-tools/argocd/appset/gitops.yaml @@ -19,11 +19,11 @@ spec: metadata: labels: app.kubernetes.io/component: argo-app - app.kubernetes.io/instance: app-{{ path[1] }} + app.kubernetes.io/instance: app-{{ path[2] }} app.kubernetes.io/managed-by: Argo app.kubernetes.io/part-of: argocd polynomial.fi/environment: production - name: app-{{ path[1] }} + name: app-{{ path[2] }} spec: destination: server: https://kubernetes.default.svc diff --git a/iac/pulumi-gcp/infra/whisper-notes-db/index.jsonnet b/iac/pulumi-gcp/infra/whisper-notes-db/index.jsonnet index 5fc23102..a458718b 100644 --- a/iac/pulumi-gcp/infra/whisper-notes-db/index.jsonnet +++ b/iac/pulumi-gcp/infra/whisper-notes-db/index.jsonnet @@ -81,7 +81,7 @@ instance: '${DbInstance.name}', password: '${DbUserPassword.result}', }, - } + (import '../../lib/secrets/index.libsonnet').CreateSecretData('service-whisper-notes-db', '${secDataWhisperDbCreds}', $.Config), + } + (import '../../lib/secrets/index.libsonnet').CreateSecretData('service-notes-db', '${secDataWhisperDbCreds}', $.Config), outputs: { dbEndpoint: '${DbInstance.privateIpAddress}', dbConnectionString: '${DbInstance.connectionName}', diff --git a/iac/services/backend/kustomization.yaml b/iac/services/backend/kustomization.yaml index 1b657c2c..38e7eaa6 100644 --- a/iac/services/backend/kustomization.yaml +++ b/iac/services/backend/kustomization.yaml @@ -4,6 +4,7 @@ kind: Kustomization resources: - deployment.yaml - service.yaml + - secret.yaml namePrefix: whisper-notes- namespace: default diff --git a/iac/services/backend/secret.yaml b/iac/services/backend/secret.yaml index 9d01c0cb..ace4beeb 100644 --- a/iac/services/backend/secret.yaml +++ b/iac/services/backend/secret.yaml @@ -5,7 +5,7 @@ metadata: spec: dataFrom: - extract: - key: service-whisper-notes-db + key: whisper-prod-service-notes-db refreshInterval: 15s secretStoreRef: kind: ClusterSecretStore