From 8f4088dadba0e39d6aad9b8d9c45471577174597 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 3 Sep 2021 12:36:52 +0700 Subject: [PATCH] Move git, ci and sso to platform layer --- README.md | 2 +- .../root-app/applicationsets/platform.yaml | 28 +++++++++++++++++++ bootstrap/root-app/kustomization.yaml | 1 + {apps => platform}/authelia/Chart.yaml | 0 {apps => platform}/authelia/values.yaml | 0 {apps => platform}/gitea/Chart.yaml | 0 {apps => platform}/gitea/values.yaml | 0 .../tekton-pipelines/ingress.yaml | 0 .../tekton-pipelines/kustomization.yaml | 0 9 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 bootstrap/root-app/applicationsets/platform.yaml rename {apps => platform}/authelia/Chart.yaml (100%) rename {apps => platform}/authelia/values.yaml (100%) rename {apps => platform}/gitea/Chart.yaml (100%) rename {apps => platform}/gitea/values.yaml (100%) rename {apps => platform}/tekton-pipelines/ingress.yaml (100%) rename {apps => platform}/tekton-pipelines/kustomization.yaml (100%) diff --git a/README.md b/README.md index 9ed59b25..d98ef1cd 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ A single `make` command will automatically: - Install ArgoCD - Kustomize creates the [root Argo application](./bootstrap/root-app) that will install other Argo applications -From now on, the root app will install the remaining layers (`./system`, `./apps`) and the `./bootstrap` layer will manage itself. +From now on, the root app will install the remaining layers (`./system`, `./platform`, `./apps`) and the `./bootstrap` layer will manage itself. Please visit the [Provisioning flow document](https://khuedoan.github.io/homelab/deployment/provisioning_flow.html) to learn more. diff --git a/bootstrap/root-app/applicationsets/platform.yaml b/bootstrap/root-app/applicationsets/platform.yaml new file mode 100644 index 00000000..5ea39825 --- /dev/null +++ b/bootstrap/root-app/applicationsets/platform.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: platform +spec: + generators: + - git: + repoURL: https://github.com/khuedoan/homelab.git + revision: master + directories: + - path: platform/* + template: + metadata: + name: '{{path.basename}}' + spec: + destination: + name: in-cluster + namespace: '{{path.basename}}' + project: default + source: + repoURL: https://github.com/khuedoan/homelab.git + path: '{{path}}' + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/bootstrap/root-app/kustomization.yaml b/bootstrap/root-app/kustomization.yaml index cc6d538b..fc1c199a 100644 --- a/bootstrap/root-app/kustomization.yaml +++ b/bootstrap/root-app/kustomization.yaml @@ -5,6 +5,7 @@ resources: # - projects/system.yaml - applicationsets/bootstrap.yaml - applicationsets/system.yaml +- applicationsets/platform.yaml - applicationsets/apps.yaml namespace: argocd diff --git a/apps/authelia/Chart.yaml b/platform/authelia/Chart.yaml similarity index 100% rename from apps/authelia/Chart.yaml rename to platform/authelia/Chart.yaml diff --git a/apps/authelia/values.yaml b/platform/authelia/values.yaml similarity index 100% rename from apps/authelia/values.yaml rename to platform/authelia/values.yaml diff --git a/apps/gitea/Chart.yaml b/platform/gitea/Chart.yaml similarity index 100% rename from apps/gitea/Chart.yaml rename to platform/gitea/Chart.yaml diff --git a/apps/gitea/values.yaml b/platform/gitea/values.yaml similarity index 100% rename from apps/gitea/values.yaml rename to platform/gitea/values.yaml diff --git a/apps/tekton-pipelines/ingress.yaml b/platform/tekton-pipelines/ingress.yaml similarity index 100% rename from apps/tekton-pipelines/ingress.yaml rename to platform/tekton-pipelines/ingress.yaml diff --git a/apps/tekton-pipelines/kustomization.yaml b/platform/tekton-pipelines/kustomization.yaml similarity index 100% rename from apps/tekton-pipelines/kustomization.yaml rename to platform/tekton-pipelines/kustomization.yaml