Skip to content

Commit

Permalink
add afk, bfk, ofk, vestfold and telemark to deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Battlestad committed Dec 22, 2023
1 parent f39f5b1 commit e04b49e
Show file tree
Hide file tree
Showing 14 changed files with 226 additions and 138 deletions.
52 changes: 19 additions & 33 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,53 +52,39 @@ jobs:
packages: write
strategy:
matrix:
include:
org:
- afk-no
- bfk-no
- fintlabs-no
- innlandetfylke-no
- mrfylke-no
- nfk-no
- ofk-no
- telemarkfylke-no
- vestfoldfylke-no
- viken-no
- vlfk-no
- trondelagfylke-no
cluster:
- aks-beta-fint-2021-11-23
- aks-api-fint-2022-02-08
exclude:
- org: fintlabs-no
cluster: aks-beta-fint-2021-11-23

- org: innlandetfylke-no
cluster: aks-api-fint-2022-02-08
- org: innlandetfylke-no
cluster: aks-beta-fint-2021-11-23

- org: mrfylke-no
cluster: aks-api-fint-2022-02-08
- org: mrfylke-no
cluster: aks-beta-fint-2021-11-23

- org: nfk-no
cluster: aks-api-fint-2022-02-08
- org: nfk-no
cluster: aks-beta-fint-2021-11-23

- org: viken-no
cluster: aks-api-fint-2022-02-08
- org: viken-no
cluster: aks-beta-fint-2021-11-23

- org: vlfk-no
cluster: aks-api-fint-2022-02-08
- org: vlfk-no
cluster: aks-beta-fint-2021-11-23

- org: trondelagfylke-no
cluster: aks-api-fint-2022-02-08
- org: trondelagfylke-no
cluster: aks-beta-fint-2021-11-23

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get environment
uses: actions/github-script@v6
uses: actions/github-script@v7
id: environment
with:
script: return '${{ matrix.cluster }}'.split('-')[1]
result-encoding: string

- name: Get resource group name
uses: actions/github-script@v6
uses: actions/github-script@v7
id: resource-group
with:
script: return 'rg-aks-${{ steps.environment.outputs.result }}'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/MD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ on:
default: 'warning'
type: choice
options:
- afk-no
- bfk-no
- fintlabs-no
- innlandetfylke-no
- mrfylke-no
- nfk-no
- ofk-no
- telemarkfylke-no
- vestfoldfylke-no
- viken-no
- vlfk-no
- trondelagfylke-no
Expand All @@ -40,7 +45,7 @@ jobs:
packages: write

steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
name: Get resource group name
id: rg
with:
Expand All @@ -49,15 +54,15 @@ jobs:
return `rg-${a[0]}-${a[1]}`
result-encoding: string

- uses: actions/github-script@v6
- uses: actions/github-script@v7
name: Get environment
id: environment
with:
script: |
const a = '${{ inputs.cluster }}'.split('-')
return `${a[1]}`
result-encoding: string
- uses: actions/github-script@v6
- uses: actions/github-script@v7
name: Get auth
id: auth
with:
Expand Down
31 changes: 31 additions & 0 deletions kustomize/overlays/afk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: afk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_afk_no
fintlabs.no/org-id: afk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "afk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "afk.no"
- op: replace
path: "/spec/url/basePath"
value: "/afk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/afk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "afk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: nfk-no
namespace: afk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_vlfk_no
fintlabs.no/org-id: vlfk.no
app.kubernetes.io/instance: fint-flyt-data-service_afk_no
fintlabs.no/org-id: afk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "nfk-no.flyt.*"
value: "afk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "vlfk.no"
value: "afk.no"
- op: replace
path: "/spec/url/basePath"
value: "/alpha/nfk-no"
value: "/beta/afk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/alpha/nfk-no/api/intern/arkiv"
value: "/beta/afk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "vlfk.no, vigo.no"
value: "afk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
31 changes: 31 additions & 0 deletions kustomize/overlays/bfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: bfk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_bfk_no
fintlabs.no/org-id: bfk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "bfk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "bfk.no"
- op: replace
path: "/spec/url/basePath"
value: "/bfk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/bfk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "bfk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: vlfk-no
namespace: bfk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_vlfk_no
fintlabs.no/org-id: vlfk.no
app.kubernetes.io/instance: fint-flyt-data-service_bfk_no
fintlabs.no/org-id: bfk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "vlfk-no.flyt.*"
value: "bfk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "vlfk.no"
value: "bfk.no"
- op: replace
path: "/spec/url/basePath"
value: "/alpha/vlfk-no"
value: "/beta/bfk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/alpha/vlfk-no/api/intern/arkiv"
value: "/beta/bfk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "vlfk.no, vigo.no"
value: "bfk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
31 changes: 0 additions & 31 deletions kustomize/overlays/innlandetfylke-no/alpha/kustomization.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions kustomize/overlays/ofk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ofk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_ofk_no
fintlabs.no/org-id: ofk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "ofk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "ofk.no"
- op: replace
path: "/spec/url/basePath"
value: "/ofk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/ofk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "ofk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: viken-no
namespace: ofk-no

resources:
- ../../../base

commonLabels:
app.kubernetes.io/instance: fint-flyt-data-service_viken_no
fintlabs.no/org-id: viken.no
app.kubernetes.io/instance: fint-flyt-data-service_ofk_no
fintlabs.no/org-id: ofk.no

patches:
- patch: |-
- op: replace
path: "/spec/kafka/acls/0/topic"
value: "viken-no.flyt.*"
value: "ofk-no.flyt.*"
- op: replace
path: "/spec/orgId"
value: "viken.no"
value: "ofk.no"
- op: replace
path: "/spec/url/basePath"
value: "/alpha/viken-no"
value: "/beta/ofk-no"
- op: replace
path: "/spec/ingress/basePath"
value: "/alpha/viken-no/api/intern/arkiv"
value: "/beta/ofk-no/api/intern/arkiv"
- op: replace
path: "/spec/env/1/value"
value: "viken.no, vigo.no"
value: "ofk.no, vigo.no"
target:
kind: Application
name: fint-flyt-data-service
Expand Down
Loading

0 comments on commit e04b49e

Please sign in to comment.