From a1661fe6b76d6dbaadc2deacf8906a3d34f690b7 Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Fri, 29 Mar 2024 12:23:13 +0100 Subject: [PATCH] argocd applications and registry --- .../applications/projects-website.yaml | 20 +++++++++++++++++++ .../base/argo-cd-ghcr-secret-sealed.yaml | 11 ++++++++++ .../base/argo-cd-image-updater-cm.yaml | 14 +++++++++++++ .../argocd-cmd-params-cm.yaml} | 0 infrastructure/02-argocd/kustomization.yaml | 6 +++++- 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 infrastructure/02-argocd/applications/projects-website.yaml create mode 100644 infrastructure/02-argocd/base/argo-cd-ghcr-secret-sealed.yaml create mode 100644 infrastructure/02-argocd/base/argo-cd-image-updater-cm.yaml rename infrastructure/02-argocd/{patches/argocd-cmd-params-cm-patch.yaml => base/argocd-cmd-params-cm.yaml} (100%) diff --git a/infrastructure/02-argocd/applications/projects-website.yaml b/infrastructure/02-argocd/applications/projects-website.yaml new file mode 100644 index 0000000..a1b688e --- /dev/null +++ b/infrastructure/02-argocd/applications/projects-website.yaml @@ -0,0 +1,20 @@ +API Version: argoproj.io/v1alpha1 +Name: website +Namespace: argocd +Annotations: + argocd-image-updater.argoproj.io/image-list: website=illiumst/website + argocd-image-updater.argoproj.io/website.update-strategy: latest + +Kind: Application +Spec: + Destination: + Name: in-cluster + Namespace: website + Project: default + Source: + Path: projects/website + Repo URL: https://github.com/illiumst/kubedeploy.git + Target Revision: HEAD + Sync Policy: + Sync Options: + CreateNamespace=true diff --git a/infrastructure/02-argocd/base/argo-cd-ghcr-secret-sealed.yaml b/infrastructure/02-argocd/base/argo-cd-ghcr-secret-sealed.yaml new file mode 100644 index 0000000..19484e7 --- /dev/null +++ b/infrastructure/02-argocd/base/argo-cd-ghcr-secret-sealed.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: argo-cd-ghcr-secret + namespace: argocd + annotations: + sealedsecrets.bitnami.com/namespace-wide: true +type: Opaque +stringData: + username: <-----> + password: <-----> diff --git a/infrastructure/02-argocd/base/argo-cd-image-updater-cm.yaml b/infrastructure/02-argocd/base/argo-cd-image-updater-cm.yaml new file mode 100644 index 0000000..e42ca64 --- /dev/null +++ b/infrastructure/02-argocd/base/argo-cd-image-updater-cm.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/name: argocd-image-updater-config + app.kubernetes.io/part-of: argocd-image-updater +name: argocd-image-updater-config +data: + registries.conf: | + registries: + - name: GHCR.io + prefix: ghcr.io + api_url: hhttps://ghcr.io/v2 + credentials: pullsecret:argocd/argo-cd-ghcr-secret diff --git a/infrastructure/02-argocd/patches/argocd-cmd-params-cm-patch.yaml b/infrastructure/02-argocd/base/argocd-cmd-params-cm.yaml similarity index 100% rename from infrastructure/02-argocd/patches/argocd-cmd-params-cm-patch.yaml rename to infrastructure/02-argocd/base/argocd-cmd-params-cm.yaml diff --git a/infrastructure/02-argocd/kustomization.yaml b/infrastructure/02-argocd/kustomization.yaml index 18358e8..aabab39 100644 --- a/infrastructure/02-argocd/kustomization.yaml +++ b/infrastructure/02-argocd/kustomization.yaml @@ -5,12 +5,16 @@ namespace: argocd # - base/argo-cd-ui-ingress.yaml resources: +# Applications +- applications/projcts-website.yaml +# Base functionality - base/argo-cd-k-with-helm.yaml +- base/argo-cd-image-updater-cm.yaml +- patches/argocd-cmd-params-cm.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml - base/argo-cd-namespace.yaml patches: -- path: patches/argocd-cmd-params-cm-patch.yaml - path: patches/argocd-server-service.yaml - path: patches/argocd-cm-patch.yaml - path: patches/nodeselector.yaml