Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sidecar injector custom image defaults to different images against same custom value in values.yaml #11

Open
sdeoras opened this issue Mar 11, 2021 · 1 comment

Comments

@sdeoras
Copy link

sdeoras commented Mar 11, 2021

I am experimenting with custom sidecar image and came across the issue that sidecar image image defaults to different images in the deployment spec in the helm chart. This results in deployment readiness error when working with custom images.

In particular, the issue is due to these two images being referenced by the same parameter in dapr_sidecar_injector.image.name

daprio/daprd                              1.0.1              cfcb7254a5a8   6 days ago     86.2MB
daprio/dapr                               1.0.1              9a32ece9aea3   6 days ago     203MB

Steps to repro:

docker tag docker.io/daprio/daprd:1.0.1 registry-x/account-y/image-z:1.2.3
docker push registry-x/account-y/image-z:1.2.3
helm upgrade --install dapr ./helm/dapr \
                --namespace ${DAPR_NAMESPACE} \
                --create-namespace \
                --set=global.imagePullSecrets=registry-x-key \
                --set=dapr_sidecar_injector.image.name=registry-x/account-y/image-z:1.2.3 \
                --wait

This results in error:

  Warning  Failed     1s (x4 over 43s)  kubelet            Error: failed to create containerd task: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/injector\": stat /injector: no such file or directory": unknown

I believe the problem is because we have different defaults in deployment template dapr_sidecar_injector_deployment.yaml

{{- if contains "/" .Values.image.name }}
        image: "{{ .Values.image.name }}"
{{- else }}
        image: "{{ .Values.global.registry }}/dapr:{{ .Values.global.tag }}"
{{- end }}

and

        - name: SIDECAR_IMAGE
{{- if contains "/" .Values.image.name }}
          value: "{{ .Values.image.name }}"
{{- else }}
          value: "{{ .Values.global.registry }}/daprd:{{ .Values.global.tag }}"
{{- end }}
@sdeoras
Copy link
Author

sdeoras commented May 15, 2021

hi folks, any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant