I’m trying to set up an Argo CD deployment with a Helmfile plugin in my Rancher kubernetes cluster, following this reference document. However, I am encountering issues with volume mounts not being found. Here are the details of my setup:
ConfigMap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: cmp-helmfile
namespace: argocd
data:
plugin.yaml: |
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: cmp-helmfile
spec:
version: v1.0
init:
command: [sh, -c, 'echo "Initializing..."']
generate:
command: [sh, -c]
args: ["helmfile template --quiet --namespace $ARGOCD_APP_NAMESPACE"]
discover:
fileName: "helmfile.yaml"
Deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-repo-server
namespace: argocd
spec:
template:
spec:
containers:
- name: cmp-helmfile
securityContext:
runAsNonRoot: true
runAsUser: 999
image: ghcr.io/helmfile/helmfile:v0.157.0
imagePullPolicy: IfNotPresent
# Entrypoint should be Argo CD lightweight CMP server i.e. argocd-cmp-server
command: [/var/run/argocd/argocd-cmp-server]
volumeMounts:
- mountPath: /var/run/argocd
name: var-files
- mountPath: /home/argocd/cmp-server/plugins
name: plugins
- mountPath: /home/argocd/cmp-server/config/plugin.yaml
subPath: plugin.yaml
name: cmp-helmfile
- mountPath: /tmp
name: cmp-tmp
volumes:
- name: cmp-helmfile
configMap:
name: cmp-helmfile
- emptyDir: {}
name: cmp-tmp
Error Message:
- spec.template.spec.containers[0].volumeMounts[0].name: Not found: “var-files”
- spec.template.spec.containers[0].volumeMounts1.name: Not found: “plugins”
I am unsure about the source for /var/run/argocd. According to the reference document, it seems like it should be provided by Argo CD, but I can’t find details on how it is supposed to be mounted.
Questions:
-
Where should the /var/run/argocd mount come from, and how should it be defined in the deployment?
-
How can I resolve the error indicating that var-files and plugins volumes are not found?
Any guidance on these issues would be greatly appreciated. Thank you!
hamed saadati is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.