Skip to content

Commit 22cd2a4

Browse files
committed
cleanup syncroot
1 parent bf0cc18 commit 22cd2a4

19 files changed

Lines changed: 79 additions & 75 deletions

.github/workflows/deploy-runner-org-sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: docker push ${{ steps.vars.outputs.image-repo }}
6969

7070
- name: patch base with image tag
71-
working-directory: src/runner-org-sync/infra/kustomize
71+
working-directory: src/runner-org-sync/infra/kustomize/base
7272
run: |
7373
export IMAGE="${{ steps.vars.outputs.image-repo }}"
7474
export IMAGE_TAG="${{ steps.vars.outputs.short-sha }}"

infra/studio/syncroot/base/runner-org-sync.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,10 @@ spec:
2626
kind: OCIRepository
2727
name: runner-org-sync
2828
namespace: default
29-
path: ./
29+
path: ./${ENVIRONMENT}
3030
prune: true
3131
timeout: 1m
3232
postBuild:
33-
# These variables are double-substituted: the outer syncroot Kustomization
34-
# (provisioned in altinn-studio-infra/provisioning/studio-flux-syncroot.tf)
35-
# resolves ${...} on the right-hand sides first, then this inner
36-
# Kustomization applies the resolved values to the kustomize manifests
37-
# pulled from the OCI artifact above.
3833
substitute:
3934
ENVIRONMENT: ${ENVIRONMENT}
4035
RUNNER_ORG_SYNC_ENTRA_CLIENT_ID: ${RUNNER_ORG_SYNC_ENTRA_CLIENT_ID}
41-
# The kustomize manifests in src/runner-org-sync/infra/kustomize also
42-
# reference these two; they must be sourced from somewhere before this
43-
# Kustomization can reconcile cleanly. Three options:
44-
# 1. Add to studio-flux-syncroot.tf's postBuild.substitute (alongside
45-
# ENTRA_CLIENT_ID). Best for values Terraform already knows
46-
# (KEYVAULT_NAME = azurerm_key_vault.kv.name).
47-
# 2. Hardcode literal values here. Best for stable per-env values
48-
# with no Terraform counterpart.
49-
# 3. Move the runner-org-sync resource to per-env syncroot overlays
50-
# (infra/studio/syncroot/{dev,staging,prod}/) so each env can
51-
# patch its own values.
52-
# RUNNER_ORG_SYNC_KEYVAULT_NAME: ???
53-
# RUNNER_ORG_SYNC_ORGS: ???

infra/studio/syncroot/dev/kustomization.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ../base
5-
6-
# Per-env substitutions for the runner-org-sync Flux Kustomization. KV name
7-
# follows the cluster-wide convention altinn-studio-<env>-kv. ORGS lists the
8-
# whitelist runner-org-sync uses to filter the CDN. Add an entry here when
9-
# onboarding a new dev-tier org.
10-
patches:
11-
- target:
12-
group: kustomize.toolkit.fluxcd.io
13-
version: v1
14-
kind: Kustomization
15-
name: runner-org-sync
16-
patch: |-
17-
- op: add
18-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_KEYVAULT_NAME
19-
value: altinn-studio-dev-kv
20-
- op: add
21-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_ORGS
22-
value: ttd

infra/studio/syncroot/prod/kustomization.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,3 @@ patches:
1717
metadata:
1818
name: altinn-altinity-agents
1919
namespace: default
20-
21-
# Per-env substitutions for the runner-org-sync Flux Kustomization. KV
22-
# name follows the cluster-wide convention altinn-studio-<env>-kv. ORGS
23-
# lists the whitelist runner-org-sync uses to filter the CDN; this list
24-
# must agree with the prod entry of runners in
25-
# charts/gitea-org-runner-config/values.yaml.
26-
- target:
27-
group: kustomize.toolkit.fluxcd.io
28-
version: v1
29-
kind: Kustomization
30-
name: runner-org-sync
31-
patch: |-
32-
- op: add
33-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_KEYVAULT_NAME
34-
value: altinn-studio-prod-kv
35-
- op: add
36-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_ORGS
37-
value: ttd,brg,dsb,ssb,ksdigi,pat,dibk,skm,sfvt

infra/studio/syncroot/staging/kustomization.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,3 @@ patches:
1717
metadata:
1818
name: altinn-altinity-agents
1919
namespace: default
20-
21-
# Per-env substitutions for the runner-org-sync Flux Kustomization. KV
22-
# name follows the cluster-wide convention altinn-studio-<env>-kv. ORGS
23-
# lists the whitelist runner-org-sync uses to filter the CDN. Add an
24-
# entry here when onboarding a new staging-tier org.
25-
- target:
26-
group: kustomize.toolkit.fluxcd.io
27-
version: v1
28-
kind: Kustomization
29-
name: runner-org-sync
30-
patch: |-
31-
- op: add
32-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_KEYVAULT_NAME
33-
value: altinn-studio-staging-kv
34-
- op: add
35-
path: /spec/postBuild/substitute/RUNNER_ORG_SYNC_ORGS
36-
value: ttd

src/runner-org-sync/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runners running in the Studio cluster.
77
## What it does
88

99
Each scheduled run (cadence configured by `spec.schedule` in
10-
`infra/kustomize/cronjob.yaml`):
10+
`infra/kustomize/base/cronjob.yaml`):
1111

1212
1. Loads the **admin** Gitea PAT from Azure Key Vault (via Workload Identity),
1313
or from a local env var override for development.
@@ -96,7 +96,7 @@ Three distinct credentials, three storage strategies:
9696
### KEDA wiring
9797

9898
The `TriggerAuthentication/keda-gitea-auth` lives in
99-
`infra/kustomize/triggerauthentication.yaml` — ships with this service so
99+
`infra/kustomize/base/triggerauthentication.yaml` — ships with this service so
100100
the Secret writer and the auth ref are deployed atomically. Three names
101101
must agree across this folder and the workload chart:
102102

File renamed without changes.

src/runner-org-sync/infra/kustomize/kustomization.yaml renamed to src/runner-org-sync/infra/kustomize/base/kustomization.yaml

File renamed without changes.

src/runner-org-sync/infra/kustomize/networkpolicy.yaml renamed to src/runner-org-sync/infra/kustomize/base/networkpolicy.yaml

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)