We are trying to deploy few deployment files with argocd app create
command. Our yaml file contains a parameter for specifying the image name dynamically. We are looking at passing the image value with argocd cli to replace this variable during runtime. Parameter overrides of argocd don't seem to work for non-helm deployments.
Below is the deployment.yaml
file which hold the placeholders for the image:
spec:
containers:
- name: helloworld-gitlab
image: '###IMAGE###'
kustomization.yaml
is as below:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gitlab_msd_deployment.yaml
- gitlab_msd_service.yaml
We are passing the below values in the argocd command.
argocd app create helloworld-gitlab --repo https://example.git --path ./k8s-deployments/ --dest-server https://kubernetes.default.svc --dest-namespace ${NAMESPACE} --kustomize-image $IMAGE
But the pod has InvalidImageName
state with the error below:
Failed to apply default image tag "###IMAGE###": couldn't parse image reference "###IMAGE###": invalid reference format: repository name must be lowercase
Any idea how we can get the placeholder replaced with the value sent in the argocd app create
command?
Any other ideas?