diff --git a/infra/argocd/cm-argocd-plugin.yaml b/infra/argocd/cm-argocd-plugin.yaml new file mode 100644 index 0000000..71681ab --- /dev/null +++ b/infra/argocd/cm-argocd-plugin.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-plugin-config +data: + plugin.yaml: | + apiVersion: argoproj.io/v1alpha1 + kind: ConfigManagementPlugin + metadata: + name: kustomize-build-with-helm + spec: + generate: + command: [ "sh", "-c" ] + args: [ "kustomize build --enable-helm" ] \ No newline at end of file diff --git a/infra/argocd/kustomization.yaml b/infra/argocd/kustomization.yaml index 008a6b8..c0d959d 100644 --- a/infra/argocd/kustomization.yaml +++ b/infra/argocd/kustomization.yaml @@ -6,12 +6,13 @@ resources: - namespace.yaml - https://raw.githubusercontent.com/argoproj/argo-cd/v2.7.11/manifests/install.yaml - ingress.yaml + - cm-argocd-plugin.yaml patchesStrategicMerge: - # Kustomize --enable-helm plugin for Helm charts - - patches/argocd-cm-kustomize-helm-patch.yaml + # Plugin to enable Kustomize with Helm + - patches/argocd-repo-server-plugin-sidecar.yaml # Ignore CiliumIdentity CRDs - patches/argocd-cm-resource-exclusion-cilium-identity-patch.yaml # Let Traefik manage TLS-termination - - patches/argocd-cmd-params-cm-server-insecrure-patch.yaml + - patches/argocd-cmd-params-cm-server-insecure-patch.yaml diff --git a/infra/argocd/patches/argocd-cm-kustomize-helm-patch.yaml b/infra/argocd/patches/argocd-cm-kustomize-helm-patch.yaml deleted file mode 100644 index cea1be9..0000000 --- a/infra/argocd/patches/argocd-cm-kustomize-helm-patch.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: argocd-cm -data: - configManagementPlugins: | - - name: kustomize-build-with-helm - generate: - command: [ "sh", "-c" ] - args: [ "kustomize build --enable-helm" ] diff --git a/infra/argocd/patches/argocd-cmd-params-cm-server-insecrure-patch.yaml b/infra/argocd/patches/argocd-cmd-params-cm-server-insecure-patch.yaml similarity index 100% rename from infra/argocd/patches/argocd-cmd-params-cm-server-insecrure-patch.yaml rename to infra/argocd/patches/argocd-cmd-params-cm-server-insecure-patch.yaml diff --git a/infra/argocd/patches/argocd-repo-server-plugin-sidecar.yaml b/infra/argocd/patches/argocd-repo-server-plugin-sidecar.yaml new file mode 100644 index 0000000..97cc28c --- /dev/null +++ b/infra/argocd/patches/argocd-repo-server-plugin-sidecar.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: argocd-repo-server +spec: + selector: {} + template: + spec: + containers: + - name: kustomize-build-with-helm + command: [/var/run/argocd/argocd-cmp-server] + image: quay.io/argoproj/argocd:v2.7.11 + securityContext: + runAsNonRoot: true + runAsUser: 999 + volumeMounts: + - name: var-files + mountPath: /var/run/argocd + - name: plugins + mountPath: /home/argocd/cmp-server/plugins + - name: argocd-plugin-config + mountPath: /home/argocd/cmp-server/config/plugin.yaml + subPath: plugin.yaml + - mountPath: /tmp + name: cmp-tmp + volumes: + - name: argocd-plugin-config + configMap: + name: argocd-plugin-config + - name: cmp-tmp + emptyDir: {} \ No newline at end of file