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

Setter opp deploy-workflow for APIToken #1496

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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