-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gå over til unleash next * Mangler Permissions for deploy * Feil navn secret + manglende prod-config * workflow concurrency --------- Co-authored-by: Hans Petter Simonsen <[email protected]>
- Loading branch information
1 parent
edda861
commit 8d0280e
Showing
14 changed files
with
130 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Unleash api-tokens | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/unleash-apitoken.yaml' | ||
- '.nais/unleash-apitoken-dev.yaml' | ||
- '.nais/unleash-apitoken.yaml' | ||
|
||
jobs: | ||
apply-apitoken-unleash: | ||
name: Apply ApiToken for Unleash to cluster | ||
runs-on: ubuntu-latest | ||
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.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: unleash.nais.io/v1 | ||
kind: ApiToken | ||
metadata: | ||
name: aktivitet-arena-acl | ||
namespace: dab | ||
labels: | ||
team: dab | ||
spec: | ||
unleashInstance: | ||
apiVersion: unleash.nais.io/v1 | ||
kind: RemoteUnleash | ||
name: dab | ||
secretName: aktivitet-arena-acl-unleash-api-token | ||
environment: development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: unleash.nais.io/v1 | ||
kind: ApiToken | ||
metadata: | ||
name: aktivitet-arena-acl | ||
namespace: dab | ||
labels: | ||
team: dab | ||
spec: | ||
unleashInstance: | ||
apiVersion: unleash.nais.io/v1 | ||
kind: RemoteUnleash | ||
name: dab | ||
secretName: aktivitet-arena-acl-unleash-api-token | ||
environment: production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
src/main/kotlin/no/nav/arena_tiltak_aktivitet_acl/configuration/FeatureToggleConfig.kt
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/main/kotlin/no/nav/arena_tiltak_aktivitet_acl/configuration/UnleashConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package no.nav.arena_tiltak_aktivitet_acl.configuration | ||
|
||
import io.getunleash.util.UnleashConfig | ||
import org.springframework.boot.context.properties.ConfigurationProperties | ||
|
||
@ConfigurationProperties(prefix = "unleash") | ||
data class UnleashConfig( | ||
val appName: String, | ||
val url: String, | ||
val token: String, | ||
val instanceId: String, | ||
val environment: String, | ||
) { | ||
fun toUnleashConfig(): UnleashConfig { | ||
return UnleashConfig.builder() | ||
.appName(appName) | ||
.instanceId(instanceId) | ||
.unleashAPI("$url/api") | ||
.apiKey(token) | ||
.environment(environment) | ||
.build() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/test/kotlin/no/nav/arena_tiltak_aktivitet_acl/LocalApplicationConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters