From 2dbe81e3f58eded6b8d3def8fc450f1f69a3c9ac Mon Sep 17 00:00:00 2001 From: Anton Fofanov Date: Mon, 9 Dec 2024 10:47:06 +0100 Subject: [PATCH 1/2] PEK-851 legg til unleash api-token --- .nais/nais-dev-gcp.yaml | 2 ++ .nais/nais-prod-gcp.yaml | 2 ++ .nais/unleash-apitoken-dev.yaml | 14 ++++++++++++++ .nais/unleash-apitoken-prod.yaml | 14 ++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 .nais/unleash-apitoken-dev.yaml create mode 100644 .nais/unleash-apitoken-prod.yaml diff --git a/.nais/nais-dev-gcp.yaml b/.nais/nais-dev-gcp.yaml index a3475fa8..d6b8d02a 100644 --- a/.nais/nais-dev-gcp.yaml +++ b/.nais/nais-dev-gcp.yaml @@ -122,6 +122,8 @@ spec: value: api://dev-fss.pensjonselvbetjening.pensjon-selvbetjening-fss-gateway/.default - name: OTEL_RESOURCE_ATTRIBUTES value: deployment.environment.name=q2 + envFrom: + - secret: tjenestepensjon-simulering-unleash-api-token prometheus: enabled: true path: actuator/prometheus diff --git a/.nais/nais-prod-gcp.yaml b/.nais/nais-prod-gcp.yaml index 3751c341..bd1249aa 100644 --- a/.nais/nais-prod-gcp.yaml +++ b/.nais/nais-prod-gcp.yaml @@ -96,6 +96,8 @@ spec: value: api://prod-fss.pensjonselvbetjening.pensjon-selvbetjening-fss-gateway/.default - name: OTEL_RESOURCE_ATTRIBUTES value: deployment.environment.name=p + envFrom: + - secret: tjenestepensjon-simulering-unleash-api-token prometheus: enabled: true path: actuator/prometheus diff --git a/.nais/unleash-apitoken-dev.yaml b/.nais/unleash-apitoken-dev.yaml new file mode 100644 index 00000000..7fba1f35 --- /dev/null +++ b/.nais/unleash-apitoken-dev.yaml @@ -0,0 +1,14 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: tjenestepensjon-simulering + namespace: pensjonskalkulator + labels: + team: pensjonskalkulator +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: pensjonskalkulator + secretName: tjenestepensjon-simulering-unleash-api-token + environment: development \ No newline at end of file diff --git a/.nais/unleash-apitoken-prod.yaml b/.nais/unleash-apitoken-prod.yaml new file mode 100644 index 00000000..41691697 --- /dev/null +++ b/.nais/unleash-apitoken-prod.yaml @@ -0,0 +1,14 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: tjenestepensjon-simulering + namespace: pensjonskalkulator + labels: + team: pensjonskalkulator +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: pensjonskalkulator + secretName: tjenestepensjon-simulering-unleash-api-token + environment: production \ No newline at end of file From 7d890cffbb85604b7efd9bca35913de0074ba1b4 Mon Sep 17 00:00:00 2001 From: Anton Fofanov Date: Mon, 9 Dec 2024 12:28:46 +0100 Subject: [PATCH 2/2] PEK-851 deploy unleash api-token resource to nais --- .github/workflows/deploy_prod.yaml | 2 +- .github/workflows/manual_deploy_dev.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_prod.yaml b/.github/workflows/deploy_prod.yaml index 06c6c0ec..089ba749 100644 --- a/.github/workflows/deploy_prod.yaml +++ b/.github/workflows/deploy_prod.yaml @@ -59,5 +59,5 @@ jobs: name: Deploy to prod env: CLUSTER: prod-gcp - RESOURCE: .nais/nais-prod-gcp.yaml + RESOURCE: .nais/nais-prod-gcp.yaml,unleash-apitoken-prod.yaml IMAGE: ${{ needs.build.outputs.image }} diff --git a/.github/workflows/manual_deploy_dev.yaml b/.github/workflows/manual_deploy_dev.yaml index 863409f2..295469f3 100644 --- a/.github/workflows/manual_deploy_dev.yaml +++ b/.github/workflows/manual_deploy_dev.yaml @@ -57,5 +57,5 @@ jobs: - uses: nais/deploy/actions/deploy@v2 env: CLUSTER: dev-gcp - RESOURCE: .nais/nais-dev-gcp.yaml + RESOURCE: .nais/nais-dev-gcp.yaml,.nais/unleash-apitoken-dev.yaml IMAGE: ${{ needs.build.outputs.image }}