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 }} 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