From 85633b9f12ae80ddd2133ea09c8b5e3c8f670a4b Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 10 Apr 2024 01:07:06 +0300 Subject: [PATCH] Add staging layout Signed-off-by: Stefan Prodan --- clusters/staging/podinfo.yaml | 4 ++++ hub/flux-system/gotk-components.yaml | 1 + hub/flux-system/gotk-sync.yaml | 1 + hub/flux-system/kustomization.yaml | 19 +++++++++++++++++++ hub/staging.yaml | 23 +++++++++++++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 clusters/staging/podinfo.yaml create mode 100644 hub/flux-system/gotk-components.yaml create mode 100644 hub/flux-system/gotk-sync.yaml create mode 100644 hub/flux-system/kustomization.yaml create mode 100644 hub/staging.yaml diff --git a/clusters/staging/podinfo.yaml b/clusters/staging/podinfo.yaml new file mode 100644 index 0000000..5128776 --- /dev/null +++ b/clusters/staging/podinfo.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: podinfo diff --git a/hub/flux-system/gotk-components.yaml b/hub/flux-system/gotk-components.yaml new file mode 100644 index 0000000..cb41b33 --- /dev/null +++ b/hub/flux-system/gotk-components.yaml @@ -0,0 +1 @@ +# This file will be generated automatically by flux boostrap. diff --git a/hub/flux-system/gotk-sync.yaml b/hub/flux-system/gotk-sync.yaml new file mode 100644 index 0000000..cb41b33 --- /dev/null +++ b/hub/flux-system/gotk-sync.yaml @@ -0,0 +1 @@ +# This file will be generated automatically by flux boostrap. diff --git a/hub/flux-system/kustomization.yaml b/hub/flux-system/kustomization.yaml new file mode 100644 index 0000000..a3a32be --- /dev/null +++ b/hub/flux-system/kustomization.yaml @@ -0,0 +1,19 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - gotk-components.yaml + - gotk-sync.yaml +labels: + - pairs: + toolkit.fluxcd.io/tenant: sre-team +patches: + - patch: | + - op: add + path: /spec/template/spec/containers/0/args/- + value: --concurrent=20 + - op: add + path: /spec/template/spec/containers/0/args/- + value: --requeue-dependency=5s + target: + kind: Deployment + name: "(kustomize-controller|helm-controller|source-controller)" diff --git a/hub/staging.yaml b/hub/staging.yaml new file mode 100644 index 0000000..0dc9f75 --- /dev/null +++ b/hub/staging.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: staging +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: cluster-sync + namespace: staging +spec: + interval: 1h + retryInterval: 3m + timeout: 5m + prune: true + wait: true + path: ./clusters/staging + sourceRef: + kind: GitRepository + name: flux-system + kubeConfig: + secretRef: + name: cluster-kubeconfig