From 415e5db50f182f945b607e04239bb18ed8ae1b29 Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Mon, 15 Mar 2021 19:02:13 +0000 Subject: [PATCH] Add sub-cluster type This change adds a new type, sub-cluster, that serves as an abstract type or template that sub-cluster definitions implement. Relates #107 Signed-off-by: Drew Walters Change-Id: Id2dd45cefd345afa1e656fba64e05f17e28b59e6 --- manifests/type/sub-cluster/README.md | 4 +++ .../initinfra-networking/kustomization.yaml | 2 ++ .../sub-cluster/initinfra/kustomization.yaml | 2 ++ .../initinfra/replacements/kustomization.yaml | 3 ++ .../sub-cluster/phases/kustomization.yaml | 2 ++ manifests/type/sub-cluster/phases/phases.yaml | 36 +++++++++++++++++++ .../sub-cluster/workload/kustomization.yaml | 1 + 7 files changed, 50 insertions(+) create mode 100644 manifests/type/sub-cluster/README.md create mode 100644 manifests/type/sub-cluster/initinfra-networking/kustomization.yaml create mode 100644 manifests/type/sub-cluster/initinfra/kustomization.yaml create mode 100644 manifests/type/sub-cluster/initinfra/replacements/kustomization.yaml create mode 100644 manifests/type/sub-cluster/phases/kustomization.yaml create mode 100644 manifests/type/sub-cluster/phases/phases.yaml create mode 100644 manifests/type/sub-cluster/workload/kustomization.yaml diff --git a/manifests/type/sub-cluster/README.md b/manifests/type/sub-cluster/README.md new file mode 100644 index 000000000..426cb46a6 --- /dev/null +++ b/manifests/type/sub-cluster/README.md @@ -0,0 +1,4 @@ +# Sub-cluster Type + +The sub-cluster type is an abstract type not intended for site inheritance. +Instead, it serves as a template for other types to define sub-clusters. diff --git a/manifests/type/sub-cluster/initinfra-networking/kustomization.yaml b/manifests/type/sub-cluster/initinfra-networking/kustomization.yaml new file mode 100644 index 000000000..f3e50a853 --- /dev/null +++ b/manifests/type/sub-cluster/initinfra-networking/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - ../../../../../airshipctl/manifests/composite/infra diff --git a/manifests/type/sub-cluster/initinfra/kustomization.yaml b/manifests/type/sub-cluster/initinfra/kustomization.yaml new file mode 100644 index 000000000..c36d675f3 --- /dev/null +++ b/manifests/type/sub-cluster/initinfra/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - ../../../../../airshipctl/manifests/composite/flux-helm/ diff --git a/manifests/type/sub-cluster/initinfra/replacements/kustomization.yaml b/manifests/type/sub-cluster/initinfra/replacements/kustomization.yaml new file mode 100644 index 000000000..2074f1ea8 --- /dev/null +++ b/manifests/type/sub-cluster/initinfra/replacements/kustomization.yaml @@ -0,0 +1,3 @@ +resources: + - ../../../../../../../airshipctl/manifests/function/flux/source-controller/replacements + - ../../../../../../../airshipctl/manifests/function/flux/helm-controller/replacements diff --git a/manifests/type/sub-cluster/phases/kustomization.yaml b/manifests/type/sub-cluster/phases/kustomization.yaml new file mode 100644 index 000000000..0ef6c3bf0 --- /dev/null +++ b/manifests/type/sub-cluster/phases/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - phases.yaml diff --git a/manifests/type/sub-cluster/phases/phases.yaml b/manifests/type/sub-cluster/phases/phases.yaml new file mode 100644 index 000000000..ebaf970df --- /dev/null +++ b/manifests/type/sub-cluster/phases/phases.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: airshipit.org/v1alpha1 +kind: Phase +metadata: + name: initinfra + clusterName: sub-cluster +config: + executorRef: + apiVersion: airshipit.org/v1alpha1 + kind: KubernetesApply + name: kubernetes-apply + documentEntryPoint: sub-clusters/sub-cluster/initinfra +--- +apiVersion: airshipit.org/v1alpha1 +kind: Phase +metadata: + name: initinfra-networking + clusterName: sub-cluster +config: + executorRef: + apiVersion: airshipit.org/v1alpha1 + kind: KubernetesApply + name: kubernetes-apply + documentEntryPoint: sub-clusters/sub-cluster/initinfra-networking +--- +apiVersion: airshipit.org/v1alpha1 +kind: Phase +metadata: + name: workload + clusterName: sub-cluster +config: + executorRef: + apiVersion: airshipit.org/v1alpha1 + kind: KubernetesApply + name: kubernetes-apply + documentEntryPoint: sub-clusters/sub-cluster/workload diff --git a/manifests/type/sub-cluster/workload/kustomization.yaml b/manifests/type/sub-cluster/workload/kustomization.yaml new file mode 100644 index 000000000..e584213cf --- /dev/null +++ b/manifests/type/sub-cluster/workload/kustomization.yaml @@ -0,0 +1 @@ +resources: []