Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opprett apitoken #890

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .deploy/unleash-apitoken-preprod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: unleash.nais.io/v1
kind: ApiToken
metadata:
name: familie-ef-soknad-api
namespace: teamfamilie
labels:
team: teamfamilie
spec:
unleashInstance:
apiVersion: unleash.nais.io/v1
kind: RemoteUnleash
name: teamfamilie
secretName: familie-ef-soknad-api-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 .deploy/unleash-apitoken-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: unleash.nais.io/v1
kind: ApiToken
metadata:
name: familie-ef-soknad-api
namespace: teamfamilie
labels:
team: teamfamilie
spec:
unleashInstance:
apiVersion: unleash.nais.io/v1
kind: RemoteUnleash
name: teamfamilie
secretName: familie-ef-soknad-api-unleash-api-token

# Specify which environment the API token should be created for.
# Can be one of: development, or production.
environment: production
30 changes: 30 additions & 0 deletions .github/workflows/deploy-unleash-api-token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy unleash api-token for dev og prod

on:
workflow_dispatch:

jobs:
deploy-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: deploy unleash api-token to dev
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .deploy/unleash-apitoken-preprod.yaml
PRINT_PAYLOAD: true
deploy-prod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: deploy unleash api-token to prod
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .deploy/unleash-apitoken-prod.yaml
PRINT_PAYLOAD: true
olekvernberg marked this conversation as resolved.
Show resolved Hide resolved