mirror of
https://github.com/optim-enterprises-bv/homelab.git
synced 2025-11-02 10:57:53 +00:00
feat(argocd): Copying necessary binaries from main ArgoCD image for use in kustomize-with-helm plugin
This enables us to use a slimmer image for the plugin instead of creating a separate image with all the tools we need. It also enables us to keep the plugin image tools in sync with the ArgoCD version.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argocd-plugin-config
|
||||
name: argocd-cm-cmp-kustomize-build-with-helm
|
||||
data:
|
||||
plugin.yaml: |
|
||||
kustomize-build-with-helm.yaml: |
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ConfigManagementPlugin
|
||||
metadata:
|
||||
@@ -6,13 +6,14 @@ resources:
|
||||
- namespace.yaml
|
||||
- https://raw.githubusercontent.com/argoproj/argo-cd/v2.8.2/manifests/install.yaml
|
||||
- ingress.yaml
|
||||
- cm-argocd-plugin.yaml
|
||||
- argocd-cm-cmp-kustomize-build-with-helm.yaml
|
||||
|
||||
patchesStrategicMerge:
|
||||
patches:
|
||||
# Copy binaries from ArgoCD-image
|
||||
- path: patches/argocd-repo-copyutil-patch.yaml
|
||||
# Plugin to enable Kustomize with Helm
|
||||
- patches/argocd-repo-server-plugin-sidecar.yaml
|
||||
- path: patches/argocd-repo-server-plugin-sidecar-patch.yaml
|
||||
# Ignore CiliumIdentity CRDs
|
||||
- patches/argocd-cm-resource-exclusion-cilium-identity-patch.yaml
|
||||
# Let Traefik manage TLS-termination
|
||||
- patches/argocd-cmd-params-cm-server-insecure-patch.yaml
|
||||
|
||||
- path: patches/argocd-cm-resource-exclusion-cilium-identity-patch.yaml
|
||||
# Traefik handles TLS
|
||||
- path: patches/argocd-cmd-params-cm-server-insecure-patch.yaml
|
||||
|
||||
16
infra/argocd/patches/argocd-repo-copyutil-patch.yaml
Normal file
16
infra/argocd/patches/argocd-repo-copyutil-patch.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: argocd-repo-server
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: copyutil
|
||||
command: [ /bin/bash ]
|
||||
args:
|
||||
- -c
|
||||
- >-
|
||||
/bin/cp -n /usr/local/bin/argocd /var/run/argocd/argocd-cmp-server &&
|
||||
/bin/cp -n /usr/local/bin/kustomize /var/run/argocd/kustomize &&
|
||||
/bin/cp -n /usr/local/bin/helm /var/run/argocd/helm
|
||||
@@ -3,13 +3,16 @@ 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.8.2
|
||||
env:
|
||||
- name: PATH
|
||||
value: "/var/run/argocd:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
command:
|
||||
- argocd-cmp-server
|
||||
image: alpine/git:2.40.1
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
@@ -18,14 +21,14 @@ spec:
|
||||
mountPath: /var/run/argocd
|
||||
- name: plugins
|
||||
mountPath: /home/argocd/cmp-server/plugins
|
||||
- name: argocd-plugin-config
|
||||
- name: cmp-kustomize-build-with-helm
|
||||
mountPath: /home/argocd/cmp-server/config/plugin.yaml
|
||||
subPath: plugin.yaml
|
||||
subPath: kustomize-build-with-helm.yaml
|
||||
- mountPath: /tmp
|
||||
name: cmp-tmp
|
||||
volumes:
|
||||
- name: argocd-plugin-config
|
||||
- name: cmp-kustomize-build-with-helm
|
||||
configMap:
|
||||
name: argocd-plugin-config
|
||||
name: argocd-cm-cmp-kustomize-build-with-helm
|
||||
- name: cmp-tmp
|
||||
emptyDir: {}
|
||||
emptyDir: { }
|
||||
Reference in New Issue
Block a user