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

[nri-bundle] [newrelic-logging] feat: added support for templated cluster name value #1287

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/newrelic-logging/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ keywords:
- newrelic
dependencies:
- name: common-library
version: 1.1.1
version: 1.1.2
repository: "https://helm-charts.newrelic.com"
10 changes: 1 addition & 9 deletions charts/newrelic-logging/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,7 @@ Return the licenseKey
Return the cluster name
*/}}
{{- define "newrelic-logging.cluster" -}}
{{- if .Values.global}}
{{- if .Values.global.cluster }}
{{- .Values.global.cluster -}}
{{- else -}}
{{- .Values.cluster | default "" -}}
{{- end -}}
{{- else -}}
{{- .Values.cluster | default "" -}}
{{- end -}}
{{ tpl (.Values.cluster | default .Values.global.cluster | default "") . }}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/nri-bundle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- name: newrelic-logging
repository: https://newrelic.github.io/helm-charts
condition: logging.enabled,newrelic-logging.enabled
version: 1.20.2
version: 1.20.3

- name: newrelic-pixie
repository: https://newrelic.github.io/helm-charts
Expand Down
2 changes: 1 addition & 1 deletion charts/super-agent-deployment/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ appVersion: 0.8.0

dependencies:
- name: common-library
version: 1.1.1
version: 1.1.2
Copy link
Member

@paologallinaharbur paologallinaharbur May 6, 2024

Choose a reason for hiding this comment

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

[Just providing feedback on the chart we own]
modifying all charts at the same time is not allowed by the CI/CD
Moreover, the version was not bumped.


On the other hand, this change could be quite important and I'll leave the decision to the K8s team whether we actually want to support this use case (and then "how")

repository: https://helm-charts.newrelic.com

keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/super-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
version: 2.12.2
condition: flux2.enabled
- name: common-library
version: 1.1.1
version: 1.1.2
repository: https://helm-charts.newrelic.com

keywords:
Expand Down
2 changes: 1 addition & 1 deletion library/CHART-TEMPLATE/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ appVersion: "1.16.0"

dependencies:
- name: common-library
version: 1.1.0
version: 1.1.2
repository: file://../common-library # We keep this as a file to test things immediately locally/in the pipeline

keywords:
Expand Down
2 changes: 1 addition & 1 deletion library/common-library/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: common-library
description: Provides helpers to provide consistency on all the charts

type: library
version: 1.1.1
version: 1.1.2

keywords:
- newrelic
Expand Down
4 changes: 2 additions & 2 deletions library/common-library/templates/_cluster.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Return the cluster
{{- $global := index .Values "global" | default dict -}}

{{- if .Values.cluster -}}
{{- .Values.cluster -}}
{{- tpl .Values.cluster . -}}
{{- else if $global.cluster -}}
{{- $global.cluster -}}
{{- tpl $global.cluster . -}}
{{- else -}}
{{ fail "There is not cluster name definition set neither in `.global.cluster' nor `.cluster' in your values.yaml. Cluster name is required." }}
{{- end -}}
Expand Down