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

Commit

Permalink
Merge pull request #1496 from navikt/deploy-unleash-api-token
Browse files Browse the repository at this point in the history
Setter opp deploy-workflow for APIToken
  • Loading branch information
terjeofnorway authored Oct 6, 2023
2 parents a4940a2 + d04ea9d commit 224f624
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-unleash-api-token.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .nais/unleash/unleash-api-token.dev.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .nais/unleash/unleash-api-token.prod.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 224f624

Please sign in to comment.