diff --git a/clusters/prod-us/apps-tenant.yaml b/clusters/prod-us/apps-tenant.yaml new file mode 100644 index 0000000..1ac1c95 --- /dev/null +++ b/clusters/prod-us/apps-tenant.yaml @@ -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 diff --git a/clusters/prod-us/infra-tenant.yaml b/clusters/prod-us/infra-tenant.yaml new file mode 100644 index 0000000..7e007cf --- /dev/null +++ b/clusters/prod-us/infra-tenant.yaml @@ -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 diff --git a/clusters/prod-us/runtime-info.yaml b/clusters/prod-us/runtime-info.yaml new file mode 100644 index 0000000..3a5af53 --- /dev/null +++ b/clusters/prod-us/runtime-info.yaml @@ -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"