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 across multiple nri-bundle charts.

Phase 1: Global.Images.Registry Support ✅

  • newrelic-logging: Busybox init container (fluentBit.persistenceInitContainerImage) now respects global.images.registry
  • Added helper newrelic-logging.persistenceInitContainerImage in _helpers.tpl
  • Updated daemonset.yaml to use the helper

Phase 2: Global.Images.PullSecrets Support ✅

  • newrelic-pixie: Added imagePullSecrets helpers and updated job.yaml
  • nr-ebpf-agent: Updated both daemonsets (nr-ebpf-agent-daemonset.yaml, otel-collector-daemonset.yaml)
  • newrelic-logging: Updated daemonset.yaml to include global.images.pullSecrets

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

  • newrelic-logging: Added pullPolicy helpers in _helpers.tpl
  • Updated daemonset.yaml to use pullPolicy helpers for main and init containers
  • Configuration respects hierarchy: global setting → chart-level setting → default (IfNotPresent)

Changes by Chart

newrelic-logging (Phase 1 + Phase 2 + Phase 3)

Files Changed:

  • charts/newrelic-logging/values.yaml - Added persistenceInitContainerImage configuration
  • charts/newrelic-logging/templates/_helpers.tpl - Added registry and pullPolicy helpers
  • charts/newrelic-logging/templates/daemonset.yaml - Updated init container and imagePullSecrets/pullPolicy rendering

Configuration Hierarchy:

  • Registry: global.images.registryfluentBit.persistenceInitContainerImage.repository
  • PullSecrets: global.images.pullSecretsimage.pullSecrets
  • PullPolicy: global.images.pullPolicyfluentBit.image.pullPolicy

Test Plan

Phase 1 (newrelic-logging Registry):

  • ✓ Global registry is used when set: my.private.registry.com/busybox:1.36
  • ✓ Defaults to standard image when global registry not configured: busybox:1.36
  • ✓ Explicit repository configuration overrides global registry

Phase 2 (PullSecrets):

  • ✓ No pullSecrets set → No imagePullSecrets section rendered
  • ✓ Global pullSecrets only → Uses global across all charts
  • ✓ 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 image pull behavior globally:

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

This eliminates the need to configure these settings individually for each nri-bundle sub-chart.

@dpacheconr dpacheconr requested review from a team as code owners November 14, 2025 13:57
@dpacheconr dpacheconr changed the title feat(newrelic-logging): support global.images.registry for busybox init container feat: add global.images registry and pullSecrets support to nri-bundle charts Nov 14, 2025
@dpacheconr dpacheconr force-pushed the support/newrelic-logging-final branch from 8fbed24 to 2228ff7 Compare November 14, 2025 16:38
@dpacheconr dpacheconr changed the title feat: add global.images registry and pullSecrets support to nri-bundle charts feat: add global.images registry, pullSecrets, and pullPolicy support to nri-bundle charts Nov 14, 2025
@dpacheconr dpacheconr force-pushed the support/newrelic-logging-final branch from 4d3ce3b to fb84891 Compare November 14, 2025 18:04
…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
@dpacheconr dpacheconr force-pushed the support/newrelic-logging-final branch from fb84891 to 22c6dab 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