Skip to content

Conversation

@mattjohnson
Copy link
Collaborator

Summary

Fixes an issue where the fluentd sidecar container in the iq-server deployment was not respecting the fluentd.image.registry value from values.yaml, preventing customers from specifying a custom container registry for their fluentd images.

Problem

The Helm chart specifies the Fluentd container image in two locations when Fluentd is enabled:

  • The Fluentd sub-chart dependency (correctly uses registry, repository, and tag)
  • The iq-server sidecar container (only used repository and tag)

This prevented users from specifying a custom image registry for the sidecar, leading to inconsistent image sources and potential image pull errors when using private registries.

Solution

  1. Added a new helper function nexus-iq-server-ha.fluentdImage in _helpers.tpl that includes the registry in the image path when set
  2. Updated iq-server-deployment.yaml to use the helper function instead of direct template references
  3. Added test coverage to verify the fix works with and without custom registry values

Backward Compatibility

This change maintains full backward compatibility. The helper function checks if fluentd.image.registry is set:

  • If set: Includes it in the image path (e.g., private-registry.example.com/bitnami/fluentd:1.18.0)
  • If not set: Falls back to default behavior (e.g., docker.io/bitnami/fluentd:1.18.0)

Customers without a custom registry will continue to work as before.

Testing

  • Added 2 new tests to verify custom registry support and backward compatibility
  • All 89 tests pass (87 existing + 2 new)
  • Updated existing test expectations to match fluentd subchart's default values

Customer Impact

Resolves issues for customers who use private or custom container registries for their Fluentd images, enabling consistent registry configuration across all Fluentd instances managed by the chart.

…35225

Problem:
The fluentd sidecar container in iq-server-deployment.yaml was not
respecting the fluentd.image.registry value from values.yaml, causing
image pull failures when customers specified a custom registry.

Solution:
1. Added a new helper function 'nexus-iq-server-ha.fluentdImage' in
   _helpers.tpl that includes the registry in the image path when set
2. Updated iq-server-deployment.yaml to use the helper function
3. Added tests to verify the fix works with and without custom registry

This fix maintains backward compatibility - customers without a custom
registry will continue to work as before.

Fixes: CLM-35225
The fluentd subchart's default values include the docker.io registry prefix
in the image path. Updated test assertions to match the actual rendered
output.
- name: FLUENTD_DAEMON_GROUP
value: fluentd
image: bitnami/fluentd:1.18.0-debian-12-r0
image: docker.io/bitnami/fluentd:1.18.0-debian-12-r0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the registry should be included here, if not registry is defined, docker.io is not added by default according to the helper function.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests work as expected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is because the helper changes it to default to the full name, instead of an implied default registry, and thats what is defined in the default values for the subchart https://artifacthub.io/packages/helm/bitnami/fluentd?modal=values

Copy link

@codetreras codetreras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart form the tests, it looks good.

@mattjohnson mattjohnson merged commit ba4c32f into main Oct 27, 2025
1 check passed
@mattjohnson mattjohnson deleted the fix/CLM-35225-fluentd-image-registry branch October 27, 2025 18:49
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.

3 participants