add image pull secrets in otel collector spec
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
ImagePullSecretsfield to theOpenTelemetryCommonFieldsstruct, enabling users to specify secrets for image pulls in the custom resource definition. - Updated the autogenerated
DeepCopyIntomethod to handle deep copying of the newImagePullSecretsfield.
Resource Generation Updates:
- Modified the
Deployment,DaemonSet, andStatefulSetmanifest generation functions to set theImagePullSecretsfield in the resulting Kubernetes resource specs, based on the custom resource configuration. [1] [2] [3]
Testing Improvements:
-
Added new unit tests for
Deployment,DaemonSet, andStatefulSetresource generation to verify correct handling of theImagePullSecretsfield, 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.>
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.