From 9832d5fc3c8e46fcaec9af82be7dfdce4d8a3a6e Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Fri, 7 Jul 2023 23:42:14 +0200 Subject: [PATCH] feat(sets): Moved ApplicationSets out into their own folder --- README.md | 19 ++++++++++++++----- infra/argocd/kustomization.yaml | 3 --- infra/monitoring/kube-prometheus-stack.yaml | 3 +++ {infra/argocd => sets}/applications.yaml | 0 {infra/argocd => sets}/infrastructure.yaml | 0 sets/kustomization.yaml | 8 ++++++++ {infra/argocd => sets}/project.yaml | 0 7 files changed, 25 insertions(+), 8 deletions(-) rename {infra/argocd => sets}/applications.yaml (100%) rename {infra/argocd => sets}/infrastructure.yaml (100%) create mode 100644 sets/kustomization.yaml rename {infra/argocd => sets}/project.yaml (100%) diff --git a/README.md b/README.md index de16c12..355207f 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ For load balancing https://metallb.universe.tf/installation/ ```shell -kubectl apply -f infra/metallb +kubectl apply -k infra/metallb ``` # Traefik @@ -146,6 +146,11 @@ at [https://whoami.${DOMAIN}](https://whoami.${DOMAIN}) kubectl apply -k infra/argocd ``` +Get ArgoCD initial secret +```shell +kubectl -n argocd get secrets argocd-initial-admin-secret -o json | jq -r .data.password | base64 -d +``` + # Kubernetes Dashboard An OIDC (traefik-forward-auth) @@ -156,6 +161,14 @@ deployed using kubectl apply -k infra/dashboard ``` +# ApplicationSets + +Once you've tested everything get the ball rolling with + +```shell +kubectl apply -k sets +``` + # Cleanup ```shell @@ -190,10 +203,6 @@ runtime_type = "io.containerd.runc.v2" 1.7.x doesn't work? -## Traefik CRDS - -Apply manually :( - ## Sealed Secrets Restart pod after applying master-key \ No newline at end of file diff --git a/infra/argocd/kustomization.yaml b/infra/argocd/kustomization.yaml index afeb71e..492aae8 100644 --- a/infra/argocd/kustomization.yaml +++ b/infra/argocd/kustomization.yaml @@ -6,9 +6,6 @@ resources: - namespace.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - ingress.yaml - - project.yaml - - infrastructure.yaml - - applications.yaml patchesStrategicMerge: # Kustomize --enable-helm plugin for Helm charts diff --git a/infra/monitoring/kube-prometheus-stack.yaml b/infra/monitoring/kube-prometheus-stack.yaml index d3fa539..3ef3cb3 100644 --- a/infra/monitoring/kube-prometheus-stack.yaml +++ b/infra/monitoring/kube-prometheus-stack.yaml @@ -23,6 +23,9 @@ spec: name: in-cluster namespace: monitoring syncPolicy: + automated: + selfHeal: true + prune: true syncOptions: - ServerSideApply=true - CreateNamespace=true diff --git a/infra/argocd/applications.yaml b/sets/applications.yaml similarity index 100% rename from infra/argocd/applications.yaml rename to sets/applications.yaml diff --git a/infra/argocd/infrastructure.yaml b/sets/infrastructure.yaml similarity index 100% rename from infra/argocd/infrastructure.yaml rename to sets/infrastructure.yaml diff --git a/sets/kustomization.yaml b/sets/kustomization.yaml new file mode 100644 index 0000000..c3f4b55 --- /dev/null +++ b/sets/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: argocd + +resources: + - project.yaml + - infrastructure.yaml + - applications.yaml diff --git a/infra/argocd/project.yaml b/sets/project.yaml similarity index 100% rename from infra/argocd/project.yaml rename to sets/project.yaml