Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Legger til unleash-apitoken workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jstnhlj committed Dec 1, 2023
1 parent d864920 commit 120e1ad
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,23 @@ jobs:
RESOURCE: nais/nais-prod-gcp.yaml,nais/connector.yaml
REF: ${{ env.COMMIT }}
VAR: image=${{ needs.build.outputs.image }},topic=arbeidssoker-profilert-v2,kafka=prod-gcp,project=paw-prod-7151

apply-apitoken-unleash:
name: Legger til ApiToken for Unleash
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: deploy to dev
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/unleash-apitoken-dev.yaml
- name: deploy to prod
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: nais/unleash-apitoken-prod.yaml
7 changes: 5 additions & 2 deletions nais/nais-dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ spec:
prometheus:
enabled: true
path: /internal/metrics
envFrom:
- secret: paw-arbeidssoker-profilering-unleash-api-token
env:
- name: KAFKA_CONSUMER_ARBEIDSSOKER_REGISTERING_TOPIC
value: paw.arbeidssoker-registrert-v2
Expand All @@ -40,8 +42,8 @@ spec:
value: https://aareg-services-q1.dev-fss-pub.nais.io/api/v1/arbeidstaker/arbeidsforhold
- name: AAREG_SCOPE
value: api://dev-fss.arbeidsforhold.aareg-services-nais-q1/.default
- name: UNLEASH_URL
value: https://unleash.nais.io/api/
- name: UNLEASH_SERVER_API_URL
value: https://paw-unleash-api.nav.cloud.nais.io/api
resources:
limits:
cpu: '3'
Expand All @@ -61,6 +63,7 @@ spec:
cluster: dev-fss
external:
- host: aareg-services-q1.dev-fss-pub.nais.io
- host: paw-unleash-api.nav.cloud.nais.io
gcp:
sqlInstances:
- type: POSTGRES_14
Expand Down
6 changes: 4 additions & 2 deletions nais/nais-prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ spec:
prometheus:
enabled: true
path: /internal/metrics
envFrom:
- secret: paw-arbeidssoker-profilering-unleash-api-token
env:
- name: KAFKA_CONSUMER_ARBEIDSSOKER_REGISTERING_TOPIC
value: paw.arbeidssoker-registrert-v2
Expand All @@ -40,8 +42,8 @@ spec:
value: https://aareg-services.prod-fss-pub.nais.io/api/v1/arbeidstaker/arbeidsforhold
- name: AAREG_SCOPE
value: api://prod-fss.arbeidsforhold.aareg-services-nais/.default
- name: UNLEASH_URL
value: https://unleash.nais.io/api/
- name: UNLEASH_SERVER_API_URL
value: https://paw-unleash-api.nav.cloud.nais.io/api
resources:
limits:
cpu: '3'
Expand Down
14 changes: 14 additions & 0 deletions nais/unleash-apitoken-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: unleash.nais.io/v1
kind: ApiToken
metadata:
name: paw-arbeidssoker-profilering-unleash
namespace: paw
labels:
"team": "paw"
spec:
unleashInstance:
apiVersion: unleash.nais.io/v1
kind: RemoteUnleash
name: paw
secretName: paw-arbeidssoker-profilering-unleash-api-token
environment: development
14 changes: 14 additions & 0 deletions nais/unleash-apitoken-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: unleash.nais.io/v1
kind: ApiToken
metadata:
name: paw-arbeidssoker-profilering-unleash
namespace: paw
labels:
"team": "paw"
spec:
unleashInstance:
apiVersion: unleash.nais.io/v1
kind: RemoteUnleash
name: paw
secretName: paw-arbeidssoker-profilering-unleash-api-token
environment: production

0 comments on commit 120e1ad

Please sign in to comment.