opentelemetry-operator icon indicating copy to clipboard operation
opentelemetry-operator copied to clipboard

DaemonSet deloyment with private container registry unstable (imagePullSecrets not configurable)

Open marcules opened this issue 2 years ago • 5 comments

Hi,

when I configure the OpenTelemetryCollector to run as daemonset only nodes, that already contain images from our private image registry come up - as the nodes where such images are not present can't access the configured otel-collector image.

This is not an issue in sidecar mode, as the configured deployments already contain an imagePullSecrets configuration, which the sidecar can use. The issue exists in daemonset, statefulset and deployment (simplest) mode when using a private registry.

SNAG-0081 SNAG-0082 SNAG-0083

Can you add a configuration for spec.containers.[*].imagePullPolicy and spec.imagePullSecrets to the deployment, daemonset ad statefulset CRD? That would enable us to have a reliable way of deploying the otel-collector with our own images.

LG Marc

marcules avatar Apr 29 '22 13:04 marcules

I don't have objections to add imagePullSecret to the collector CR.

@marcules are you interested in submitting a PR?

pavolloffay avatar May 19 '22 11:05 pavolloffay

As I know, you can also attach imagePullSecrets to service accounts as alternative to define them on the Deamonset

jkroepke avatar Jun 10 '22 11:06 jkroepke

I think this would apply to the Deployment (as opposed to DaemonSet) as well. Just tried using a custom collector and couldn't figure out how to add imagePullSecrets. Going to try adding to the service account, but afaik that service account is managed by the controller so changes could be overwritten.

m1o1 avatar Jun 28 '22 03:06 m1o1

I opened a PR. I need to make sure I follow the contributing guidelines and clean it up, but if it looks like I'm on the right track, I'll fix it up.

m1o1 avatar Jun 28 '22 04:06 m1o1

Hello, I would like to work on this, if possible

protopapa avatar Sep 20 '22 15:09 protopapa

As mentioned by @pavolloffay, The CR has a config option to set a service account that can set the image pull secret.

yuriolisa avatar Feb 21 '23 14:02 yuriolisa