diff --git a/cost-analyzer/templates/_helpers.tpl b/cost-analyzer/templates/_helpers.tpl index 69c07c155..91fc1aece 100755 --- a/cost-analyzer/templates/_helpers.tpl +++ b/cost-analyzer/templates/_helpers.tpl @@ -467,18 +467,9 @@ Create the chart labels. {{- define "cost-analyzer.chartLabels" -}} helm.sh/chart: {{ include "cost-analyzer.chart" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} -{{- define "kubecost.chartLabels" -}} -app.kubernetes.io/name: {{ include "cost-analyzer.name" . }} -helm.sh/chart: {{ include "cost-analyzer.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} -{{- define "kubecost.aggregator.chartLabels" -}} -app.kubernetes.io/name: {{ include "aggregator.name" . }} -helm.sh/chart: {{ include "cost-analyzer.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.chartLabels }} +{{ toYaml .Values.chartLabels }} +{{- end }} {{- end -}} diff --git a/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml b/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml index 4bd0f6cf7..9e318c88f 100644 --- a/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml +++ b/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml @@ -15,7 +15,7 @@ metadata: name: {{ template "cloudCost.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cloudCost.commonLabels" . | nindent 4 }} + {{- include "cloudCost.commonLabels" . | nindent 4 }} {{- with .Values.global.additionalLabels }} {{- toYaml . | nindent 4 }} {{- end }} @@ -23,7 +23,7 @@ spec: replicas: 1 selector: matchLabels: - {{ include "cloudCost.selectorLabels" . | nindent 6 }} + {{- include "cloudCost.selectorLabels" . | nindent 6 }} strategy: type: Recreate template: diff --git a/cost-analyzer/templates/aggregator-cloud-cost-service-account.yaml b/cost-analyzer/templates/aggregator-cloud-cost-service-account.yaml index c8018f77b..0f72059f5 100644 --- a/cost-analyzer/templates/aggregator-cloud-cost-service-account.yaml +++ b/cost-analyzer/templates/aggregator-cloud-cost-service-account.yaml @@ -13,7 +13,7 @@ metadata: name: {{ template "cloudCost.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cloudCost.commonLabels" . | nindent 4 }} + {{- include "cloudCost.commonLabels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/cost-analyzer/templates/aggregator-cloud-cost-service.yaml b/cost-analyzer/templates/aggregator-cloud-cost-service.yaml index bef9bfdc5..bb38a2164 100644 --- a/cost-analyzer/templates/aggregator-cloud-cost-service.yaml +++ b/cost-analyzer/templates/aggregator-cloud-cost-service.yaml @@ -5,10 +5,10 @@ metadata: name: {{ template "cloudCost.serviceName" . }} namespace: {{ .Release.Namespace }} labels: -{{ include "cloudCost.commonLabels" . | nindent 4 }} + {{- include "cloudCost.commonLabels" . | nindent 4 }} spec: selector: -{{ include "cloudCost.selectorLabels" . | nindent 4 }} + {{- include "cloudCost.selectorLabels" . | nindent 4 }} type: "ClusterIP" ports: - name: tcp-api diff --git a/cost-analyzer/templates/aggregator-service.yaml b/cost-analyzer/templates/aggregator-service.yaml index 134c2f37d..956ebef06 100644 --- a/cost-analyzer/templates/aggregator-service.yaml +++ b/cost-analyzer/templates/aggregator-service.yaml @@ -5,13 +5,13 @@ metadata: name: {{ template "aggregator.serviceName" . }} namespace: {{ .Release.Namespace }} labels: -{{ include "aggregator.commonLabels" . | nindent 4 }} -{{- if .Values.kubecostAggregator.service.labels }} + {{- include "aggregator.commonLabels" . | nindent 4 }} + {{- if .Values.kubecostAggregator.service.labels }} {{- toYaml .Values.kubecostAggregator.service.labels | nindent 4 }} -{{- end }} + {{- end }} spec: selector: -{{ include "aggregator.selectorLabels" . | nindent 4 }} + {{- include "aggregator.selectorLabels" . | nindent 4 }} type: "ClusterIP" ports: - name: tcp-api diff --git a/cost-analyzer/templates/aggregator-servicemonitor.yaml b/cost-analyzer/templates/aggregator-servicemonitor.yaml index 670ae4794..7f9c93937 100644 --- a/cost-analyzer/templates/aggregator-servicemonitor.yaml +++ b/cost-analyzer/templates/aggregator-servicemonitor.yaml @@ -5,7 +5,7 @@ metadata: name: {{ include "aggregator.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "aggregator.commonLabels" . | nindent 4 }} + {{- include "aggregator.commonLabels" . | nindent 4 }} {{- if .Values.serviceMonitor.aggregatorMetrics.additionalLabels }} {{ toYaml .Values.serviceMonitor.aggregatorMetrics.additionalLabels | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/alibaba-service-key-secret.yaml b/cost-analyzer/templates/alibaba-service-key-secret.yaml index bffb7d8fe..4bdded0b6 100644 --- a/cost-analyzer/templates/alibaba-service-key-secret.yaml +++ b/cost-analyzer/templates/alibaba-service-key-secret.yaml @@ -7,7 +7,7 @@ metadata: name: cloud-service-key namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: service-key.json: |- diff --git a/cost-analyzer/templates/aws-service-key-secret.yaml b/cost-analyzer/templates/aws-service-key-secret.yaml index eeecc03f9..51966f27e 100644 --- a/cost-analyzer/templates/aws-service-key-secret.yaml +++ b/cost-analyzer/templates/aws-service-key-secret.yaml @@ -7,7 +7,7 @@ metadata: name: cloud-service-key namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: service-key.json: |- diff --git a/cost-analyzer/templates/awsstore-service-account-template.yaml b/cost-analyzer/templates/awsstore-service-account-template.yaml index 0dadeaacc..086a8dc1f 100644 --- a/cost-analyzer/templates/awsstore-service-account-template.yaml +++ b/cost-analyzer/templates/awsstore-service-account-template.yaml @@ -6,7 +6,7 @@ metadata: name: awsstore-serviceaccount namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- with .Values.awsstore.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/cost-analyzer/templates/azure-service-key-secret.yaml b/cost-analyzer/templates/azure-service-key-secret.yaml index e61b61e86..64b9231a6 100644 --- a/cost-analyzer/templates/azure-service-key-secret.yaml +++ b/cost-analyzer/templates/azure-service-key-secret.yaml @@ -7,7 +7,7 @@ metadata: name: cloud-service-key namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: service-key.json: |- diff --git a/cost-analyzer/templates/azure-storage-config-secret.yaml b/cost-analyzer/templates/azure-storage-config-secret.yaml index f27cb4e89..aa813277e 100644 --- a/cost-analyzer/templates/azure-storage-config-secret.yaml +++ b/cost-analyzer/templates/azure-storage-config-secret.yaml @@ -10,7 +10,7 @@ metadata: name: azure-storage-config namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: azure-storage-config.json: |- diff --git a/cost-analyzer/templates/cost-analyzer-account-mapping-configmap.yaml b/cost-analyzer/templates/cost-analyzer-account-mapping-configmap.yaml index 3c4902395..1668526b3 100644 --- a/cost-analyzer/templates/cost-analyzer-account-mapping-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-account-mapping-configmap.yaml @@ -5,7 +5,8 @@ kind: ConfigMap metadata: name: "account-mapping" namespace: {{ .Release.Namespace }} - labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + labels: + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: account-map.json: '{{ toJson .Values.kubecostProductConfigs.cloudAccountMapping }}' {{- end }} diff --git a/cost-analyzer/templates/cost-analyzer-alerts-configmap.yaml b/cost-analyzer/templates/cost-analyzer-alerts-configmap.yaml index 3a2554411..ba30ca541 100644 --- a/cost-analyzer/templates/cost-analyzer-alerts-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-alerts-configmap.yaml @@ -4,7 +4,8 @@ kind: ConfigMap metadata: name: {{ default "alert-configs" .Values.alertConfigmapName }} namespace: {{ .Release.Namespace }} - labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + labels: + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: alerts.json: '{{ toJson .Values.global.notifications.alertConfigs }}' {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-asset-reports-configmap.yaml b/cost-analyzer/templates/cost-analyzer-asset-reports-configmap.yaml index 387b0afc8..076e3adbd 100644 --- a/cost-analyzer/templates/cost-analyzer-asset-reports-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-asset-reports-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: {{ default "asset-report-configs" .Values.assetReportConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: asset-reports.json: '{{ toJson .Values.global.assetReports.reports }}' {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-cloud-cost-reports-configmap.yaml b/cost-analyzer/templates/cost-analyzer-cloud-cost-reports-configmap.yaml index 97e74156f..783f47dab 100644 --- a/cost-analyzer/templates/cost-analyzer-cloud-cost-reports-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-cloud-cost-reports-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: {{default "cloud-cost-report-configs" .Values.cloudCostReportConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: cloud-cost-reports.json: '{{ toJson .Values.global.cloudCostReports.reports }}' {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-cluster-role-binding-template.yaml b/cost-analyzer/templates/cost-analyzer-cluster-role-binding-template.yaml index 91867dd90..5294b2660 100755 --- a/cost-analyzer/templates/cost-analyzer-cluster-role-binding-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-cluster-role-binding-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "cost-analyzer.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -24,7 +24,7 @@ kind: ClusterRoleBinding metadata: name: {{ template "cost-analyzer.serviceAccountName" . }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/cost-analyzer/templates/cost-analyzer-cluster-role-template.yaml b/cost-analyzer/templates/cost-analyzer-cluster-role-template.yaml index a76d2fe55..ff64e820c 100644 --- a/cost-analyzer/templates/cost-analyzer-cluster-role-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-cluster-role-template.yaml @@ -6,7 +6,7 @@ metadata: namespace: {{ .Release.Namespace }} name: {{ template "cost-analyzer.serviceAccountName" . }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} rules: - apiGroups: - '' @@ -32,7 +32,7 @@ kind: ClusterRole metadata: name: {{ template "cost-analyzer.serviceAccountName" . }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} rules: - apiGroups: - '' diff --git a/cost-analyzer/templates/cost-analyzer-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-config-map-template.yaml index b84b9a496..7bd8892e4 100755 --- a/cost-analyzer/templates/cost-analyzer-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-config-map-template.yaml @@ -4,7 +4,7 @@ metadata: name: {{ template "cost-analyzer.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.global.prometheus.enabled }} {{- if .Values.global.zone }} diff --git a/cost-analyzer/templates/cost-analyzer-db-pvc-template.yaml b/cost-analyzer/templates/cost-analyzer-db-pvc-template.yaml index 9b81ee367..14c3024fc 100755 --- a/cost-analyzer/templates/cost-analyzer-db-pvc-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-db-pvc-template.yaml @@ -8,7 +8,7 @@ metadata: name: {{ template "cost-analyzer.fullname" . }}-db namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- with .Values.persistentVolume.labels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml index 190afcd3f..ad8a64e11 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -12,7 +12,7 @@ metadata: name: nginx-conf namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: nginx.conf: | gzip_static on; diff --git a/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml b/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml index 7ca2cea4a..5283c2f0d 100644 --- a/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: {{ default "ingestion-configs" .Values.ingestionConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: standardDiscount: "{{ .Values.kubecostProductConfigs.standardDiscount }}" helmConfig: "true" diff --git a/cost-analyzer/templates/cost-analyzer-metrics-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-metrics-config-map-template.yaml index 136d7fa9a..3fe7ff5ee 100644 --- a/cost-analyzer/templates/cost-analyzer-metrics-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-metrics-config-map-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ default "metrics-config" .Values.metricsConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: metrics.json: '{{ toJson .Values.kubecostProductConfigs.metricsConfigs }}' {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-network-costs-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-network-costs-config-map-template.yaml index 378fca584..1ea73aa54 100644 --- a/cost-analyzer/templates/cost-analyzer-network-costs-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-network-costs-config-map-template.yaml @@ -7,7 +7,7 @@ metadata: name: network-costs-config namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: config.yaml: | {{- toYaml .Values.networkCosts.config | nindent 4 }} diff --git a/cost-analyzer/templates/cost-analyzer-oidc-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-oidc-config-map-template.yaml index cb44943d3..9f6461c56 100644 --- a/cost-analyzer/templates/cost-analyzer-oidc-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-oidc-config-map-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "cost-analyzer.fullname" . }}-oidc namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- $root := . }} oidc.json: |- diff --git a/cost-analyzer/templates/cost-analyzer-pkey-configmap.yaml b/cost-analyzer/templates/cost-analyzer-pkey-configmap.yaml index 6420ac75a..9afdb7f73 100644 --- a/cost-analyzer/templates/cost-analyzer-pkey-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-pkey-configmap.yaml @@ -11,7 +11,7 @@ metadata: name: {{ default "product-configs" .Values.productConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.kubecostProductConfigs.productKey.key }} key: {{ .Values.kubecostProductConfigs.productKey.key | quote }} diff --git a/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml b/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml index 1325d4434..9ca6ba33c 100644 --- a/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml @@ -5,7 +5,7 @@ metadata: name: {{ default "pricing-configs" .Values.pricingConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.kubecostProductConfigs.defaultModelPricing }} {{- if .Values.kubecostProductConfigs.defaultModelPricing.enabled }} diff --git a/cost-analyzer/templates/cost-analyzer-prometheusrule-template.yaml b/cost-analyzer/templates/cost-analyzer-prometheusrule-template.yaml index eba7797f3..28afac4d0 100644 --- a/cost-analyzer/templates/cost-analyzer-prometheusrule-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-prometheusrule-template.yaml @@ -9,7 +9,7 @@ metadata: name: {{ include "cost-analyzer.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if .Values.prometheusRule.additionalLabels }} {{ toYaml .Values.prometheusRule.additionalLabels | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/cost-analyzer-pvc-template.yaml b/cost-analyzer/templates/cost-analyzer-pvc-template.yaml index 82a9cdcd0..002ea3c51 100755 --- a/cost-analyzer/templates/cost-analyzer-pvc-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-pvc-template.yaml @@ -7,7 +7,7 @@ metadata: name: {{ template "cost-analyzer.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- with .Values.persistentVolume.labels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/cost-analyzer-saml-config-map-template.yaml b/cost-analyzer/templates/cost-analyzer-saml-config-map-template.yaml index 3293f2598..df5dbb32e 100644 --- a/cost-analyzer/templates/cost-analyzer-saml-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-saml-config-map-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "cost-analyzer.fullname" . }}-saml namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- $root := . }} saml.json: '{{ toJson .Values.saml }}' diff --git a/cost-analyzer/templates/cost-analyzer-saved-reports-configmap.yaml b/cost-analyzer/templates/cost-analyzer-saved-reports-configmap.yaml index 285229ab2..a04c6ea6d 100644 --- a/cost-analyzer/templates/cost-analyzer-saved-reports-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-saved-reports-configmap.yaml @@ -6,7 +6,7 @@ metadata: name: {{default "saved-report-configs" .Values.savedReportConfigmapName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: saved-reports.json: '{{ toJson .Values.global.savedReports.reports }}' {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-server-configmap.yaml b/cost-analyzer/templates/cost-analyzer-server-configmap.yaml index 57038b9cd..c310eb629 100644 --- a/cost-analyzer/templates/cost-analyzer-server-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-server-configmap.yaml @@ -5,7 +5,8 @@ kind: ConfigMap metadata: name: {{ default "app-configs" .Values.appConfigmapName }} namespace: {{ .Release.Namespace }} - labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + labels: + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.kubecostProductConfigs.labelMappingConfigs }} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.enabled }} diff --git a/cost-analyzer/templates/cost-analyzer-service-account-template.yaml b/cost-analyzer/templates/cost-analyzer-service-account-template.yaml index f2a2cec80..1aaa628af 100755 --- a/cost-analyzer/templates/cost-analyzer-service-account-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-service-account-template.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "cost-analyzer.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/cost-analyzer/templates/cost-analyzer-servicemonitor-template.yaml b/cost-analyzer/templates/cost-analyzer-servicemonitor-template.yaml index fb3379246..3fece145d 100644 --- a/cost-analyzer/templates/cost-analyzer-servicemonitor-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-servicemonitor-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ include "cost-analyzer.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if .Values.serviceMonitor.additionalLabels }} {{ toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }} {{- end }} @@ -29,6 +29,6 @@ spec: - {{ .Release.Namespace }} selector: matchLabels: - {{ include "cost-analyzer.selectorLabels" . | nindent 6 }} + {{- include "cost-analyzer.selectorLabels" . | nindent 6 }} {{- end }} {{- end }} diff --git a/cost-analyzer/templates/etl-utils-service.yaml b/cost-analyzer/templates/etl-utils-service.yaml index 8296d7faa..4a81968b6 100644 --- a/cost-analyzer/templates/etl-utils-service.yaml +++ b/cost-analyzer/templates/etl-utils-service.yaml @@ -6,10 +6,10 @@ metadata: name: {{ template "etlUtils.serviceName" . }} namespace: {{ .Release.Namespace }} labels: -{{ include "etlUtils.commonLabels" . | nindent 4 }} + {{- include "etlUtils.commonLabels" . | nindent 4 }} spec: selector: -{{ include "etlUtils.selectorLabels" . | nindent 4 }} + {{- include "etlUtils.selectorLabels" . | nindent 4 }} type: "ClusterIP" ports: - name: api diff --git a/cost-analyzer/templates/external-grafana-config-map-template.yaml b/cost-analyzer/templates/external-grafana-config-map-template.yaml index 1ac24ee3e..b185a9dcf 100644 --- a/cost-analyzer/templates/external-grafana-config-map-template.yaml +++ b/cost-analyzer/templates/external-grafana-config-map-template.yaml @@ -5,7 +5,7 @@ metadata: name: external-grafana-config-map namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: grafanaURL: {{ .Values.global.grafana.scheme | default "http" }}://{{- .Values.global.grafana.domainName }} {{- end -}} \ No newline at end of file diff --git a/cost-analyzer/templates/grafana-dashboard-attached-disks.yaml b/cost-analyzer/templates/grafana-dashboard-attached-disks.yaml index 380964046..d00ece4be 100644 --- a/cost-analyzer/templates/grafana-dashboard-attached-disks.yaml +++ b/cost-analyzer/templates/grafana-dashboard-attached-disks.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-cluster-metrics-template.yaml b/cost-analyzer/templates/grafana-dashboard-cluster-metrics-template.yaml index 729869176..56dbbb704 100644 --- a/cost-analyzer/templates/grafana-dashboard-cluster-metrics-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-cluster-metrics-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-cluster-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-cluster-utilization-template.yaml index 2cdbd394c..3f29d0e24 100644 --- a/cost-analyzer/templates/grafana-dashboard-cluster-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-cluster-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-deployment-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-deployment-utilization-template.yaml index f12d1095b..a349f8ac4 100644 --- a/cost-analyzer/templates/grafana-dashboard-deployment-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-deployment-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-kubernetes-resource-efficiency-template.yaml b/cost-analyzer/templates/grafana-dashboard-kubernetes-resource-efficiency-template.yaml index 60ad32d43..b272ee7e2 100644 --- a/cost-analyzer/templates/grafana-dashboard-kubernetes-resource-efficiency-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-kubernetes-resource-efficiency-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-label-cost-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-label-cost-utilization-template.yaml index e08092459..3fd558703 100644 --- a/cost-analyzer/templates/grafana-dashboard-label-cost-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-label-cost-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-namespace-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-namespace-utilization-template.yaml index f6d28686b..7c54d8fd7 100644 --- a/cost-analyzer/templates/grafana-dashboard-namespace-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-namespace-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-network-cloud-sevices.yaml b/cost-analyzer/templates/grafana-dashboard-network-cloud-sevices.yaml index af72b6664..b4dd541d9 100644 --- a/cost-analyzer/templates/grafana-dashboard-network-cloud-sevices.yaml +++ b/cost-analyzer/templates/grafana-dashboard-network-cloud-sevices.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-network-costs.yaml b/cost-analyzer/templates/grafana-dashboard-network-costs.yaml index 2e753745d..f51cb11ab 100644 --- a/cost-analyzer/templates/grafana-dashboard-network-costs.yaml +++ b/cost-analyzer/templates/grafana-dashboard-network-costs.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-node-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-node-utilization-template.yaml index 8f2998c25..f364358d5 100644 --- a/cost-analyzer/templates/grafana-dashboard-node-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-node-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-pod-utilization-multi-cluster.yaml b/cost-analyzer/templates/grafana-dashboard-pod-utilization-multi-cluster.yaml index 7b8b6ae7a..5766c9a4b 100644 --- a/cost-analyzer/templates/grafana-dashboard-pod-utilization-multi-cluster.yaml +++ b/cost-analyzer/templates/grafana-dashboard-pod-utilization-multi-cluster.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-pod-utilization-template.yaml b/cost-analyzer/templates/grafana-dashboard-pod-utilization-template.yaml index 04374ff43..0a21343da 100644 --- a/cost-analyzer/templates/grafana-dashboard-pod-utilization-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-pod-utilization-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-prometheus-metrics-template.yaml b/cost-analyzer/templates/grafana-dashboard-prometheus-metrics-template.yaml index 723767c97..fa8663047 100644 --- a/cost-analyzer/templates/grafana-dashboard-prometheus-metrics-template.yaml +++ b/cost-analyzer/templates/grafana-dashboard-prometheus-metrics-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-workload-aggregator.yaml b/cost-analyzer/templates/grafana-dashboard-workload-aggregator.yaml index 40dfb558b..bd384373a 100644 --- a/cost-analyzer/templates/grafana-dashboard-workload-aggregator.yaml +++ b/cost-analyzer/templates/grafana-dashboard-workload-aggregator.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/grafana-dashboard-workload-metrics.yaml b/cost-analyzer/templates/grafana-dashboard-workload-metrics.yaml index fa027dce7..429909c5a 100644 --- a/cost-analyzer/templates/grafana-dashboard-workload-metrics.yaml +++ b/cost-analyzer/templates/grafana-dashboard-workload-metrics.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{ $.Values.grafana.namespace_dashboards }} {{- end }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if $.Values.grafana.sidecar.dashboards.label }} {{ $.Values.grafana.sidecar.dashboards.label }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}" {{- else }} diff --git a/cost-analyzer/templates/install-plugins.yaml b/cost-analyzer/templates/install-plugins.yaml index f2abf1c41..372af0478 100644 --- a/cost-analyzer/templates/install-plugins.yaml +++ b/cost-analyzer/templates/install-plugins.yaml @@ -4,7 +4,7 @@ kind: ConfigMap metadata: name: {{ template "cost-analyzer.fullname" . }}-install-plugins labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: install_plugins.sh: |- {{- if .Values.kubecostModel.plugins.install.enabled }} diff --git a/cost-analyzer/templates/integrations-postgres-queries-configmap.yaml b/cost-analyzer/templates/integrations-postgres-queries-configmap.yaml index 5e0af3e00..59f08cdd3 100644 --- a/cost-analyzer/templates/integrations-postgres-queries-configmap.yaml +++ b/cost-analyzer/templates/integrations-postgres-queries-configmap.yaml @@ -5,7 +5,7 @@ metadata: name: kubecost-integrations-postgres-queries namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: kubecost-queries.json: |- {{- with .Values.global.integrations.postgres.queryConfigs }} diff --git a/cost-analyzer/templates/integrations-postgres-secret.yaml b/cost-analyzer/templates/integrations-postgres-secret.yaml index 136ab6016..1f5e5a704 100644 --- a/cost-analyzer/templates/integrations-postgres-secret.yaml +++ b/cost-analyzer/templates/integrations-postgres-secret.yaml @@ -5,7 +5,7 @@ metadata: name: kubecost-integrations-postgres namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: creds.json: |- diff --git a/cost-analyzer/templates/kubecost-admission-controller-service-template.yaml b/cost-analyzer/templates/kubecost-admission-controller-service-template.yaml index 658dca3a9..b2b7c60a4 100644 --- a/cost-analyzer/templates/kubecost-admission-controller-service-template.yaml +++ b/cost-analyzer/templates/kubecost-admission-controller-service-template.yaml @@ -7,7 +7,7 @@ metadata: namespace: {{.Release.Namespace}} spec: selector: - {{ include "cost-analyzer.selectorLabels" . | nindent 4 }} + {{- include "cost-analyzer.selectorLabels" . | nindent 4 }} ports: - port: 443 targetPort: 8443 diff --git a/cost-analyzer/templates/kubecost-agent-secret-template.yaml b/cost-analyzer/templates/kubecost-agent-secret-template.yaml index cda3c6055..7148eb447 100644 --- a/cost-analyzer/templates/kubecost-agent-secret-template.yaml +++ b/cost-analyzer/templates/kubecost-agent-secret-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ .Values.agentKeySecretName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: object-store.yaml: {{ .Values.agentKey }} {{- end }} \ No newline at end of file diff --git a/cost-analyzer/templates/kubecost-cluster-controller-template.yaml b/cost-analyzer/templates/kubecost-cluster-controller-template.yaml index b1435da83..2b0711d94 100644 --- a/cost-analyzer/templates/kubecost-cluster-controller-template.yaml +++ b/cost-analyzer/templates/kubecost-cluster-controller-template.yaml @@ -7,7 +7,7 @@ metadata: name: {{ template "kubecost.clusterControllerName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} --- # # NOTE: @@ -19,7 +19,7 @@ kind: ClusterRole metadata: name: {{ template "kubecost.clusterControllerName" . }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} rules: - apiGroups: - kubecost.com @@ -173,7 +173,7 @@ kind: ClusterRoleBinding metadata: name: {{ template "kubecost.clusterControllerName" . }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole @@ -289,7 +289,7 @@ metadata: name: {{ template "kubecost.clusterControllerName" . }}-service namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} spec: type: ClusterIP ports: diff --git a/cost-analyzer/templates/kubecost-metrics-service-monitor-template.yaml b/cost-analyzer/templates/kubecost-metrics-service-monitor-template.yaml index f858b77a3..8193fe8b3 100644 --- a/cost-analyzer/templates/kubecost-metrics-service-monitor-template.yaml +++ b/cost-analyzer/templates/kubecost-metrics-service-monitor-template.yaml @@ -9,7 +9,7 @@ metadata: name: {{ include "kubecost.kubeMetricsName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if .Values.kubecostMetrics.exporter.serviceMonitor.additionalLabels }} {{ toYaml .Values.kubecostMetrics.exporter.serviceMonitor.additionalLabels | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/kubecost-oidc-secret-template.yaml b/cost-analyzer/templates/kubecost-oidc-secret-template.yaml index 381514512..4735d951c 100644 --- a/cost-analyzer/templates/kubecost-oidc-secret-template.yaml +++ b/cost-analyzer/templates/kubecost-oidc-secret-template.yaml @@ -8,7 +8,7 @@ metadata: name: {{ .Values.oidc.secretName }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} stringData: clientSecret: {{ .Values.oidc.clientSecret }} {{- end -}} diff --git a/cost-analyzer/templates/kubecost-priority-class-template.yaml b/cost-analyzer/templates/kubecost-priority-class-template.yaml index 7a176d72a..9710b5a22 100644 --- a/cost-analyzer/templates/kubecost-priority-class-template.yaml +++ b/cost-analyzer/templates/kubecost-priority-class-template.yaml @@ -6,7 +6,7 @@ kind: PriorityClass metadata: name: {{ template "cost-analyzer.fullname" . }}-priority labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} value: {{ .Values.priority.value | default "1000000" }} globalDefault: false description: "Priority class for scheduling the cost-analyzer pod" diff --git a/cost-analyzer/templates/kubecost-saml-secret-template.yaml b/cost-analyzer/templates/kubecost-saml-secret-template.yaml index e9a323057..cd6c9d3d7 100644 --- a/cost-analyzer/templates/kubecost-saml-secret-template.yaml +++ b/cost-analyzer/templates/kubecost-saml-secret-template.yaml @@ -6,7 +6,7 @@ metadata: name: {{ .Values.saml.authSecretName | default "kubecost-saml-secret" }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} stringData: clientSecret: {{ .Values.saml.authSecret | default (randAlphaNum 32 | quote) }} {{- end }} diff --git a/cost-analyzer/templates/model-ingress-template.yaml b/cost-analyzer/templates/model-ingress-template.yaml index b55b2986c..d9d9c7241 100644 --- a/cost-analyzer/templates/model-ingress-template.yaml +++ b/cost-analyzer/templates/model-ingress-template.yaml @@ -10,7 +10,7 @@ metadata: name: {{ $fullName }}-model namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- with .Values.kubecostModel.ingress.labels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/network-costs-servicemonitor-template.yaml b/cost-analyzer/templates/network-costs-servicemonitor-template.yaml index 3cef9547d..53c9a89b8 100644 --- a/cost-analyzer/templates/network-costs-servicemonitor-template.yaml +++ b/cost-analyzer/templates/network-costs-servicemonitor-template.yaml @@ -5,7 +5,7 @@ metadata: name: {{ include "cost-analyzer.networkCostsName" . }} namespace: {{ .Release.Namespace }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} {{- if .Values.serviceMonitor.networkCosts.additionalLabels }} {{ toYaml .Values.serviceMonitor.networkCosts.additionalLabels | nindent 4 }} {{- end }} diff --git a/cost-analyzer/templates/plugins-config.yaml b/cost-analyzer/templates/plugins-config.yaml index bd939ac1e..1a37f8b78 100644 --- a/cost-analyzer/templates/plugins-config.yaml +++ b/cost-analyzer/templates/plugins-config.yaml @@ -4,7 +4,7 @@ kind: Secret metadata: name: {{ .Values.kubecostModel.plugins.secretName }} labels: - {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- range $key, $config := .Values.kubecostModel.plugins.configs }} {{ $key }}_config.json: diff --git a/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml b/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml index ebd49b62a..b6e20a1fe 100644 --- a/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml +++ b/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml @@ -5,7 +5,8 @@ kind: ConfigMap metadata: name: "savings-recommendations-instance-allow-lists" namespace: {{ .Release.Namespace }} - labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} + labels: + {{- include "cost-analyzer.commonLabels" . | nindent 4 }} data: allow-lists.json: '{{ toJson .Values.kubecostProductConfigs.savingsRecommendationsAllowLists }}' {{- end -}} diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index fc2fb15f8..66a957bd7 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -304,6 +304,10 @@ global: ## Provide a full name override option for the chart. # fullnameOverride: "" +## Provide additional labels for the chart. +# chartLabels: +# app.kubernetes.io/name: kubecost-cost-analyzer + ## This flag is only required for users upgrading to a new version of Kubecost. ## The flag is used to ensure users are aware of important ## (potentially breaking) changes included in the new version.