Skip to content
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

fix: default resources to empty #488

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smcavallo
Copy link
Contributor

Signed-off-by: smcavallo smcavallo@hotmail.com

Writes the default of resources: {} instead of omitting. The current behavior causes tools like argocd to show a diff.
This is because if the field does not exist kubernetes will set the default.
image

There is already a default in values.yaml and the default is {} so there is no need to wrap in a conditional.

New behavior is:
helm template --values=values.yaml --set licenseKey=123 --set cluster=default .

      containers:
      - name: nri-prometheus
        image: "newrelic/nri-prometheus:2.18.4"
        imagePullPolicy:
        args:
          - "--configfile=/etc/nri-prometheus/config.yaml"
        ports:
          - containerPort: 8080
        volumeMounts:
        - name: config-volume
          mountPath: /etc/nri-prometheus/
        env:
          - name: "LICENSE_KEY"
            valueFrom:
                secretKeyRef:
                  name: release-name-nri-prometheus-license
                  key: licenseKey
          - name: "BEARER_TOKEN_FILE"
            value: "/var/run/secrets/kubernetes.io/serviceaccount/token"
          - name: "CA_FILE"
            value: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
        resources:
          {}
      volumes:
        - name: config-volume
          configMap:
            name: release-name-nri-prometheus

Signed-off-by: smcavallo <smcavallo@hotmail.com>
@smcavallo smcavallo requested a review from a team as a code owner June 21, 2024 15:11
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.

None yet

1 participant