Skip to content

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

Open
@sdeoras

Description

@sdeoras

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 }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions