Skip to content

[newrelic-logging] Invalid yaml generated when .Values.exposedPorts, .Values.resources, and .Values.fluentBit.fluentBitMetrics are all set #2057

@aisling-mls

Description

@aisling-mls

Bug description

When setting .Values.exposedPorts, .Values.resources, and .Values.fluentBit.fluentBitMetrics is "basic" invalid yaml is generated for daemonset.yaml

Version of Helm and Kubernetes

Helm version 3.16.3
K8s version 1.33.5

Which chart?

newrelic-logging 1.33.0

What happened?

When these values are set the block
- name: lua-scripts mountPath: /fluent-bit/scripts readOnly: true
is placed under ports instead of volume mounts.

The relevant yaml generated was
` volumeMounts:
- name: fluent-bit-config
mountPath: /fluent-bit/etc
- name: logs
# We mount /var by default because container logs could be on /var/log or /var/lib/docker/containers (symlinked to /var/log)
mountPath: /var
ports:
- containerPort: 2020
hostPort: 2020
name: metrics
protocol: TCP

        - name: lua-scripts
          mountPath: /fluent-bit/scripts
          readOnly: true`

What you expected to happen?

The lua-scripts entry should be under volumeMounts

How to reproduce it?
Set .value.exposedPorts and leave the .Values.fluentBit.fluentBitMetrics set to the default "basic"

Anything else we need to know?

https://github.com/newrelic/helm-charts/blob/master/charts/newrelic-logging/templates/daemonset.yaml#L169-L174

This is the offending block

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.triage/pendingIssue or PR is pending for triage and prioritization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions