diff --git a/manifests/apps/infra-app-of-apps.yaml b/manifests/apps/infra-app-of-apps.yaml new file mode 100644 index 0000000..3285985 --- /dev/null +++ b/manifests/apps/infra-app-of-apps.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: infra-app-of-apps + namespace: argocd +spec: + destination: + namespace: argocd + server: https://kubernetes.default.svc + project: infra + source: + path: apps/infra-app-of-apps.yaml + repoURL: https://gitlab.wikimedia.org/martynranyard/cloud-dev-cluster.git + targetRevision: HEAD + syncPolicy: + automated: + selfHeal: true diff --git a/manifests/kustomize/argocd/kustomization.yaml b/manifests/kustomize/argocd/kustomization.yaml new file mode 100644 index 0000000..0daa831 --- /dev/null +++ b/manifests/kustomize/argocd/kustomization.yaml @@ -0,0 +1,23 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - https://raw.githubusercontent.com/argoproj/argo-cd/refs/tags/v3.3.9/manifests/install.yaml + +patches: + - patch: |- + - op: add + path: /data + value: + kustomize.buildOptions: --enable-helm + resource.exclusions: | + - apiGroups: + - cilium.io + kinds: + - CiliumIdentity + clusters: + - "*" + target: + version: v1 + kind: ConfigMap + name: argocd-cm diff --git a/manifests/projects/infra.yaml b/manifests/projects/infra.yaml new file mode 100644 index 0000000..ae2801a --- /dev/null +++ b/manifests/projects/infra.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + labels: + app.kubernetes.io/instance: app-of-apps + name: infra + namespace: argocd +spec: + clusterResourceWhitelist: + - group: '*' + kind: '*' + clusterResourceBlacklist: + - group: cilium.io + kind: CiliumIdentity + description: argo, nginx-ingress, etc. + destinations: + - name: '*' + namespace: '*' + server: https://kubernetes.default.svc + sourceRepos: + - https://gitlab.wikimedia.org/martynranyard/cloud-dev-cluster.git diff --git a/scripts/initial_argo_install b/scripts/initial_argo_install new file mode 100755 index 0000000..fa153cf --- /dev/null +++ b/scripts/initial_argo_install @@ -0,0 +1,6 @@ +#!/bin/bash +KUBECONFIG=$(dirname $(realpath $0))/../kubeconfig +kubectl --kubeconfig=$KUBECONFIG create ns argocd +cd $(dirname $(realpath $0))/../manifests/kustomize/argocd +kustomize build | kubectl --kubeconfig=$KUBECONFIG --namespace argocd apply -f - --server-side +