From 19ef029094b07b5c96e3264b84d9a364b7709507 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 18 Apr 2021 07:10:42 -0400 Subject: [PATCH] feat: break out crds into separate fluxcd/Kustomization --- README.md | 2 +- cluster/base/core.yaml | 2 ++ cluster/base/crds.yaml | 13 +++++++++++++ cluster/core/cert-manager/kustomization.yaml | 1 - .../crd => crds/cert-manager}/kustomization.yaml | 0 cluster/crds/kustomization.yaml | 4 ++++ 6 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 cluster/base/crds.yaml rename cluster/{core/cert-manager/crd => crds/cert-manager}/kustomization.yaml (100%) create mode 100644 cluster/crds/kustomization.yaml diff --git a/README.md b/README.md index cc36e796..522f51a1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Template for deploying k3s backed by Flux -Template for creating a [k3s](https://k3s.io/) cluster with [k3sup](https://github.com/alexellis/k3sup) backed by [Flux](https://toolkit.fluxcd.io/) and [SOPS](https://toolkit.fluxcd.io/guides/mozilla-sops/). +Template for deploying a single [k3s](https://k3s.io/) cluster with [k3sup](https://github.com/alexellis/k3sup) backed by [Flux](https://toolkit.fluxcd.io/) and [SOPS](https://toolkit.fluxcd.io/guides/mozilla-sops/). The purpose here is to showcase how you can deploy an entire Kubernetes cluster and show it off to the world using the [GitOps](https://www.weave.works/blog/what-is-gitops-really) tool [Flux](https://toolkit.fluxcd.io/). When completed, your Git repository will be driving the state of your Kubernetes cluster. In addition with the help of the [Flux SOPS integration](https://toolkit.fluxcd.io/guides/mozilla-sops/) you'll be able to commit GPG encrypted secrets to your public repo. diff --git a/cluster/base/core.yaml b/cluster/base/core.yaml index e0461ca7..82b43223 100644 --- a/cluster/base/core.yaml +++ b/cluster/base/core.yaml @@ -6,6 +6,8 @@ metadata: namespace: flux-system spec: interval: 10m0s + dependsOn: + - name: crds path: ./cluster/core prune: false sourceRef: diff --git a/cluster/base/crds.yaml b/cluster/base/crds.yaml new file mode 100644 index 00000000..1f43346c --- /dev/null +++ b/cluster/base/crds.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 +kind: Kustomization +metadata: + name: crds + namespace: flux-system +spec: + interval: 10m0s + path: ./cluster/crds + prune: false + sourceRef: + kind: GitRepository + name: flux-system diff --git a/cluster/core/cert-manager/kustomization.yaml b/cluster/core/cert-manager/kustomization.yaml index f0c9364e..0231f584 100644 --- a/cluster/core/cert-manager/kustomization.yaml +++ b/cluster/core/cert-manager/kustomization.yaml @@ -1,7 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- crd - helm-release.yaml - letsencrypt-production.yaml - letsencrypt-staging.yaml diff --git a/cluster/core/cert-manager/crd/kustomization.yaml b/cluster/crds/cert-manager/kustomization.yaml similarity index 100% rename from cluster/core/cert-manager/crd/kustomization.yaml rename to cluster/crds/cert-manager/kustomization.yaml diff --git a/cluster/crds/kustomization.yaml b/cluster/crds/kustomization.yaml new file mode 100644 index 00000000..75b65cfc --- /dev/null +++ b/cluster/crds/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- cert-manager