feat: add global.images registry, pullSecrets, and pullPolicy support to nri-bundle charts#2005
Closed
dpacheconr wants to merge 3 commits into
Closed
feat: add global.images registry, pullSecrets, and pullPolicy support to nri-bundle charts#2005dpacheconr wants to merge 3 commits into
dpacheconr wants to merge 3 commits into
Conversation
8fbed24 to
2228ff7
Compare
fb84891 to
22c6dab
Compare
…onset Update imagePullSecrets handling to cascade from global.images.pullSecrets: - Updated daemonset.yaml to include global.images.pullSecrets rendering - Both global and chart-level pullSecrets are concatenated together Configuration hierarchy: 1. global.images.pullSecrets (applied first) 2. image.pullSecrets (applied second - chart level) Both sources are concatenated to support flexible secret management.
Add support for cascading pullPolicy from global.images.pullPolicy setting:
- Added pullPolicy helpers to _helpers.tpl
- Updated main image and init container helpers to support global pullPolicy
Configuration hierarchy for pullPolicy:
1. global.images.pullPolicy (highest priority)
2. Chart-level image.pullPolicy
3. Default: IfNotPresent
Users can now configure pull policy globally:
global:
images:
pullPolicy: Always
…ullPolicy, add tests - Add missing newrelic-logging.persistenceInitContainerImage helper (was called but undefined) - Fix pullPolicy precedence on both helpers: chart-specific > global > default (IfNotPresent) - Wire daemonset.yaml init container to use persistenceInitContainerImagePullPolicy helper - Wire daemonset.yaml main container to use imagePullPolicy helper (was using .Values directly) - Restore securityContext on init container dropped during conflict resolution - Add tests: LICENSE_KEY secret name+key values, main/init pullPolicy precedence, init registry precedence
22c6dab to
57e9baa
Compare
Contributor
Author
|
Rebased onto master, resolved conflicts, and fixed several issues found during the rebase: added missing persistenceInitContainerImage helper (was called but undefined), corrected pullPolicy precedence to chart → global → default, wired both containers to use the helpers instead of direct .Values access, and added test coverage. |
dpacheconr
added a commit
to dpacheconr/helm-charts
that referenced
this pull request
Mar 24, 2026
…pullPolicy support Consolidates changes from PR newrelic#2005 into this branch: - Add persistenceInitContainerImage helper: global.images.registry is prepended to busybox when set; chart-level repository takes precedence - Add imagePullPolicy helper: chart-specific > global.images.pullPolicy > IfNotPresent - Add persistenceInitContainerImagePullPolicy helper: same precedence for init container - Wire daemonset.yaml init container to use image/pullPolicy helpers - Wire main container imagePullPolicy to use imagePullPolicy helper - Add fluentBit.persistenceInitContainerImage values block (repo, tag, pullPolicy) - Add images_test.yaml: LICENSE_KEY secret, pullPolicy precedence, init container image/pullPolicy tests (180 lines, 11 new test cases) Note: global.images.pullSecrets is handled automatically by the common-library renderPullSecrets helper via context; no custom wiring needed. Closes newrelic#2005
Contributor
Author
|
Closing in favour of #2023 which now consolidates all changes from this PR. The global.images registry, pullSecrets, and pullPolicy helpers + daemonset wiring + images_test.yaml have been merged into that branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for cascading
global.images.registry,pullSecrets, andpullPolicyfrom global settings tonewrelic-logging.Phase 1: Global.Images.Registry Support ✅
newrelic-logging.persistenceInitContainerImagehelper in_helpers.tpldaemonset.yamlinit container to use the helper instead of hardcodedbusybox:1.36fluentBit.persistenceInitContainerImageconfiguration tovalues.yamlPhase 2: Global.Images.PullSecrets Support ✅
daemonset.yamlto includeglobal.images.pullSecretsalongside chart-levelimage.pullSecretsnewrelic.common.images.renderPullSecretshelperPhase 3: Global.Images.PullPolicy Support ✅
newrelic-logging.imagePullPolicyhelper in_helpers.tplnewrelic-logging.persistenceInitContainerImagePullPolicyhelper in_helpers.tpldaemonset.yamlto use pullPolicy helpers for both main container and init containerIfNotPresent)Configuration Hierarchy
For Image Registry:
fluentBit.persistenceInitContainerImage.repositoryat chart level (takes precedence)global.images.registry(used when repository matches default)busyboxFor ImagePullSecrets:
image.pullSecrets(chart level, highest priority)global.images.pullSecretsBoth sources are concatenated to support flexible secret management.
For ImagePullPolicy:
image.pullPolicy/fluentBit.persistenceInitContainerImage.pullPolicy(highest priority)global.images.pullPolicyIfNotPresentImplementation Details
fluentBit.persistenceInitContainerImage.repositoryis explicitly set to a custom value, it takes precedence over global registryglobal.images.registryis set and repository matches the default (busybox), the global registry is prependedbusybox:1.36) is used unchangedTest Plan
Phase 1 (Registry):
busybox:1.36image used when no global registry setmy-registry.com/busybox:1.36)Phase 2 (PullSecrets):
imagePullSecretssection renderedPhase 3 (PullPolicy):
IfNotPresentwhen neither chart nor global value is set (main and init container)License Key:
LICENSE_KEYenv references correct secret name (<release>-newrelic-logging-config) and key (license)customSecretName+customSecretLicenseKeyvalues are used correctly when setImpact
Once merged, users can configure
newrelic-loggingimage pull behaviour globally: