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

add image pull secrets in otel collector spec

Open Hritik003 opened this issue 3 months ago • 2 comments

Description: <Describe what has changed.> This pull request adds support for specifying ImagePullSecrets in the OpenTelemetry Collector Kubernetes resources, allowing users to configure secrets for pulling container images from private registries. The implementation includes updates to the API, resource generation logic, and comprehensive unit tests to verify the new functionality.

API and Struct Enhancements:

  • Added an ImagePullSecrets field to the OpenTelemetryCommonFields struct, enabling users to specify secrets for image pulls in the custom resource definition.
  • Updated the autogenerated DeepCopyInto method to handle deep copying of the new ImagePullSecrets field.

Resource Generation Updates:

  • Modified the Deployment, DaemonSet, and StatefulSet manifest generation functions to set the ImagePullSecrets field in the resulting Kubernetes resource specs, based on the custom resource configuration. [1] [2] [3]

Testing Improvements:

  • Added new unit tests for Deployment, DaemonSet, and StatefulSet resource generation to verify correct handling of the ImagePullSecrets field, including both default (unset) and explicitly set scenarios. [1] [2] [3] Ex. Adding a feature - Explain what this achieves.-->

  • Resolves: #4376

Testing: <Describe what testing was performed and which tests were added.>

Documentation: <Describe the documentation added.>

Hritik003 avatar Sep 23 '25 07:09 Hritik003

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Hritik003 / name: Hritik Raj (7bb09f0b39f5775a33bd537b81aa5cd7cc186224)

@atoulme @iblancasa @TylerHelmuth @yuriolisa A reminder to review the PR and suggest any changes for the same thanks.

Hritik003 avatar Nov 17 '25 05:11 Hritik003