-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add global.images registry, pullSecrets, and pullPolicy support to newrelic-infra-operator #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dpacheconr
wants to merge
5
commits into
newrelic:main
Choose a base branch
from
dpacheconr:support/global-images-registry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: add global.images registry, pullSecrets, and pullPolicy support to newrelic-infra-operator #603
dpacheconr
wants to merge
5
commits into
newrelic:main
from
dpacheconr:support/global-images-registry
Conversation
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
2e0ca7c to
f91513d
Compare
Make the newrelic-infra-operator images respect the global.images.registry setting, enabling consistent private registry configuration across nri-bundle. Changes: - Updated _helpers.tpl with global.images.registry support - Makes the infrastructure-k8s sidecar image respect global registry settings - Updated configmap to use the new image helper for sidecar injection Implementation details: - If global.images.registry is set AND repository matches default, uses global registry - If repository is explicitly set to custom value, that takes precedence - If global registry is not set, defaults to standard paths Tested scenarios: ✓ Global registry is used when set and repository is default ✓ Defaults to standard image paths when global registry not configured ✓ Explicit repository configuration overrides global registry
Update imagePullSecrets handling to cascade from global.images.pullSecrets: - Added helpers for both operator and admission webhooks patch job images - Global and chart-level pullSecrets are concatenated together Configuration hierarchy: 1. global.images.pullSecrets (highest priority) 2. Chart-level image.pullSecrets 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 for operator and webhook patch job
- Updated manifests to use pullPolicy helpers
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
f91513d to
a7278c6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #603 +/- ##
=======================================
Coverage 89.80% 89.80%
=======================================
Files 7 7
Lines 451 451
=======================================
Hits 405 405
Misses 29 29
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9b69e0e to
94f4f5e
Compare
94f4f5e to
fbce187
Compare
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 registry, pullSecrets, and pullPolicy from global settings to newrelic-infra-operator.
Phase 1: Global.Images.Registry Support ✅
newrelic-infra-operator.sidecar.imagehelper to check global.images.registry fallbackPhase 2: Global.Images.PullSecrets Support ✅
Phase 3: Global.Images.PullPolicy Support ✅ (NEW)
newrelic-infra-operator.imagePullPolicyfor operator imagenewrelic-infra-operator.admissionWebhooksPatchJob.imagePullPolicyfor webhook patch job imageConfiguration Hierarchy
For Image Registry:
global.images.registry(if set AND repository matches default)For ImagePullSecrets:
global.images.pullSecrets(highest priority)image.pullSecretsBoth sources are concatenated to support flexible secret management.
For ImagePullPolicy:
global.images.pullPolicy(highest priority)image.pullPolicyIfNotPresentImplementation Details
Backward Compatibility
✅ Fully backward compatible:
Test Plan
Phase 1 (Registry):
my.private.registry.com/newrelic/infrastructure-k8s:latestPhase 2 (PullSecrets):
Phase 3 (PullPolicy):
Impact
Once merged, users can now configure image pull behavior globally:
```yaml
global:
images:
registry: "my.private.registry.com"
pullSecrets:
- name: my-registry-credentials
pullPolicy: Always
```
This is part of a broader effort to ensure all New Relic Helm charts in the nri-bundle support consistent private registry configuration.