From fa6353376d99387cf0ccfde1508679ae51632917 Mon Sep 17 00:00:00 2001 From: Roberto Santalla Date: Fri, 13 May 2022 14:23:10 +0200 Subject: [PATCH 1/3] chart: add -scraper suffix to pod names --- .../templates/controlplane/_naming.tpl | 4 ++-- .../templates/ksm/_naming.tpl | 4 ++-- .../templates/kubelet/_naming.tpl | 4 ++-- .../newrelic-infrastructure/tests/podName_test.yaml | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/newrelic-infrastructure/templates/controlplane/_naming.tpl b/charts/newrelic-infrastructure/templates/controlplane/_naming.tpl index 7e651426b..a9e77dd46 100644 --- a/charts/newrelic-infrastructure/templates/controlplane/_naming.tpl +++ b/charts/newrelic-infrastructure/templates/controlplane/_naming.tpl @@ -1,8 +1,8 @@ {{- /* Naming helpers*/ -}} {{- define "nriKubernetes.controlplane.fullname" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "controlplane") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "controlplane-scraper") -}} {{- end -}} {{- define "nriKubernetes.controlplane.fullname.agent" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "agent-controlplane") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "controlplane-agent") -}} {{- end -}} diff --git a/charts/newrelic-infrastructure/templates/ksm/_naming.tpl b/charts/newrelic-infrastructure/templates/ksm/_naming.tpl index d8c283c43..1ce9f05dc 100644 --- a/charts/newrelic-infrastructure/templates/ksm/_naming.tpl +++ b/charts/newrelic-infrastructure/templates/ksm/_naming.tpl @@ -1,8 +1,8 @@ {{- /* Naming helpers*/ -}} {{- define "nriKubernetes.ksm.fullname" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "ksm") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "ksm-scraper") -}} {{- end -}} {{- define "nriKubernetes.ksm.fullname.agent" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "agent-ksm") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "ksm-agent") -}} {{- end -}} diff --git a/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl b/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl index 71c142156..1159a4ea3 100644 --- a/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl +++ b/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl @@ -1,10 +1,10 @@ {{- /* Naming helpers*/ -}} {{- define "nriKubernetes.kubelet.fullname" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-scraper") -}} {{- end -}} {{- define "nriKubernetes.kubelet.fullname.agent" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "agent-kubelet") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-agent") -}} {{- end -}} {{- define "nriKubernetes.kubelet.fullname.integrations" -}} diff --git a/charts/newrelic-infrastructure/tests/podName_test.yaml b/charts/newrelic-infrastructure/tests/podName_test.yaml index 81b36c4af..c9c1c5402 100644 --- a/charts/newrelic-infrastructure/tests/podName_test.yaml +++ b/charts/newrelic-infrastructure/tests/podName_test.yaml @@ -20,15 +20,15 @@ tests: asserts: - equal: path: metadata.name - value: RELEASE-NAME-nrk8s-ksm + value: RELEASE-NAME-nrk8s-ksm-scraper template: templates/ksm/deployment.yaml - equal: path: metadata.name - value: RELEASE-NAME-nrk8s-controlplane + value: RELEASE-NAME-nrk8s-controlplane-scraper template: templates/controlplane/daemonset.yaml - equal: path: metadata.name - value: RELEASE-NAME-nrk8s-kubelet + value: RELEASE-NAME-nrk8s-kubelet-scraper template: templates/kubelet/daemonset.yaml - it: name is overridden as expected set: @@ -38,13 +38,13 @@ tests: asserts: - equal: path: metadata.name - value: fno-ksm + value: fno-ksm-scraper template: templates/ksm/deployment.yaml - equal: path: metadata.name - value: fno-controlplane + value: fno-controlplane-scraper template: templates/controlplane/daemonset.yaml - equal: path: metadata.name - value: fno-kubelet + value: fno-kubelet-scraper template: templates/kubelet/daemonset.yaml From 6a9117e082ec79d183d6bd2af55933ecfa9d68f0 Mon Sep 17 00:00:00 2001 From: Roberto Santalla Date: Fri, 13 May 2022 14:57:27 +0200 Subject: [PATCH 2/3] chart: bump version --- charts/newrelic-infrastructure/Chart.lock | 2 +- charts/newrelic-infrastructure/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/newrelic-infrastructure/Chart.lock b/charts/newrelic-infrastructure/Chart.lock index cec82c975..cd6b1672d 100644 --- a/charts/newrelic-infrastructure/Chart.lock +++ b/charts/newrelic-infrastructure/Chart.lock @@ -3,4 +3,4 @@ dependencies: repository: https://helm-charts.newrelic.com version: 1.0.4 digest: sha256:6aeb4d18a5b6c9ee130a010b6f71f6af3a003d52d90e17a64ef58e6649e0388f -generated: "2022-05-05T18:29:49.912421427Z" +generated: "2022-05-13T14:57:16.114864693+02:00" diff --git a/charts/newrelic-infrastructure/Chart.yaml b/charts/newrelic-infrastructure/Chart.yaml index 8c1419f47..e82aeebeb 100644 --- a/charts/newrelic-infrastructure/Chart.yaml +++ b/charts/newrelic-infrastructure/Chart.yaml @@ -8,7 +8,7 @@ sources: - https://github.com/newrelic/nri-kubernetes/tree/master/charts/newrelic-infrastructure - https://github.com/newrelic/infrastructure-agent/ -version: 3.6.2 +version: 3.7.0 appVersion: 3.3.1 dependencies: From 938d6a5b0822d972284c59f90061bf98a0c5bc26 Mon Sep 17 00:00:00 2001 From: Roberto Santalla Date: Tue, 24 May 2022 10:44:41 +0200 Subject: [PATCH 3/3] chart: rename kubelet- to kubelet-node- --- charts/newrelic-infrastructure/templates/kubelet/_naming.tpl | 4 ++-- charts/newrelic-infrastructure/tests/podName_test.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl b/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl index 1159a4ea3..2bca8b984 100644 --- a/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl +++ b/charts/newrelic-infrastructure/templates/kubelet/_naming.tpl @@ -1,10 +1,10 @@ {{- /* Naming helpers*/ -}} {{- define "nriKubernetes.kubelet.fullname" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-scraper") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-node-scraper") -}} {{- end -}} {{- define "nriKubernetes.kubelet.fullname.agent" -}} -{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-agent") -}} +{{- include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" (include "nriKubernetes.naming.fullname" .) "suffix" "kubelet-node-agent") -}} {{- end -}} {{- define "nriKubernetes.kubelet.fullname.integrations" -}} diff --git a/charts/newrelic-infrastructure/tests/podName_test.yaml b/charts/newrelic-infrastructure/tests/podName_test.yaml index c9c1c5402..5e4c56fed 100644 --- a/charts/newrelic-infrastructure/tests/podName_test.yaml +++ b/charts/newrelic-infrastructure/tests/podName_test.yaml @@ -28,7 +28,7 @@ tests: template: templates/controlplane/daemonset.yaml - equal: path: metadata.name - value: RELEASE-NAME-nrk8s-kubelet-scraper + value: RELEASE-NAME-nrk8s-kubelet-node-scraper template: templates/kubelet/daemonset.yaml - it: name is overridden as expected set: @@ -46,5 +46,5 @@ tests: template: templates/controlplane/daemonset.yaml - equal: path: metadata.name - value: fno-kubelet-scraper + value: fno-kubelet-node-scraper template: templates/kubelet/daemonset.yaml