Skip to content

Conversation

@dpacheconr
Copy link
Contributor

@dpacheconr dpacheconr commented Nov 14, 2025

Summary

Add support for cascading registry, pullSecrets, and pullPolicy from global settings to newrelic-pixie.

Phase 1: Global.Images.Registry Support ✅

  • Updated values.yaml to keep default image repositories with clarifying comments
  • Added helpers to _helpers.tpl to check global.images.registry fallback
  • Updated job.yaml to use new image helpers
  • Both clusterRegistrationWaitImage and main image now support global registry

Phase 2: Global.Images.PullSecrets Support ✅

  • Added newrelic-pixie.imagePullSecrets helper in _helpers.tpl
  • Added newrelic-pixie.clusterWaitImagePullSecrets helper (for future use)
  • Updated job.yaml to use imagePullSecrets helper combining global and chart-level

Phase 3: Global.Images.PullPolicy Support ✅ (NEW)

  • Added newrelic-pixie.clusterWaitImagePullPolicy helper in _helpers.tpl
  • Added newrelic-pixie.imagePullPolicy helper in _helpers.tpl
  • Updated job.yaml to use pullPolicy helpers for both init container and main container
  • Configuration respects hierarchy: global setting → chart-level setting → default (IfNotPresent)

Configuration Hierarchy

For Image Registry:

  1. global.images.registry (if set AND repository matches default)
  2. Explicit repository configuration (takes precedence)

For ImagePullSecrets:

  1. global.images.pullSecrets (highest priority)
  2. image.pullSecrets (chart level)
    Both sources are concatenated to support flexible secret management.

For ImagePullPolicy:

  1. global.images.pullPolicy (highest priority)
  2. Chart-level image.pullPolicy
  3. Default: IfNotPresent

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 original paths
  • PullPolicy hierarchy ensures global settings cascade down when no explicit chart configuration is provided
  • The helper uses toYaml for consistent formatting with existing patterns

Test Plan

Phase 1 (Registry):

  • ✓ 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

Phase 2 (PullSecrets):

  • ✓ No pullSecrets set → No imagePullSecrets section rendered
  • ✓ Global pullSecrets only → Uses global
  • ✓ Both global + chart pullSecrets → Uses both (global items first)

Phase 3 (PullPolicy):

  • ✓ Global pullPolicy is used when set and no chart-level policy exists
  • ✓ Defaults to IfNotPresent when neither global nor chart policy is set
  • ✓ Explicit chart-level pullPolicy overrides global setting

Impact

Once merged, users can now configure newrelic-pixie with comprehensive global image settings:

```yaml
global:
images:
registry: "my.private.registry.com"
pullSecrets:
- name: my-registry-credentials
pullPolicy: Always
```

@dpacheconr dpacheconr requested a review from a team as a code owner November 14, 2025 13:28
@dpacheconr dpacheconr force-pushed the support/global-images-registry branch from 52c1455 to 466a121 Compare November 14, 2025 16:36
@dpacheconr dpacheconr requested a review from a team as a code owner November 14, 2025 16:51
@dpacheconr dpacheconr changed the title feat(newrelic-pixie): support global.images.registry for container images feat(newrelic-pixie): support global.images registry, pullSecrets, and pullPolicy Nov 14, 2025
@dpacheconr dpacheconr force-pushed the support/global-images-registry branch from d194a94 to a98eb3f Compare November 14, 2025 18:14
…ages

Make the newrelic-pixie integration images respect the global.images.registry
setting, enabling consistent private registry configuration across nri-bundle.

Changes:
- Updated values.yaml to keep default image repositories with clarifying comments
- Added helpers to _helpers.tpl to check global.images.registry fallback
- Updated job.yaml to use new image helpers
- Both clusterRegistrationWaitImage and main image now support global registry

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 original 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 newrelic-pixie.imagePullSecrets helper in _helpers.tpl
- Added newrelic-pixie.clusterWaitImagePullSecrets helper (for future use)
- Updated job.yaml to use imagePullSecrets helper combining global and chart-level

Configuration hierarchy:
1. global.images.pullSecrets (applied first)
2. image.pullSecrets (applied second - chart level)
Both sources are concatenated to support flexible secret management.

The helper uses toYaml for consistent formatting with existing patterns.
Add support for cascading pullPolicy from global.images.pullPolicy setting:
- Added pullPolicy helpers to _helpers.tpl for both init and main containers
- Updated job.yaml 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
@dpacheconr dpacheconr force-pushed the support/global-images-registry branch from a98eb3f to 18ac082 Compare November 14, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant