From 3eda051e29cb6895b8c7f8d3229fb2b330f6e730 Mon Sep 17 00:00:00 2001 From: Terje Karlsen Date: Fri, 6 Oct 2023 13:59:22 +0200 Subject: [PATCH 1/2] Setter opp deploy-workflow for APIToken --- .../workflows/deploy-unleash-api-token.yml | 35 +++++++++++++++++++ .nais/unleash/unleash-api-token.dev.yml | 17 +++++++++ .nais/unleash/unleash-api-token.prod.yml | 0 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/deploy-unleash-api-token.yml create mode 100644 .nais/unleash/unleash-api-token.dev.yml create mode 100644 .nais/unleash/unleash-api-token.prod.yml diff --git a/.github/workflows/deploy-unleash-api-token.yml b/.github/workflows/deploy-unleash-api-token.yml new file mode 100644 index 000000000..5a0354cc2 --- /dev/null +++ b/.github/workflows/deploy-unleash-api-token.yml @@ -0,0 +1,35 @@ +name: Deploy unleash-apitoken +on: + push: + paths: + - ".nais/unleash/unleash-api-token.dev.yaml" + - ".nais/unleash/unleash-api-token.prod.yaml" + +jobs: + deploy-dev: + name: Deploy unleash-apitoken to dev + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Deploy application + uses: nais/deploy/actions/deploy@v1 + env: + APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} + CLUSTER: dev-gcp + RESOURCE: .nais/unleash/unleash-api-token.dev.yaml + + deploy-prod: + name: Deploy unleash-apitoken to prod + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Deploy application + uses: nais/deploy/actions/deploy@v1 + if: github.ref == 'refs/heads/main' + env: + APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} + CLUSTER: prod-gcp + RESOURCE: .nais/unleash/unleash-api-token.prod.yaml \ No newline at end of file diff --git a/.nais/unleash/unleash-api-token.dev.yml b/.nais/unleash/unleash-api-token.dev.yml new file mode 100644 index 000000000..4163f2f8c --- /dev/null +++ b/.nais/unleash/unleash-api-token.dev.yml @@ -0,0 +1,17 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: nav-dekoratoren + namespace: navno + labels: + team: navno +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: navno + secretName: nav-dekoratoren-unleash-api-token + + # Specify which environment the API token should be created for. + # Can be one of: development, or production. + environment: development diff --git a/.nais/unleash/unleash-api-token.prod.yml b/.nais/unleash/unleash-api-token.prod.yml new file mode 100644 index 000000000..e69de29bb From d04ea9d998d281bb7ede5638cb7f0def1a8bd875 Mon Sep 17 00:00:00 2001 From: Terje Karlsen Date: Fri, 6 Oct 2023 14:01:06 +0200 Subject: [PATCH 2/2] Legger til prod-token-deploy --- .nais/unleash/unleash-api-token.prod.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.nais/unleash/unleash-api-token.prod.yml b/.nais/unleash/unleash-api-token.prod.yml index e69de29bb..7b51a3221 100644 --- a/.nais/unleash/unleash-api-token.prod.yml +++ b/.nais/unleash/unleash-api-token.prod.yml @@ -0,0 +1,17 @@ +apiVersion: unleash.nais.io/v1 +kind: ApiToken +metadata: + name: nav-dekoratoren + namespace: navno + labels: + team: navno +spec: + unleashInstance: + apiVersion: unleash.nais.io/v1 + kind: RemoteUnleash + name: navno + secretName: nav-dekoratoren-unleash-api-token + + # Specify which environment the API token should be created for. + # Can be one of: development, or production. + environment: production