Skip to content

Commit

Permalink
Onboard tenants on the prod-us cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
  • Loading branch information
stefanprodan committed Feb 23, 2024
1 parent b940263 commit b147e50
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
29 changes: 29 additions & 0 deletions clusters/prod-us/apps-tenant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-apps-tenant
namespace: flux-system
spec:
serviceAccountName: kustomize-controller
dependsOn:
- name: flux-infra-tenant
interval: 12h
retryInterval: 3m
path: ./tenants/apps
prune: true
sourceRef:
kind: GitRepository
name: flux-system
postBuild:
substituteFrom:
- kind: ConfigMap
name: flux-runtime-info
patches:
- patch: |
$patch: delete
apiVersion: all
kind: all
metadata:
name: all
target:
labelSelector: toolkit.fluxcd.io/role=automation
29 changes: 29 additions & 0 deletions clusters/prod-us/infra-tenant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-infra-tenant
namespace: flux-system
spec:
serviceAccountName: kustomize-controller
interval: 12h
retryInterval: 3m
wait: true
timeout: 15m
path: ./tenants/infra
prune: true
sourceRef:
kind: GitRepository
name: flux-system
postBuild:
substituteFrom:
- kind: ConfigMap
name: flux-runtime-info
patches:
- patch: |
$patch: delete
apiVersion: all
kind: all
metadata:
name: all
target:
labelSelector: toolkit.fluxcd.io/role=automation
14 changes: 14 additions & 0 deletions clusters/prod-us/runtime-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: flux-runtime-info
namespace: flux-system
labels:
toolkit.fluxcd.io/runtime: "true"
annotations:
kustomize.toolkit.fluxcd.io/ssa: "Merge"
data:
ENVIRONMENT: "production"
GIT_BRANCH: "production"
CLUSTER_NAME: "prod-us"
CLUSTER_DOMAIN: "us.example.com"

0 comments on commit b147e50

Please sign in to comment.