feat: add helmfile-cmp and remove manifest-cmp

This commit is contained in:
2025-05-12 19:58:23 +02:00
parent 4f5e797d9d
commit 910d2dd426
7 changed files with 32 additions and 97 deletions
+7
View File
@@ -0,0 +1,7 @@
FROM ghcr.io/helmfile/helmfile:v0.157.0
RUN mkdir -p /home/argocd/cmp-server/config/
COPY plugin.yaml /home/argocd/cmp-server/config/
WORKDIR /plugin
COPY generate.sh ./
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
img=registry.gitlab.com/oceanbox/manifests/helmfile-cmp
tag=${1:-latest}
docker build -t $img:$tag .
docker push $img:$tag
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
export HOME=/plugin
export HELM_CACHE_HOME=/tmp/helm/cache
export HELM_CONFIG_HOME=/tmp/helm/config
export HELMFILE_CACHE_HOME=/tmp/helmfile/cache
export HELMFILE_TEMPDIR=/tmp/helmfile/tmp
env > /tmp/$ARGOCD_APP_NAME.env
if [[ -v ENV_NAME ]]; then
helmfile -n "$ARGOCD_APP_NAMESPACE" -e $ENV_NAME template --include-crds -q
elif [[ -v ARGOCD_ENV_ENV_NAME ]]; then
helmfile -n "$ARGOCD_APP_NAMESPACE" -e "$ARGOCD_ENV_ENV_NAME" template --include-crds -q
else
helmfile -n "$ARGOCD_APP_NAMESPACE" template --include-crds -q
fi
+12
View File
@@ -0,0 +1,12 @@
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: helmfile
spec:
generate:
command: [ /bin/sh ]
args:
- /plugin/generate.sh
discover:
fileName: helmfile.yaml
lockRepo: false