From 724d9575d2006fe739c2ffe9768f476a99a93992 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Wed, 21 Aug 2024 19:42:30 +0000 Subject: [PATCH 01/29] Bump to 2.4.0-rc.0 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index 25d8a5bbc..2fcb323dc 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: development +appVersion: "2.4.0-rc.0" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: 2.3.3 +version: "2.4.0-rc.0" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 95216a263..7514f3021 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1369,7 +1369,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "DEVELOP_BRANCH", + "chartVersion": "2.4.0-rc.0" "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 161e3bca113ce204310d55fda7a88d70ba517fca Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Fri, 23 Aug 2024 21:05:13 +0000 Subject: [PATCH 02/29] Merge pull request #3606 from kubecost/bump-kubecost-modeling-0.1.14 bump kubecost-modeling for cve fixes --- cost-analyzer/values-eks-cost-monitoring.yaml | 2 +- cost-analyzer/values.yaml | 2 +- kubecost.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/values-eks-cost-monitoring.yaml b/cost-analyzer/values-eks-cost-monitoring.yaml index f8619429a..afe376ead 100644 --- a/cost-analyzer/values-eks-cost-monitoring.yaml +++ b/cost-analyzer/values-eks-cost-monitoring.yaml @@ -18,7 +18,7 @@ kubecostModel: image: public.ecr.aws/kubecost/cost-model forecasting: - fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.12 + fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.14 networkCosts: image: diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 52919bea9..7afaa5991 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2477,7 +2477,7 @@ forecasting: # image provided (registry, image, tag) will be used for the forecasting # container. # Example: fullImageName: gcr.io/kubecost1/forecasting:v0.0.1 - fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.12 + fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.14 imagePullPolicy: IfNotPresent # Resource specification block for the forecasting container. diff --git a/kubecost.yaml b/kubecost.yaml index bab19015c..19d57e8b2 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23571,7 +23571,7 @@ spec: restartPolicy: Always containers: - name: forecasting - image: gcr.io/kubecost1/kubecost-modeling:v0.1.12 + image: gcr.io/kubecost1/kubecost-modeling:v0.1.14 volumeMounts: - name: tmp mountPath: /tmp From 3af663d3b303c210d9fc8f30557a3314e9bd8167 Mon Sep 17 00:00:00 2001 From: Bianca Burtoiu Date: Wed, 28 Aug 2024 18:12:39 +0200 Subject: [PATCH 03/29] Set up InstanceAllowLists ConfigMap (#3605) (#3616) --- ...commendations-allowlists-config-map-template.yaml | 12 ++++++++++++ cost-analyzer/values.yaml | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml diff --git a/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml b/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml new file mode 100644 index 000000000..ebd49b62a --- /dev/null +++ b/cost-analyzer/templates/savings-recommendations-allowlists-config-map-template.yaml @@ -0,0 +1,12 @@ +{{- if .Values.kubecostProductConfigs }} +{{- if .Values.kubecostProductConfigs.savingsRecommendationsAllowLists }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "savings-recommendations-instance-allow-lists" + namespace: {{ .Release.Namespace }} + labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} +data: + allow-lists.json: '{{ toJson .Values.kubecostProductConfigs.savingsRecommendationsAllowLists }}' +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 7afaa5991..0a375bc34 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -3447,6 +3447,10 @@ costEventsAudit: # hideCloudIntegrationsUI: false # hideBellIcon: false # hideTeams: false +# savingsRecommendationsAllowLists: # Define select list of instance types to be evaluated in computing Savings Recommendations +# AWS: [] +# GCP: [] +# Azure: [] ## Specify an existing Kubernetes Secret holding the cloud integration information. This Secret must contain ## a key with name `cloud-integration.json` and the contents must be in a specific format. It is expected From 1f9678e933b1c8eca511e13bca5742831021e0fb Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Wed, 28 Aug 2024 16:23:16 +0000 Subject: [PATCH 04/29] Merge pull request #3615 from kubecost/bump-modeling-0.1.15-CVE-2024-7592 bump modeling 0.1.15 CVE-2024-7592 --- cost-analyzer/values-eks-cost-monitoring.yaml | 2 +- cost-analyzer/values.yaml | 2 +- kubecost.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/values-eks-cost-monitoring.yaml b/cost-analyzer/values-eks-cost-monitoring.yaml index afe376ead..8ccaf08ca 100644 --- a/cost-analyzer/values-eks-cost-monitoring.yaml +++ b/cost-analyzer/values-eks-cost-monitoring.yaml @@ -18,7 +18,7 @@ kubecostModel: image: public.ecr.aws/kubecost/cost-model forecasting: - fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.14 + fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.15 networkCosts: image: diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 0a375bc34..2ba895af6 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2477,7 +2477,7 @@ forecasting: # image provided (registry, image, tag) will be used for the forecasting # container. # Example: fullImageName: gcr.io/kubecost1/forecasting:v0.0.1 - fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.14 + fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.15 imagePullPolicy: IfNotPresent # Resource specification block for the forecasting container. diff --git a/kubecost.yaml b/kubecost.yaml index 19d57e8b2..2b7f427b8 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23571,7 +23571,7 @@ spec: restartPolicy: Always containers: - name: forecasting - image: gcr.io/kubecost1/kubecost-modeling:v0.1.14 + image: gcr.io/kubecost1/kubecost-modeling:v0.1.15 volumeMounts: - name: tmp mountPath: /tmp From 89b1cecb59ed294c53284408463befd3f6571625 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Wed, 28 Aug 2024 23:54:44 +0000 Subject: [PATCH 05/29] Bump to 2.4.0-rc.1 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index 2fcb323dc..516fb46bd 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.0" +appVersion: "2.4.0-rc.1" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.0" +version: "2.4.0-rc.1" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 7514f3021..a35ffc5f1 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1369,7 +1369,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.0" + "chartVersion": "2.4.0-rc.1", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 0f88313a30f106b2c881ef2327907940165ed0be Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Tue, 3 Sep 2024 19:17:05 +0000 Subject: [PATCH 06/29] Merge pull request #3629 from kubecost/bump-networking-0.17.5 bump network costs to 0.17.5 --- cost-analyzer/values-eks-cost-monitoring.yaml | 1 + cost-analyzer/values.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cost-analyzer/values-eks-cost-monitoring.yaml b/cost-analyzer/values-eks-cost-monitoring.yaml index 8ccaf08ca..a300968f9 100644 --- a/cost-analyzer/values-eks-cost-monitoring.yaml +++ b/cost-analyzer/values-eks-cost-monitoring.yaml @@ -23,6 +23,7 @@ forecasting: networkCosts: image: repository: public.ecr.aws/kubecost/kubecost-network-costs + tag: v0.17.5 clusterController: image: diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 2ba895af6..b03da6a8a 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2319,7 +2319,7 @@ networkCosts: enabled: false image: repository: gcr.io/kubecost1/kubecost-network-costs - tag: v0.17.3 + tag: v0.17.5 imagePullPolicy: IfNotPresent updateStrategy: type: RollingUpdate From 2dd5ffc047acfc277d773057fbd0e521cc29c44a Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Tue, 3 Sep 2024 19:25:32 +0000 Subject: [PATCH 07/29] Bump to 2.4.0-rc.2 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index 516fb46bd..521a008b5 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.1" +appVersion: "2.4.0-rc.2" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.1" +version: "2.4.0-rc.2" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 a35ffc5f1..c3d06c43f 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1369,7 +1369,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.1", + "chartVersion": "2.4.0-rc.2", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 2c454c15cf54f25f45faa03c2dbea8907d81172a Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Wed, 4 Sep 2024 03:58:38 +0000 Subject: [PATCH 08/29] Merge pull request #3627 from kubecost/fix-grafana-CVE --- cost-analyzer/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index b03da6a8a..3f6b3b26f 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2998,8 +2998,8 @@ grafana: ## Container image settings for the Grafana deployment image: - repository: grafana/grafana - tag: 11.1.4 + repository: cgr.dev/chainguard/grafana + tag: latest pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. From 0f57e2d3a3f207ba0d050e6c0ae61cde119a0d88 Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Wed, 4 Sep 2024 03:58:46 +0000 Subject: [PATCH 09/29] Merge pull request #3625 from kubecost/fix-prom-CVE-2024-41110 update prometheus to chainguard for CVE-2024-41110 --- cost-analyzer/values.yaml | 16 ++++++++-------- kubecost.yaml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 3f6b3b26f..ef9a7e062 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -974,8 +974,8 @@ prometheus: ## Prometheus server container image ## image: - repository: quay.io/prometheus/prometheus - tag: v2.53.1 + repository: cgr.dev/chainguard/prometheus + tag: latest pullPolicy: IfNotPresent ## prometheus server priorityClassName @@ -1385,8 +1385,8 @@ prometheus: ## alertmanager container image ## image: - repository: quay.io/prometheus/alertmanager - tag: v0.27.0 + repository: cgr.dev/chainguard/prometheus-alertmanager + tag: latest pullPolicy: IfNotPresent ## alertmanager priorityClassName @@ -1671,8 +1671,8 @@ prometheus: ## configmap-reload container image ## image: - repository: quay.io/prometheus-operator/prometheus-config-reloader - tag: v0.74.0 + repository: cgr.dev/chainguard/prometheus-config-reloader + tag: latest pullPolicy: IfNotPresent ## Additional configmap-reload container arguments @@ -1711,8 +1711,8 @@ prometheus: ## configmap-reload container image ## image: - repository: quay.io/prometheus-operator/prometheus-config-reloader - tag: v0.74.0 + repository: cgr.dev/chainguard/prometheus-config-reloader + tag: latest pullPolicy: IfNotPresent ## Additional configmap-reload container arguments diff --git a/kubecost.yaml b/kubecost.yaml index 2b7f427b8..fcb3cacd9 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23789,7 +23789,7 @@ spec: containers: - name: prometheus-server - image: "quay.io/prometheus/prometheus:v2.52.0" + image: "cgr.dev/chainguard/prometheus:latest" imagePullPolicy: "IfNotPresent" args: - --storage.tsdb.retention.time=97h From cfa1f6ed55f90f9638ca83229619e75f41ffd596 Mon Sep 17 00:00:00 2001 From: Kaelan Patel <32113845+kaelanspatel@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:38:11 -0700 Subject: [PATCH 10/29] Add ingestion config for standard discount (#3591) (#3636) * Add ingestion config for standard discount * Remove statefulset check in ingestionconfig * Fix nil in ingestion config * Fix nil in _helpers.tpl for standard discount * Re-add statefulset check in ingestionconfig --- cost-analyzer/templates/_helpers.tpl | 6 ++++++ ...st-analyzer-frontend-config-map-template.yaml | 16 ++++++++++++++++ .../cost-analyzer-ingestion-configmap.yaml | 14 ++++++++++++++ cost-analyzer/values.yaml | 1 + 4 files changed, 37 insertions(+) create mode 100644 cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml diff --git a/cost-analyzer/templates/_helpers.tpl b/cost-analyzer/templates/_helpers.tpl index 786a0765b..93ae33a00 100755 --- a/cost-analyzer/templates/_helpers.tpl +++ b/cost-analyzer/templates/_helpers.tpl @@ -1107,6 +1107,12 @@ Begin Kubecost 2.0 templates value: "true" - name: FEDERATED_CLUSTER # this ensures the ingester runs assuming federated primary paths in the bucket value: "true" + {{- if (.Values.kubecostProductConfigs).standardDiscount }} + {{- if .Values.ingestionConfigmapName }} + - name: INGESTION_CONFIGMAP_NAME + value: {{ .Values.ingestionConfigmapName }} + {{- end }} + {{- end }} {{- end }} {{- end }} - name: LOG_LEVEL 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 c3d06c43f..ebc0c6aea 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1039,6 +1039,22 @@ data: proxy_set_header Connection ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location = /model/getIngestionConfig { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/getIngestionConfig; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location = /model/setIngestionConfig { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/setIngestionConfig; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location = /model/enablements { proxy_read_timeout 300; diff --git a/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml b/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml new file mode 100644 index 000000000..7ca2cea4a --- /dev/null +++ b/cost-analyzer/templates/cost-analyzer-ingestion-configmap.yaml @@ -0,0 +1,14 @@ +{{- if eq (include "aggregator.deployMethod" .) "statefulset" }} +{{- if (.Values.kubecostProductConfigs).standardDiscount }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ default "ingestion-configs" .Values.ingestionConfigmapName }} + namespace: {{ .Release.Namespace }} + labels: + {{ include "cost-analyzer.commonLabels" . | nindent 4 }} +data: + standardDiscount: "{{ .Values.kubecostProductConfigs.standardDiscount }}" + helmConfig: "true" +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index ef9a7e062..2ac6f662f 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -3409,6 +3409,7 @@ costEventsAudit: # azureOfferDurableID: "MS-AZR-0003p" # discount: "" # percentage discount applied to compute # negotiatedDiscount: "" # custom negotiated cloud provider discount +# standardDiscount: "" # custom negotiated cloud provider discount, applied to all incoming asset compute costs in a federated environment. Overrides negotiatedDiscount on any cluster in the federated environment. # defaultIdle: false # serviceKeySecretName: "" # Use an existing AWS or Azure secret with format as in aws-service-key-secret.yaml or azure-service-key-secret.yaml. Leave blank if using createServiceKeySecret # createServiceKeySecret: true # Creates a secret representing your cloud service key based on data in values.yaml. If you are storing unencrypted values, add a secret manually From 87022095178ca65842fbc31ed9d2b76a684b8a24 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 08:26:51 -0400 Subject: [PATCH 11/29] fix diagnostics and federatedStorageConfig (#3637) (#3639) * fix diagnostics and federatedStorageConfig * Few more places that needed to reference federatedStorageConfig * Simplify logic for MultiClusterDiagnostics in costmodel. --------- Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> Co-authored-by: thomasvn --- .../cost-analyzer-deployment-template.yaml | 14 +++++++------- ...cost-analyzer-frontend-config-map-template.yaml | 6 +++--- .../templates/diagnostics-deployment.yaml | 6 +++--- cost-analyzer/templates/diagnostics-service.yaml | 2 +- cost-analyzer/templates/etl-utils-deployment.yaml | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml index 7076b6ec1..a9088cd6b 100644 --- a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml @@ -81,7 +81,7 @@ spec: items: - key: datadog_config.json path: datadog_config.json - {{- end }} + {{- end }} {{- if .Values.kubecostModel.plugins.existingCustomSecret.enabled }} - name: plugins-config secret: @@ -136,11 +136,11 @@ spec: defaultMode: 420 secretName: {{ $etlBackupBucketSecret }} {{- end }} - {{- if .Values.kubecostModel.federatedStorageConfigSecret }} + {{- if or .Values.kubecostModel.federatedStorageConfigSecret .Values.kubecostModel.federatedStorageConfig }} - name: federated-storage-config secret: defaultMode: 420 - secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret }} + secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret | default "federated-store" }} {{- end }} {{- if .Values.kubecostProductConfigs }} {{- if and ((.Values.kubecostProductConfigs).productKey).enabled ((.Values.kubecostProductConfigs).productKey).secretname }} @@ -659,7 +659,7 @@ spec: - name: persistent-db mountPath: /var/db {{- end }} - {{- if .Values.kubecostModel.federatedStorageConfigSecret }} + {{- if or .Values.kubecostModel.federatedStorageConfigSecret .Values.kubecostModel.federatedStorageConfig }} - name: federated-storage-config mountPath: /var/configs/etl/federated readOnly: true @@ -932,7 +932,7 @@ spec: - name: FEDERATED_STORE_CONFIG value: "/var/configs/etl/federated/federated-store.yaml" {{- end }} - {{- if or .Values.federatedETL.federatedCluster .Values.kubecostModel.federatedStorageConfigSecret }} + {{- if or .Values.federatedETL.federatedCluster .Values.kubecostModel.federatedStorageConfigSecret .Values.kubecostModel.federatedStorageConfig }} - name: FEDERATED_CLUSTER {{- if eq .Values.federatedETL.readOnlyPrimary true }} value: "false" @@ -1120,8 +1120,8 @@ spec: {{- if not (.Values.diagnostics.enabled) }} - name: DIAGNOSTICS_RUN_IN_COST_MODEL value: "false" - {{- /*A pre-requisite for running MultiClusterDiagnostics in the cost-model container is a configured federated-store secret and cluster_id*/}} - {{- else if or (empty .Values.kubecostModel.federatedStorageConfigSecret) (eq .Values.prometheus.server.global.external_labels.cluster_id "cluster-one") }} + {{- /* Cannot run MultiClusterDiagnostics in the cost-model container without federated-store config */}} + {{- else if and (empty .Values.kubecostModel.federatedStorageConfigSecret) (not .Values.kubecostModel.federatedStorageConfig) }} - name: DIAGNOSTICS_RUN_IN_COST_MODEL value: "false" {{- else if .Values.diagnostics.deployment.enabled }} 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 ebc0c6aea..e70696c7c 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -143,7 +143,7 @@ data: {{- end }} {{- if and .Values.diagnostics.enabled .Values.diagnostics.primary.enabled .Values.diagnostics.deployment.enabled }} - {{- if (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) }} + {{- if or (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) .Values.kubecostModel.federatedStorageConfig }} upstream multi-cluster-diagnostics { {{- if .Values.kubecostFrontend.useDefaultFqdn }} server {{ template "diagnostics.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9007; @@ -1303,7 +1303,7 @@ data: add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always; {{- if and .Values.diagnostics.enabled .Values.diagnostics.primary.enabled }} - {{- if (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) }} + {{- if or (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) .Values.kubecostModel.federatedStorageConfig }} return 200 '{"multiClusterDiagnosticsEnabled": true}'; {{- end }} {{- else }} @@ -1312,7 +1312,7 @@ data: } {{- if and .Values.diagnostics.enabled .Values.diagnostics.primary.enabled .Values.diagnostics.deployment.enabled }} - {{- if (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) }} + {{- if or (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) .Values.kubecostModel.federatedStorageConfig }} # When the Multi-cluster Diagnostics Service is run within the # cost-model container, its endpoint is available at the path diff --git a/cost-analyzer/templates/diagnostics-deployment.yaml b/cost-analyzer/templates/diagnostics-deployment.yaml index 90fd43e7f..196b62c0d 100644 --- a/cost-analyzer/templates/diagnostics-deployment.yaml +++ b/cost-analyzer/templates/diagnostics-deployment.yaml @@ -1,5 +1,5 @@ {{- if and .Values.diagnostics.enabled .Values.diagnostics.deployment.enabled }} -{{- if (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) -}} +{{- if or (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) .Values.kubecostModel.federatedStorageConfig -}} {{- if eq .Values.prometheus.server.global.external_labels.cluster_id "cluster-one" }} {{- fail "Error: The 'cluster_id' is set to default 'cluster-one'. Please update so that the diagnostics service can uniquely identify data coming from this cluster." }} @@ -50,11 +50,11 @@ spec: {{- end }} serviceAccountName: {{ template "cost-analyzer.serviceAccountName" . }} volumes: - {{- if .Values.kubecostModel.federatedStorageConfigSecret }} + {{- if or .Values.kubecostModel.federatedStorageConfigSecret .Values.kubecostModel.federatedStorageConfig }} - name: federated-storage-config secret: defaultMode: 420 - secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret }} + secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret | default "federated-store" }} {{- end }} - name: config-db {{- /* #TODO: make pv? */}} diff --git a/cost-analyzer/templates/diagnostics-service.yaml b/cost-analyzer/templates/diagnostics-service.yaml index 5c0fdebe8..deb67bce6 100644 --- a/cost-analyzer/templates/diagnostics-service.yaml +++ b/cost-analyzer/templates/diagnostics-service.yaml @@ -1,5 +1,5 @@ {{- if and .Values.diagnostics.enabled .Values.diagnostics.deployment.enabled .Values.diagnostics.primary.enabled }} -{{- if (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) -}} +{{- if or (not (empty .Values.kubecostModel.federatedStorageConfigSecret )) .Values.kubecostModel.federatedStorageConfig -}} apiVersion: v1 kind: Service metadata: diff --git a/cost-analyzer/templates/etl-utils-deployment.yaml b/cost-analyzer/templates/etl-utils-deployment.yaml index 78aeb8ed3..1b229986b 100644 --- a/cost-analyzer/templates/etl-utils-deployment.yaml +++ b/cost-analyzer/templates/etl-utils-deployment.yaml @@ -39,11 +39,11 @@ spec: defaultMode: 420 secretName: {{ .Values.etlUtils.thanosSourceBucketSecret }} {{- end }} - {{- if .Values.kubecostModel.federatedStorageConfigSecret }} + {{- if or .Values.kubecostModel.federatedStorageConfigSecret .Values.kubecostModel.federatedStorageConfig}} - name: federated-storage-config secret: defaultMode: 420 - secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret }} + secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret | default "federated-store" }} {{- end }} serviceAccountName: {{ template "cost-analyzer.serviceAccountName" . }} containers: From 4690dd7cf62ac7e5c7d4b2e3a64fa87f3d361f1b Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Thu, 5 Sep 2024 12:58:49 +0000 Subject: [PATCH 12/29] Bump to 2.4.0-rc.3 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index 521a008b5..fa03d3f81 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.2" +appVersion: "2.4.0-rc.3" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.2" +version: "2.4.0-rc.3" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 e70696c7c..609ae5baf 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1385,7 +1385,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.2", + "chartVersion": "2.4.0-rc.3", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 35f61957d886f5b7ffcfd5d4c8cf393b2f188f4f Mon Sep 17 00:00:00 2001 From: Bianca Burtoiu Date: Fri, 6 Sep 2024 18:21:11 +0200 Subject: [PATCH 13/29] [ENG-2674] Add routes for savings recommendations allow list validation API (#3635) (#3646) * [ENG-2674] Add routes * Drop location from kubecost.yaml --- .../cost-analyzer-frontend-config-map-template.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) 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 609ae5baf..00815b6fb 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -517,6 +517,14 @@ data: proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + location = /model/savings/recommendations/allowLists { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/savings/recommendations/allowLists; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } location = /model/cloudCost { proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; proxy_pass http://aggregator/cloudCost; From 31ab7f6002d2892792ebabd14b767ff570cc4f74 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:17:51 -0400 Subject: [PATCH 14/29] tmp dir for new base image (#3647) (#3648) Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> --- .../templates/cost-analyzer-deployment-template.yaml | 4 ++++ cost-analyzer/templates/frontend-deployment-template.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml index a9088cd6b..3c57b8313 100644 --- a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml @@ -1178,6 +1178,10 @@ spec: volumeMounts: - name: tmp mountPath: /tmp + - name: tmp + mountPath: /var/lib/nginx/tmp + - name: tmp + mountPath: /var/run - name: nginx-conf mountPath: /etc/nginx/conf.d/ {{- if .Values.global.containerSecuritycontext }} diff --git a/cost-analyzer/templates/frontend-deployment-template.yaml b/cost-analyzer/templates/frontend-deployment-template.yaml index 7118ab82a..09235b1b9 100644 --- a/cost-analyzer/templates/frontend-deployment-template.yaml +++ b/cost-analyzer/templates/frontend-deployment-template.yaml @@ -144,6 +144,10 @@ spec: volumeMounts: - name: tmp mountPath: /tmp + - name: tmp + mountPath: /var/lib/nginx/tmp + - name: tmp + mountPath: /var/run - name: nginx-conf mountPath: /etc/nginx/conf.d/ {{- if .Values.global.containerSecuritycontext }} From f77ce5c999a34b211aa0f8780c0f916439306111 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:20:32 +0200 Subject: [PATCH 15/29] [ENG-2729] Add resource reference files for kubecostProductConfigs.savingsRecommendationsAllowLists (#3645) (#3650) * [ENG-2729] Add resource reference files for kubecostProductConfigs.savingsRecommendationsAllowLists Co-authored-by: Bianca Burtoiu --- ...vings-recommendations-allow-lists-aws.yaml | 790 ++++++++++++++++++ ...ngs-recommendations-allow-lists-azure.yaml | 283 +++++++ ...vings-recommendations-allow-lists-gcp.yaml | 76 ++ 3 files changed, 1149 insertions(+) create mode 100644 cost-analyzer/savings-recommendations-allow-lists-aws.yaml create mode 100644 cost-analyzer/savings-recommendations-allow-lists-azure.yaml create mode 100644 cost-analyzer/savings-recommendations-allow-lists-gcp.yaml diff --git a/cost-analyzer/savings-recommendations-allow-lists-aws.yaml b/cost-analyzer/savings-recommendations-allow-lists-aws.yaml new file mode 100644 index 000000000..e86af6dc4 --- /dev/null +++ b/cost-analyzer/savings-recommendations-allow-lists-aws.yaml @@ -0,0 +1,790 @@ +kubecostProductConfigs: + savingsRecommendationsAllowLists: + AWS: + - a1.2xlarge + - a1.4xlarge + - a1.large + - a1.medium + - a1.metal + - a1.xlarge + - c1.medium + - c1.xlarge + - c3.2xlarge + - c3.4xlarge + - c3.8xlarge + - c3.large + - c3.xlarge + - c4.2xlarge + - c4.4xlarge + - c4.8xlarge + - c4.large + - c4.xlarge + - c5.12xlarge + - c5.18xlarge + - c5.24xlarge + - c5.2xlarge + - c5.4xlarge + - c5.9xlarge + - c5.large + - c5.metal + - c5.xlarge + - c5a.12xlarge + - c5a.16xlarge + - c5a.24xlarge + - c5a.2xlarge + - c5a.4xlarge + - c5a.8xlarge + - c5a.large + - c5a.xlarge + - c5ad.12xlarge + - c5ad.16xlarge + - c5ad.24xlarge + - c5ad.2xlarge + - c5ad.4xlarge + - c5ad.8xlarge + - c5ad.large + - c5ad.xlarge + - c5d.12xlarge + - c5d.18xlarge + - c5d.24xlarge + - c5d.2xlarge + - c5d.4xlarge + - c5d.9xlarge + - c5d.large + - c5d.metal + - c5d.xlarge + - c5n.18xlarge + - c5n.2xlarge + - c5n.4xlarge + - c5n.9xlarge + - c5n.large + - c5n.metal + - c5n.xlarge + - c6a.12xlarge + - c6a.16xlarge + - c6a.24xlarge + - c6a.2xlarge + - c6a.32xlarge + - c6a.48xlarge + - c6a.4xlarge + - c6a.8xlarge + - c6a.large + - c6a.metal + - c6a.xlarge + - c6g.12xlarge + - c6g.16xlarge + - c6g.2xlarge + - c6g.4xlarge + - c6g.8xlarge + - c6g.large + - c6g.medium + - c6g.metal + - c6g.xlarge + - c6gd.12xlarge + - c6gd.16xlarge + - c6gd.2xlarge + - c6gd.4xlarge + - c6gd.8xlarge + - c6gd.large + - c6gd.medium + - c6gd.metal + - c6gd.xlarge + - c6gn.12xlarge + - c6gn.16xlarge + - c6gn.2xlarge + - c6gn.4xlarge + - c6gn.8xlarge + - c6gn.large + - c6gn.medium + - c6gn.xlarge + - c6i.12xlarge + - c6i.16xlarge + - c6i.24xlarge + - c6i.2xlarge + - c6i.32xlarge + - c6i.4xlarge + - c6i.8xlarge + - c6i.large + - c6i.metal + - c6i.xlarge + - c6id.12xlarge + - c6id.16xlarge + - c6id.24xlarge + - c6id.2xlarge + - c6id.32xlarge + - c6id.4xlarge + - c6id.8xlarge + - c6id.large + - c6id.metal + - c6id.xlarge + - c6in.12xlarge + - c6in.16xlarge + - c6in.24xlarge + - c6in.2xlarge + - c6in.32xlarge + - c6in.4xlarge + - c6in.8xlarge + - c6in.large + - c6in.metal + - c6in.xlarge + - c7a.12xlarge + - c7a.16xlarge + - c7a.24xlarge + - c7a.2xlarge + - c7a.32xlarge + - c7a.48xlarge + - c7a.4xlarge + - c7a.8xlarge + - c7a.large + - c7a.medium + - c7a.metal-48xl + - c7a.xlarge + - c7g.12xlarge + - c7g.16xlarge + - c7g.2xlarge + - c7g.4xlarge + - c7g.8xlarge + - c7g.large + - c7g.medium + - c7g.metal + - c7g.xlarge + - c7gd.12xlarge + - c7gd.16xlarge + - c7gd.2xlarge + - c7gd.4xlarge + - c7gd.8xlarge + - c7gd.large + - c7gd.medium + - c7gd.metal + - c7gd.xlarge + - c7gn.12xlarge + - c7gn.16xlarge + - c7gn.2xlarge + - c7gn.4xlarge + - c7gn.8xlarge + - c7gn.large + - c7gn.medium + - c7gn.metal + - c7gn.xlarge + - c7i-flex.2xlarge + - c7i-flex.4xlarge + - c7i-flex.8xlarge + - c7i-flex.large + - c7i-flex.xlarge + - c7i.12xlarge + - c7i.16xlarge + - c7i.24xlarge + - c7i.2xlarge + - c7i.48xlarge + - c7i.4xlarge + - c7i.8xlarge + - c7i.large + - c7i.metal-24xl + - c7i.metal-48xl + - c7i.xlarge + - d2.2xlarge + - d2.4xlarge + - d2.8xlarge + - d2.xlarge + - d3.2xlarge + - d3.4xlarge + - d3.8xlarge + - d3.xlarge + - d3en.12xlarge + - d3en.2xlarge + - d3en.4xlarge + - d3en.6xlarge + - d3en.8xlarge + - d3en.xlarge + - dl1.24xlarge + - dl2q.24xlarge + - f1.16xlarge + - f1.2xlarge + - f1.4xlarge + - g3.16xlarge + - g3.4xlarge + - g3.8xlarge + - g3s.xlarge + - g4ad.16xlarge + - g4ad.2xlarge + - g4ad.4xlarge + - g4ad.8xlarge + - g4ad.xlarge + - g4dn.12xlarge + - g4dn.16xlarge + - g4dn.2xlarge + - g4dn.4xlarge + - g4dn.8xlarge + - g4dn.metal + - g4dn.xlarge + - g5.12xlarge + - g5.16xlarge + - g5.24xlarge + - g5.2xlarge + - g5.48xlarge + - g5.4xlarge + - g5.8xlarge + - g5.xlarge + - g5g.16xlarge + - g5g.2xlarge + - g5g.4xlarge + - g5g.8xlarge + - g5g.metal + - g5g.xlarge + - g6.12xlarge + - g6.16xlarge + - g6.24xlarge + - g6.2xlarge + - g6.48xlarge + - g6.4xlarge + - g6.8xlarge + - g6.xlarge + - g6e.12xlarge + - g6e.16xlarge + - g6e.24xlarge + - g6e.2xlarge + - g6e.48xlarge + - g6e.4xlarge + - g6e.8xlarge + - g6e.xlarge + - gr6.4xlarge + - gr6.8xlarge + - h1.16xlarge + - h1.2xlarge + - h1.4xlarge + - h1.8xlarge + - i2.2xlarge + - i2.4xlarge + - i2.8xlarge + - i2.xlarge + - i3.16xlarge + - i3.2xlarge + - i3.4xlarge + - i3.8xlarge + - i3.large + - i3.metal + - i3.xlarge + - i3en.12xlarge + - i3en.24xlarge + - i3en.2xlarge + - i3en.3xlarge + - i3en.6xlarge + - i3en.large + - i3en.metal + - i3en.xlarge + - i4g.16xlarge + - i4g.2xlarge + - i4g.4xlarge + - i4g.8xlarge + - i4g.large + - i4g.xlarge + - i4i.12xlarge + - i4i.16xlarge + - i4i.24xlarge + - i4i.2xlarge + - i4i.32xlarge + - i4i.4xlarge + - i4i.8xlarge + - i4i.large + - i4i.metal + - i4i.xlarge + - im4gn.16xlarge + - im4gn.2xlarge + - im4gn.4xlarge + - im4gn.8xlarge + - im4gn.large + - im4gn.xlarge + - inf1.24xlarge + - inf1.2xlarge + - inf1.6xlarge + - inf1.xlarge + - inf2.24xlarge + - inf2.48xlarge + - inf2.8xlarge + - inf2.xlarge + - is4gen.2xlarge + - is4gen.4xlarge + - is4gen.8xlarge + - is4gen.large + - is4gen.medium + - is4gen.xlarge + - m1.large + - m1.medium + - m1.small + - m1.xlarge + - m2.2xlarge + - m2.4xlarge + - m2.xlarge + - m3.2xlarge + - m3.large + - m3.medium + - m3.xlarge + - m4.10xlarge + - m4.16xlarge + - m4.2xlarge + - m4.4xlarge + - m4.large + - m4.xlarge + - m5.12xlarge + - m5.16xlarge + - m5.24xlarge + - m5.2xlarge + - m5.4xlarge + - m5.8xlarge + - m5.large + - m5.metal + - m5.xlarge + - m5a.12xlarge + - m5a.16xlarge + - m5a.24xlarge + - m5a.2xlarge + - m5a.4xlarge + - m5a.8xlarge + - m5a.large + - m5a.xlarge + - m5ad.12xlarge + - m5ad.16xlarge + - m5ad.24xlarge + - m5ad.2xlarge + - m5ad.4xlarge + - m5ad.8xlarge + - m5ad.large + - m5ad.xlarge + - m5d.12xlarge + - m5d.16xlarge + - m5d.24xlarge + - m5d.2xlarge + - m5d.4xlarge + - m5d.8xlarge + - m5d.large + - m5d.metal + - m5d.xlarge + - m5dn.12xlarge + - m5dn.16xlarge + - m5dn.24xlarge + - m5dn.2xlarge + - m5dn.4xlarge + - m5dn.8xlarge + - m5dn.large + - m5dn.metal + - m5dn.xlarge + - m5n.12xlarge + - m5n.16xlarge + - m5n.24xlarge + - m5n.2xlarge + - m5n.4xlarge + - m5n.8xlarge + - m5n.large + - m5n.metal + - m5n.xlarge + - m5zn.12xlarge + - m5zn.2xlarge + - m5zn.3xlarge + - m5zn.6xlarge + - m5zn.large + - m5zn.metal + - m5zn.xlarge + - m6a.12xlarge + - m6a.16xlarge + - m6a.24xlarge + - m6a.2xlarge + - m6a.32xlarge + - m6a.48xlarge + - m6a.4xlarge + - m6a.8xlarge + - m6a.large + - m6a.metal + - m6a.xlarge + - m6g.12xlarge + - m6g.16xlarge + - m6g.2xlarge + - m6g.4xlarge + - m6g.8xlarge + - m6g.large + - m6g.medium + - m6g.metal + - m6g.xlarge + - m6gd.12xlarge + - m6gd.16xlarge + - m6gd.2xlarge + - m6gd.4xlarge + - m6gd.8xlarge + - m6gd.large + - m6gd.medium + - m6gd.metal + - m6gd.xlarge + - m6i.12xlarge + - m6i.16xlarge + - m6i.24xlarge + - m6i.2xlarge + - m6i.32xlarge + - m6i.4xlarge + - m6i.8xlarge + - m6i.large + - m6i.metal + - m6i.xlarge + - m6id.12xlarge + - m6id.16xlarge + - m6id.24xlarge + - m6id.2xlarge + - m6id.32xlarge + - m6id.4xlarge + - m6id.8xlarge + - m6id.large + - m6id.metal + - m6id.xlarge + - m6idn.12xlarge + - m6idn.16xlarge + - m6idn.24xlarge + - m6idn.2xlarge + - m6idn.32xlarge + - m6idn.4xlarge + - m6idn.8xlarge + - m6idn.large + - m6idn.metal + - m6idn.xlarge + - m6in.12xlarge + - m6in.16xlarge + - m6in.24xlarge + - m6in.2xlarge + - m6in.32xlarge + - m6in.4xlarge + - m6in.8xlarge + - m6in.large + - m6in.metal + - m6in.xlarge + - m7a.12xlarge + - m7a.16xlarge + - m7a.24xlarge + - m7a.2xlarge + - m7a.32xlarge + - m7a.48xlarge + - m7a.4xlarge + - m7a.8xlarge + - m7a.large + - m7a.medium + - m7a.metal-48xl + - m7a.xlarge + - m7g.12xlarge + - m7g.16xlarge + - m7g.2xlarge + - m7g.4xlarge + - m7g.8xlarge + - m7g.large + - m7g.medium + - m7g.metal + - m7g.xlarge + - m7gd.12xlarge + - m7gd.16xlarge + - m7gd.2xlarge + - m7gd.4xlarge + - m7gd.8xlarge + - m7gd.large + - m7gd.medium + - m7gd.metal + - m7gd.xlarge + - m7i-flex.2xlarge + - m7i-flex.4xlarge + - m7i-flex.8xlarge + - m7i-flex.large + - m7i-flex.xlarge + - m7i.12xlarge + - m7i.16xlarge + - m7i.24xlarge + - m7i.2xlarge + - m7i.48xlarge + - m7i.4xlarge + - m7i.8xlarge + - m7i.large + - m7i.metal-24xl + - m7i.metal-48xl + - m7i.xlarge + - p2.16xlarge + - p2.8xlarge + - p2.xlarge + - p3.16xlarge + - p3.2xlarge + - p3.8xlarge + - p3dn.24xlarge + - p4d.24xlarge + - p5.48xlarge + - r3.2xlarge + - r3.4xlarge + - r3.8xlarge + - r3.large + - r3.xlarge + - r4.16xlarge + - r4.2xlarge + - r4.4xlarge + - r4.8xlarge + - r4.large + - r4.xlarge + - r5.12xlarge + - r5.16xlarge + - r5.24xlarge + - r5.2xlarge + - r5.4xlarge + - r5.8xlarge + - r5.large + - r5.metal + - r5.xlarge + - r5a.12xlarge + - r5a.16xlarge + - r5a.24xlarge + - r5a.2xlarge + - r5a.4xlarge + - r5a.8xlarge + - r5a.large + - r5a.xlarge + - r5ad.12xlarge + - r5ad.16xlarge + - r5ad.24xlarge + - r5ad.2xlarge + - r5ad.4xlarge + - r5ad.8xlarge + - r5ad.large + - r5ad.xlarge + - r5b.12xlarge + - r5b.16xlarge + - r5b.24xlarge + - r5b.2xlarge + - r5b.4xlarge + - r5b.8xlarge + - r5b.large + - r5b.metal + - r5b.xlarge + - r5d.12xlarge + - r5d.16xlarge + - r5d.24xlarge + - r5d.2xlarge + - r5d.4xlarge + - r5d.8xlarge + - r5d.large + - r5d.metal + - r5d.xlarge + - r5dn.12xlarge + - r5dn.16xlarge + - r5dn.24xlarge + - r5dn.2xlarge + - r5dn.4xlarge + - r5dn.8xlarge + - r5dn.large + - r5dn.metal + - r5dn.xlarge + - r5n.12xlarge + - r5n.16xlarge + - r5n.24xlarge + - r5n.2xlarge + - r5n.4xlarge + - r5n.8xlarge + - r5n.large + - r5n.metal + - r5n.xlarge + - r6a.12xlarge + - r6a.16xlarge + - r6a.24xlarge + - r6a.2xlarge + - r6a.32xlarge + - r6a.48xlarge + - r6a.4xlarge + - r6a.8xlarge + - r6a.large + - r6a.metal + - r6a.xlarge + - r6g.12xlarge + - r6g.16xlarge + - r6g.2xlarge + - r6g.4xlarge + - r6g.8xlarge + - r6g.large + - r6g.medium + - r6g.metal + - r6g.xlarge + - r6gd.12xlarge + - r6gd.16xlarge + - r6gd.2xlarge + - r6gd.4xlarge + - r6gd.8xlarge + - r6gd.large + - r6gd.medium + - r6gd.metal + - r6gd.xlarge + - r6i.12xlarge + - r6i.16xlarge + - r6i.24xlarge + - r6i.2xlarge + - r6i.32xlarge + - r6i.4xlarge + - r6i.8xlarge + - r6i.large + - r6i.metal + - r6i.xlarge + - r6id.12xlarge + - r6id.16xlarge + - r6id.24xlarge + - r6id.2xlarge + - r6id.32xlarge + - r6id.4xlarge + - r6id.8xlarge + - r6id.large + - r6id.metal + - r6id.xlarge + - r6idn.12xlarge + - r6idn.16xlarge + - r6idn.24xlarge + - r6idn.2xlarge + - r6idn.32xlarge + - r6idn.4xlarge + - r6idn.8xlarge + - r6idn.large + - r6idn.metal + - r6idn.xlarge + - r6in.12xlarge + - r6in.16xlarge + - r6in.24xlarge + - r6in.2xlarge + - r6in.32xlarge + - r6in.4xlarge + - r6in.8xlarge + - r6in.large + - r6in.metal + - r6in.xlarge + - r7a.12xlarge + - r7a.16xlarge + - r7a.24xlarge + - r7a.2xlarge + - r7a.32xlarge + - r7a.48xlarge + - r7a.4xlarge + - r7a.8xlarge + - r7a.large + - r7a.medium + - r7a.metal-48xl + - r7a.xlarge + - r7g.12xlarge + - r7g.16xlarge + - r7g.2xlarge + - r7g.4xlarge + - r7g.8xlarge + - r7g.large + - r7g.medium + - r7g.metal + - r7g.xlarge + - r7gd.12xlarge + - r7gd.16xlarge + - r7gd.2xlarge + - r7gd.4xlarge + - r7gd.8xlarge + - r7gd.large + - r7gd.medium + - r7gd.metal + - r7gd.xlarge + - r7i.12xlarge + - r7i.16xlarge + - r7i.24xlarge + - r7i.2xlarge + - r7i.48xlarge + - r7i.4xlarge + - r7i.8xlarge + - r7i.large + - r7i.metal-24xl + - r7i.metal-48xl + - r7i.xlarge + - r7iz.12xlarge + - r7iz.16xlarge + - r7iz.2xlarge + - r7iz.32xlarge + - r7iz.4xlarge + - r7iz.8xlarge + - r7iz.large + - r7iz.metal-16xl + - r7iz.metal-32xl + - r7iz.xlarge + - r8g.12xlarge + - r8g.16xlarge + - r8g.24xlarge + - r8g.2xlarge + - r8g.48xlarge + - r8g.4xlarge + - r8g.8xlarge + - r8g.large + - r8g.medium + - r8g.metal-24xl + - r8g.metal-48xl + - r8g.xlarge + - t1.micro + - t2.2xlarge + - t2.large + - t2.medium + - t2.micro + - t2.small + - t2.xlarge + - t3.2xlarge + - t3.large + - t3.medium + - t3.micro + - t3.nano + - t3.small + - t3.xlarge + - t3a.2xlarge + - t3a.large + - t3a.medium + - t3a.micro + - t3a.nano + - t3a.small + - t3a.xlarge + - t4g.2xlarge + - t4g.large + - t4g.medium + - t4g.micro + - t4g.nano + - t4g.small + - t4g.xlarge + - trn1.2xlarge + - trn1.32xlarge + - trn1n.32xlarge + - vt1.24xlarge + - vt1.3xlarge + - vt1.6xlarge + - x1.16xlarge + - x1.32xlarge + - x1e.16xlarge + - x1e.2xlarge + - x1e.32xlarge + - x1e.4xlarge + - x1e.8xlarge + - x1e.xlarge + - x2gd.12xlarge + - x2gd.16xlarge + - x2gd.2xlarge + - x2gd.4xlarge + - x2gd.8xlarge + - x2gd.large + - x2gd.medium + - x2gd.metal + - x2gd.xlarge + - x2idn.16xlarge + - x2idn.24xlarge + - x2idn.32xlarge + - x2idn.metal + - x2iedn.16xlarge + - x2iedn.24xlarge + - x2iedn.2xlarge + - x2iedn.32xlarge + - x2iedn.4xlarge + - x2iedn.8xlarge + - x2iedn.metal + - x2iedn.xlarge + - x2iezn.12xlarge + - x2iezn.2xlarge + - x2iezn.4xlarge + - x2iezn.6xlarge + - x2iezn.8xlarge + - x2iezn.metal + - z1d.12xlarge + - z1d.2xlarge + - z1d.3xlarge + - z1d.6xlarge + - z1d.large + - z1d.metal + - z1d.xlarge \ No newline at end of file diff --git a/cost-analyzer/savings-recommendations-allow-lists-azure.yaml b/cost-analyzer/savings-recommendations-allow-lists-azure.yaml new file mode 100644 index 000000000..e324c53a0 --- /dev/null +++ b/cost-analyzer/savings-recommendations-allow-lists-azure.yaml @@ -0,0 +1,283 @@ +kubecostProductConfigs: + savingsRecommendationsAllowLists: + Azure: + - A1 v2 + - A2 v2 + - A2m v2 + - A4 v2 + - A4m v2 + - A8 v2 + - A8m v2 + - B12ms + - B16ms + - B1ls + - B1ms + - B1s + - B20ms + - B2ms + - B2s + - B4ms + - B8ms + - D1 v2 + - D11 v2 + - D12 v2 + - D13 v2 + - D14 v2 + - D15 v2 + - D15i v2 + - D16 v3 + - D16 v4 + - D16a v4 + - D16as v4 + - D16d v4 + - D16ds v4 + - D16ds v5 + - D16s v3 + - D16s v4 + - D16s v5 + - D2 v2 + - D2 v3 + - D2 v4 + - D2a v4 + - D2as v4 + - D2d v4 + - D2ds v4 + - D2ds v5 + - D2s v3 + - D2s v4 + - D2s v5 + - D3 v2 + - D32 v3 + - D32 v4 + - D32a v4 + - D32as v4 + - D32d v4 + - D32ds v4 + - D32ds v5 + - D32s v3 + - D32s v4 + - D32s v5 + - D4 v2 + - D4 v3 + - D4 v4 + - D48 v3 + - D48 v4 + - D48a v4 + - D48as v4 + - D48d v4 + - D48ds v4 + - D48ds v5 + - D48s v3 + - D48s v4 + - D48s v5 + - D4a v4 + - D4as v4 + - D4d v4 + - D4ds v4 + - D4ds v5 + - D4s v3 + - D4s v4 + - D4s v5 + - D5 v2 + - D64 v3 + - D64 v4 + - D64a v4 + - D64as v4 + - D64d v4 + - D64ds v4 + - D64ds v5 + - D64s v3 + - D64s v4 + - D64s v5 + - D8 v3 + - D8 v4 + - D8a v4 + - D8as v4 + - D8d v4 + - D8ds v4 + - D8ds v5 + - D8s v3 + - D8s v4 + - D8s v5 + - D96a v4 + - D96as v4 + - D96ds v5 + - D96s v5 + - DC1s v2 + - DC2s v2 + - DC4s v2 + - DC8 v2 + - DS1 v2 + - DS11 v2 + - DS12 v2 + - DS13 v2 + - DS14 v2 + - DS15 v2 + - DS15i v2 + - DS2 v2 + - DS3 v2 + - DS4 v2 + - DS5 v2 + - E16 v3 + - E16 v4 + - E16a v4 + - E16as v4 + - E16d v4 + - E16ds v4 + - E16s v3 + - E16s v4 + - E2 v3 + - E2 v4 + - E20 v3 + - E20a v4 + - E20as v4 + - E20d v4 + - E20ds v4 + - E20s v3 + - E20s v4 + - E2a v4 + - E2as v4 + - E2d v4 + - E2ds v4 + - E2s v3 + - E2s v4 + - E32 v3 + - E32 v4 + - E32a v4 + - E32as v4 + - E32d v4 + - E32ds v4 + - E32s v3 + - E32s v4 + - E4 v3 + - E4 v4 + - E48 v3 + - E48 v4 + - E48a v4 + - E48as v4 + - E48d v4 + - E48ds v4 + - E48s v3 + - E48s v4 + - E4a v4 + - E4as v4 + - E4d v4 + - E4ds v4 + - E4s v3 + - E4s v4 + - E64 v3 + - E64 v4 + - E64a v4 + - E64as v4 + - E64d v4 + - E64ds v4 + - E64i v3 + - E64is v3 + - E64s v3 + - E64s v4 + - E8 v3 + - E8 v4 + - E80ids v4 + - E80is v4 + - E8a v4 + - E8as v4 + - E8d v4 + - E8ds v4 + - E8s v3 + - E8s v4 + - E96a v4 + - E96as v4 + - F1 + - F16 + - F16s + - F16s v2 + - F1s + - F2 + - F2s + - F2s v2 + - F32s v2 + - F4 + - F48s v2 + - F4s + - F4s v2 + - F64s v2 + - F72s v2 + - F8 + - F8s + - F8s v2 + - G1 + - G2 + - G3 + - G4 + - G5 + - GS1 + - GS2 + - GS3 + - GS4 + - GS5 + - H16 + - H16m + - H16mr + - H16r + - H8 + - H8m + - HB120rs v2 + - HC44rs + - L16s + - L16s v2 + - L32s + - L32s v2 + - L48s v2 + - L4s + - L64s v2 + - L80s v2 + - L8s + - L8s v2 + - M128 + - M128m + - M128ms + - M128s + - M16ms + - M208ms v2 + - M208s v2 + - M32ls + - M32ms + - M32ts + - M416ms v2 + - M416s v2 + - M64 + - M64ls + - M64m + - M64ms + - M64s + - M8ms + - NC12 + - NC12s v2 + - NC12s v3 + - NC16as T4 v3 + - NC24 + - NC24r + - NC24rs v2 + - NC24rs v3 + - NC24s v2 + - NC24s v3 + - NC4as T4 v3 + - NC6 + - NC64as T4 v3 + - NC6s v2 + - NC6s v3 + - NC8as T4 v3 + - ND12s + - ND24rs + - ND24s + - ND40rs v2 + - ND6s + - NP10s + - NP20s + - NP40s + - NV12 + - NV12s v3 + - NV24 + - NV24s v3 + - NV48s v3 + - NV6 \ No newline at end of file diff --git a/cost-analyzer/savings-recommendations-allow-lists-gcp.yaml b/cost-analyzer/savings-recommendations-allow-lists-gcp.yaml new file mode 100644 index 000000000..2de05f0b4 --- /dev/null +++ b/cost-analyzer/savings-recommendations-allow-lists-gcp.yaml @@ -0,0 +1,76 @@ +kubecostProductConfigs: + savingsRecommendationsAllowLists: + GCP: + - e2-highcpu-2 + - e2-highcpu-4 + - e2-highcpu-8 + - e2-highcpu-16 + - e2-highcpu-32 + - e2-highmem-2 + - e2-highmem-4 + - e2-highmem-8 + - e2-highmem-16 + - e2-micro + - e2-small + - e2-medium + - e2-standard-2 + - e2-standard-4 + - e2-standard-8 + - e2-standard-16 + - e2-standard-32 + - f1-micro + - g1-small + - m1-megamem-96 + - m1-ultramem-40 + - m1-ultramem-80 + - m1-ultramem-160 + - n1-highcpu-2 + - n1-highcpu-4 + - n1-highcpu-8 + - n1-highcpu-16 + - n1-highcpu-32 + - n1-highcpu-64 + - n1-highcpu-96 + - n1-highmem-2 + - n1-highmem-4 + - n1-highmem-8 + - n1-highmem-16 + - n1-highmem-32 + - n1-highmem-64 + - n1-highmem-96 + - n1-megamem-96 + - n1-standard-1 + - n1-standard-2 + - n1-standard-4 + - n1-standard-8 + - n1-standard-16 + - n1-standard-32 + - n1-standard-64 + - n1-standard-96 + - n1-ultramem-40 + - n1-ultramem-80 + - n1-ultramem-160 + - n2-highcpu-2 + - n2-highcpu-4 + - n2-highcpu-8 + - n2-highcpu-16 + - n2-highcpu-32 + - n2-highcpu-48 + - n2-highcpu-64 + - n2-highcpu-80 + - n2-highmem-2 + - n2-highmem-4 + - n2-highmem-8 + - n2-highmem-16 + - n2-highmem-32 + - n2-highmem-48 + - n2-highmem-64 + - n2-highmem-80 + - n2-standard-2 + - n2-standard-4 + - n2-standard-8 + - n2-standard-16 + - n2-standard-32 + - n2-standard-48 + - n2-standard-64 + - n2-standard-80 \ No newline at end of file From a22da274959f63bcfed6ec547b33541eac031090 Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Tue, 10 Sep 2024 18:41:02 +0000 Subject: [PATCH 16/29] bump cluster-controller 0.16.9 (#3652) * bump cluster-controller 0.16.9 Signed-off-by: Cliff Colvin * remove inadvertent checkin Signed-off-by: Cliff Colvin --- cost-analyzer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 2ac6f662f..96689c9b7 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2784,7 +2784,7 @@ clusterController: enabled: false image: repository: gcr.io/kubecost1/cluster-controller - tag: v0.16.8 + tag: v0.16.9 imagePullPolicy: IfNotPresent ## PriorityClassName ## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass From 4db00bb1342077ec8de22a89681e2155e5b54733 Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Tue, 10 Sep 2024 19:32:43 +0000 Subject: [PATCH 17/29] Merge pull request #3655 from kubecost/bump-kubecost-modeling-0.1.16 bump kubecost-modeling 0.1.16 --- cost-analyzer/values-eks-cost-monitoring.yaml | 2 +- cost-analyzer/values.yaml | 2 +- kubecost.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/values-eks-cost-monitoring.yaml b/cost-analyzer/values-eks-cost-monitoring.yaml index a300968f9..2c0bdc143 100644 --- a/cost-analyzer/values-eks-cost-monitoring.yaml +++ b/cost-analyzer/values-eks-cost-monitoring.yaml @@ -18,7 +18,7 @@ kubecostModel: image: public.ecr.aws/kubecost/cost-model forecasting: - fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.15 + fullImageName: public.ecr.aws/kubecost/kubecost-modeling:v0.1.16 networkCosts: image: diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 96689c9b7..04e0fb6a6 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2477,7 +2477,7 @@ forecasting: # image provided (registry, image, tag) will be used for the forecasting # container. # Example: fullImageName: gcr.io/kubecost1/forecasting:v0.0.1 - fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.15 + fullImageName: gcr.io/kubecost1/kubecost-modeling:v0.1.16 imagePullPolicy: IfNotPresent # Resource specification block for the forecasting container. diff --git a/kubecost.yaml b/kubecost.yaml index fcb3cacd9..3a8bb28e5 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23571,7 +23571,7 @@ spec: restartPolicy: Always containers: - name: forecasting - image: gcr.io/kubecost1/kubecost-modeling:v0.1.15 + image: gcr.io/kubecost1/kubecost-modeling:v0.1.16 volumeMounts: - name: tmp mountPath: /tmp From df191790e99887e82e7aaa91538916ac7420ec28 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:49:45 -0400 Subject: [PATCH 18/29] remove helm rollout restarter (#3658) (#3659) * remove helm rollout restarter Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> --- cost-analyzer/templates/_helpers.tpl | 13 +++++++++++++ .../templates/aggregator-cloud-cost-deployment.yaml | 6 ------ cost-analyzer/templates/aggregator-statefulset.yaml | 4 ---- .../cost-analyzer-deployment-template.yaml | 4 ---- cost-analyzer/templates/diagnostics-deployment.yaml | 4 ---- .../templates/frontend-deployment-template.yaml | 6 ------ .../templates/prometheus-server-deployment.yaml | 6 ------ kubecost.yaml | 4 ---- 8 files changed, 13 insertions(+), 34 deletions(-) diff --git a/cost-analyzer/templates/_helpers.tpl b/cost-analyzer/templates/_helpers.tpl index 93ae33a00..49c99acdf 100755 --- a/cost-analyzer/templates/_helpers.tpl +++ b/cost-analyzer/templates/_helpers.tpl @@ -1483,6 +1483,11 @@ for more information */ -}} {{- define "configsChecksum" -}} {{- $files := list + "alibaba-service-key-secret.yaml" + "aws-service-key-secret.yaml" + "azure-service-key-secret.yaml" + "azure-storage-config-secret.yaml" + "cloud-integration-secret.yaml" "cost-analyzer-account-mapping-configmap.yaml" "cost-analyzer-alerts-configmap.yaml" "cost-analyzer-asset-reports-configmap.yaml" @@ -1498,12 +1503,20 @@ for more information "cost-analyzer-saved-reports-configmap.yaml" "cost-analyzer-server-configmap.yaml" "cost-analyzer-smtp-configmap.yaml" + "external-grafana-config-map-template.yaml" "gcpstore-config-map-template.yaml" + "grafana-secret.yaml" "install-plugins.yaml" "integrations-postgres-queries-configmap.yaml" + "integrations-postgres-secret.yaml" + "kubecost-agent-secret-template.yaml" + "kubecost-agent-secretprovider-template.yaml" "kubecost-cluster-controller-actions-config.yaml" "kubecost-cluster-manager-configmap-template.yaml" + "kubecost-oidc-secret-template.yaml" + "kubecost-saml-secret-template.yaml" "mimir-proxy-configmap-template.yaml" + "savings-recommendations-allowlists-config-map-template.yaml" -}} {{- $checksum := "" -}} {{- range $files -}} diff --git a/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml b/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml index 2123970ba..4bd0f6cf7 100644 --- a/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml +++ b/cost-analyzer/templates/aggregator-cloud-cost-deployment.yaml @@ -29,12 +29,6 @@ spec: template: metadata: labels: - {{/* - Force pod restarts on upgrades to ensure the nginx config is current - */}} - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} app.kubernetes.io/name: cloud-cost app.kubernetes.io/instance: {{ .Release.Name }} app: cloud-cost diff --git a/cost-analyzer/templates/aggregator-statefulset.yaml b/cost-analyzer/templates/aggregator-statefulset.yaml index 13199eaf4..9bd4d57a8 100644 --- a/cost-analyzer/templates/aggregator-statefulset.yaml +++ b/cost-analyzer/templates/aggregator-statefulset.yaml @@ -44,10 +44,6 @@ spec: labels: app.kubernetes.io/name: aggregator app.kubernetes.io/instance: {{ .Release.Name }} - {{/* Force pod restarts on upgrades to ensure the nginx config is current */}} - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} app: aggregator {{- with .Values.global.additionalLabels }} {{- toYaml . | nindent 8 }} diff --git a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml index 3c57b8313..dba2ce204 100644 --- a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml @@ -40,10 +40,6 @@ spec: metadata: labels: {{- include "cost-analyzer.selectorLabels" . | nindent 8 }} - {{/* Force pod restarts on upgrades to ensure the nginx config is current */}} - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} {{- if .Values.global.additionalLabels }} {{ toYaml .Values.global.additionalLabels | nindent 8 }} {{- end }} diff --git a/cost-analyzer/templates/diagnostics-deployment.yaml b/cost-analyzer/templates/diagnostics-deployment.yaml index 196b62c0d..d47590eca 100644 --- a/cost-analyzer/templates/diagnostics-deployment.yaml +++ b/cost-analyzer/templates/diagnostics-deployment.yaml @@ -31,10 +31,6 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} annotations: - # Generates a unique annotation upon each `helm upgrade`, forcing a redeployment - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} {{- with .Values.global.podAnnotations}} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/cost-analyzer/templates/frontend-deployment-template.yaml b/cost-analyzer/templates/frontend-deployment-template.yaml index 09235b1b9..316400dbb 100644 --- a/cost-analyzer/templates/frontend-deployment-template.yaml +++ b/cost-analyzer/templates/frontend-deployment-template.yaml @@ -35,12 +35,6 @@ spec: template: metadata: labels: - {{/* - Force pod restarts on upgrades to ensure the nginx config is current - */}} - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} {{- include "frontend.selectorLabels" . | nindent 8 }} {{- if .Values.global.additionalLabels }} {{- toYaml .Values.global.additionalLabels | nindent 8 }} diff --git a/cost-analyzer/templates/prometheus-server-deployment.yaml b/cost-analyzer/templates/prometheus-server-deployment.yaml index ef170959c..194c3df75 100755 --- a/cost-analyzer/templates/prometheus-server-deployment.yaml +++ b/cost-analyzer/templates/prometheus-server-deployment.yaml @@ -32,12 +32,6 @@ spec: {{- end }} checksum/configs: {{ include "configsChecksum" . }} labels: - {{/* - Force pod restarts on upgrades to ensure the configmap is current - */}} - {{- if not .Values.global.platforms.cicd.enabled }} - helm-rollout-restarter: {{ randAlphaNum 5 | quote }} - {{- end }} {{- include "prometheus.server.labels" . | nindent 8 }} {{- with .Values.global.additionalLabels }} {{- toYaml . | nindent 8 }} diff --git a/kubecost.yaml b/kubecost.yaml index 3a8bb28e5..f16a98e08 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23237,8 +23237,6 @@ spec: app.kubernetes.io/name: cost-analyzer app.kubernetes.io/instance: kubecost app: cost-analyzer - - helm-rollout-restarter: "e5zu5" spec: securityContext: fsGroup: 1001 @@ -23778,8 +23776,6 @@ spec: template: metadata: labels: - - helm-rollout-restarter: "AoKZ9" component: "server" app: prometheus release: kubecost From a7780ad8e471d86979d6e7b39b9b9fb88195e419 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:01:26 -0400 Subject: [PATCH 19/29] Enhance Pod utilization Grafana dashboard with GPU utilization widget (#3660) (#3661) * add GPU utilization widget * Update cost-analyzer/grafana-dashboards/pod-utilization.json --------- Signed-off-by: chipzoller Co-authored-by: Chip Zoller Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> --- .../grafana-dashboards/pod-utilization.json | 107 +++++++++++++++++- 1 file changed, 105 insertions(+), 2 deletions(-) diff --git a/cost-analyzer/grafana-dashboards/pod-utilization.json b/cost-analyzer/grafana-dashboards/pod-utilization.json index f037af45e..6596cef76 100644 --- a/cost-analyzer/grafana-dashboards/pod-utilization.json +++ b/cost-analyzer/grafana-dashboards/pod-utilization.json @@ -603,12 +603,115 @@ "timeFrom": "", "title": "CPU throttle percent", "type": "timeseries" + }, + { + "datasource": { + "default": false, + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "NVIDIA GPU usage for this container.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 100, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "DCGM_FI_PROF_GR_ENGINE_ACTIVE{namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "metric": "container_cpu", + "refId": "A", + "step": 10 + } + ], + "timeFrom": "", + "title": "GPU Usage", + "type": "timeseries" } ], "refresh": "", "revision": 1, - "schemaVersion": 38, - "style": "dark", + "schemaVersion": 39, "tags": [ "kubecost", "utilization", From 2832455f5e50222fd4a6738fb1a26efde6369927 Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Thu, 12 Sep 2024 21:01:30 +0000 Subject: [PATCH 20/29] Merge pull request #3662 from kubecost/bump-network-costs-0.17.6 bump network-costs 0.17.6 --- cost-analyzer/values-eks-cost-monitoring.yaml | 2 +- cost-analyzer/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cost-analyzer/values-eks-cost-monitoring.yaml b/cost-analyzer/values-eks-cost-monitoring.yaml index 2c0bdc143..c4027687e 100644 --- a/cost-analyzer/values-eks-cost-monitoring.yaml +++ b/cost-analyzer/values-eks-cost-monitoring.yaml @@ -23,7 +23,7 @@ forecasting: networkCosts: image: repository: public.ecr.aws/kubecost/kubecost-network-costs - tag: v0.17.5 + tag: v0.17.6 clusterController: image: diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 04e0fb6a6..bfe80564b 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2319,7 +2319,7 @@ networkCosts: enabled: false image: repository: gcr.io/kubecost1/kubecost-network-costs - tag: v0.17.5 + tag: v0.17.6 imagePullPolicy: IfNotPresent updateStrategy: type: RollingUpdate From 1886a606b8faa7eb169d0b174ed82ae80c58b053 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:14:40 -0600 Subject: [PATCH 21/29] Add new container costs and resources endpoints to nginx (#3642) (#3665) * Add new container costs and resources endpoints to nginx * Add value for configuring container resource usage retention in days Co-authored-by: Niko Kovacevic --- cost-analyzer/templates/_helpers.tpl | 2 ++ ...analyzer-frontend-config-map-template.yaml | 32 +++++++++++++++++++ cost-analyzer/values.yaml | 9 ++++++ 3 files changed, 43 insertions(+) diff --git a/cost-analyzer/templates/_helpers.tpl b/cost-analyzer/templates/_helpers.tpl index 49c99acdf..513c8011a 100755 --- a/cost-analyzer/templates/_helpers.tpl +++ b/cost-analyzer/templates/_helpers.tpl @@ -1135,6 +1135,8 @@ Begin Kubecost 2.0 templates value: {{ .Values.kubecostAggregator.etlDailyStoreDurationDays | quote }} - name: ETL_HOURLY_STORE_DURATION_HOURS value: {{ .Values.kubecostAggregator.etlHourlyStoreDurationHours | quote }} + - name: CONTAINER_RESOURCE_USAGE_RETENTION_DAYS + value: {{ .Values.kubecostAggregator.containerResourceUsageRetentionDays | quote }} - name: DB_TRIM_MEMORY_ON_CLOSE value: {{ .Values.kubecostAggregator.dbTrimMemoryOnClose | quote }} - name: KUBECOST_NAMESPACE 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 00815b6fb..d1b0c55d2 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -808,6 +808,38 @@ data: proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + location = /model/kubernetes/containers/resources { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/kubernetes/containers/resources; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location = /model/kubernetes/containers/resources/timeseries { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/kubernetes/containers/resources/timeseries; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location = /model/kubernetes/containers/costs { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/kubernetes/containers/costs; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location = /model/kubernetes/containers/costs/timeseries { + proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; + proxy_pass http://aggregator/kubernetes/containers/costs/timeseries; + proxy_redirect off; + proxy_set_header Connection ""; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } location = /model/networkinsights { proxy_read_timeout {{ .Values.kubecostFrontend.timeoutSeconds | default 300 }}; proxy_pass http://aggregator/networkinsights; diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index bfe80564b..da8978037 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2603,6 +2603,7 @@ kubecostAggregator: # # default: 91 etlDailyStoreDurationDays: 91 + # How much hourly data to ingest from the federated store bucket, and how much # to keep in the DB before rolling the data off. # @@ -2612,6 +2613,14 @@ kubecostAggregator: # default: 49 etlHourlyStoreDurationHours: 49 + # How much container resource usage data to retain in the DB, in terms of days. + # + # In high scale environments setting this to `0` can improve performance if hourly + # resolution is not a requirement. + # + # default: 1 + containerResourceUsageRetentionDays: 1 + # Trim memory on close, only change if advised by Kubecost support. dbTrimMemoryOnClose: true From 3957f2713bd604912211b7d97329ca981622c743 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Fri, 13 Sep 2024 01:06:26 +0000 Subject: [PATCH 22/29] Bump to 2.4.0-rc.4 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index fa03d3f81..afaa7922f 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.3" +appVersion: "2.4.0-rc.4" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.3" +version: "2.4.0-rc.4" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 d1b0c55d2..d7431be51 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1425,7 +1425,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.3", + "chartVersion": "2.4.0-rc.4", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 8c68c3b7ad3fe3885cf6d6a2e1421383f29ab4f9 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Fri, 13 Sep 2024 01:37:40 +0000 Subject: [PATCH 23/29] Bump to 2.4.0-rc.5 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index afaa7922f..a12ffb67b 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.4" +appVersion: "2.4.0-rc.5" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.4" +version: "2.4.0-rc.5" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 d7431be51..9beb812a9 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1425,7 +1425,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.4", + "chartVersion": "2.4.0-rc.5", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 404c42b1aeea4a2001767d27d709249e4a024bdf Mon Sep 17 00:00:00 2001 From: Cliff Colvin Date: Thu, 12 Sep 2024 20:44:34 -0500 Subject: [PATCH 24/29] bump k8s-sidcar to cgr for cve Signed-off-by: Cliff Colvin --- cost-analyzer/values.yaml | 4 ++-- kubecost.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index da8978037..9fd351bcb 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -3204,8 +3204,8 @@ grafana: ## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards sidecar: image: - repository: kiwigrid/k8s-sidecar - tag: 1.27.5 + repository: cgr.dev/chainguard/k8s-sidecar + tag: latest pullPolicy: IfNotPresent resources: {} dashboards: diff --git a/kubecost.yaml b/kubecost.yaml index f16a98e08..ad14d2910 100644 --- a/kubecost.yaml +++ b/kubecost.yaml @@ -23657,7 +23657,7 @@ spec: type: RuntimeDefault containers: - name: grafana-sc-dashboard - image: "kiwigrid/k8s-sidecar:1.27.2" + image: "cgr.dev/chainguard/k8s-sidecar:latest" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false From c87dc0bfb6c0033ab8db17ad25764bdd39b930c3 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Fri, 13 Sep 2024 01:53:32 +0000 Subject: [PATCH 25/29] Bump to 2.4.0-rc.6 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index a12ffb67b..862476fe9 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.5" +appVersion: "2.4.0-rc.6" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.5" +version: "2.4.0-rc.6" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 9beb812a9..c8cdbb8f4 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1425,7 +1425,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.5", + "chartVersion": "2.4.0-rc.6", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From c9ea798dca9fc8affede8fcf34cbb632682f5f95 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:47:48 -0500 Subject: [PATCH 26/29] Merge pull request #3670 from kubecost/custom-service-labels (#3671) aggregator custom labels template Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> --- cost-analyzer/templates/aggregator-service.yaml | 3 +++ cost-analyzer/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cost-analyzer/templates/aggregator-service.yaml b/cost-analyzer/templates/aggregator-service.yaml index 40f6729de..134c2f37d 100644 --- a/cost-analyzer/templates/aggregator-service.yaml +++ b/cost-analyzer/templates/aggregator-service.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{ include "aggregator.commonLabels" . | nindent 4 }} +{{- if .Values.kubecostAggregator.service.labels }} + {{- toYaml .Values.kubecostAggregator.service.labels | nindent 4 }} +{{- end }} spec: selector: {{ include "aggregator.selectorLabels" . | nindent 4 }} diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 9fd351bcb..2fa5b39f5 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -2740,6 +2740,9 @@ kubecostAggregator: imageVersion: latest # containerSecurityContext: + service: + labels: {} + ## Kubecost Multi-cluster Diagnostics (beta) ## A single view into the health of all agent clusters. Each agent cluster sends ## its diagnostic data to a storage bucket. Future versions may include From 387ef4f27b7a06e4817bb91677da183b51b33803 Mon Sep 17 00:00:00 2001 From: "Cliff Colvin (release bot variant)" Date: Mon, 16 Sep 2024 21:01:49 +0000 Subject: [PATCH 27/29] Bump to 2.4.0 Commit auto-generated by release script. Signed-off-by: Cliff Colvin (release bot variant) --- cost-analyzer/Chart.yaml | 4 ++-- .../templates/cost-analyzer-frontend-config-map-template.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index 862476fe9..0d1322ba5 100755 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.4.0-rc.6" +appVersion: "2.4.0" description: Kubecost Helm chart - monitor your cloud costs! name: cost-analyzer -version: "2.4.0-rc.6" +version: "2.4.0" icon: https://raw.githubusercontent.com/kubecost/.github/9602bea0c06773da66ba43cb9ce5e1eb2b797c32/kubecost_logo.png annotations: "artifacthub.io/links": | 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 c8cdbb8f4..dfeb42db2 100755 --- a/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-frontend-config-map-template.yaml @@ -1425,7 +1425,7 @@ data: "carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}", "clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}", "forecastingEnabled": "{{ template "forecastingEnabled" . }}", - "chartVersion": "2.4.0-rc.6", + "chartVersion": "2.4.0", "hourlyDataRetention": "{{ (.Values.kubecostAggregator.etlHourlyStoreDurationHours) }}", "dailyDataRetention": "{{ (.Values.kubecostAggregator.etlDailyStoreDurationDays) }}", "hideDiagnostics": "{{ default false ((.Values.kubecostProductConfigs).hideDiagnostics) }}", From 00818bf6fd90eb9d16bb7dc3b3bb65f51b20e824 Mon Sep 17 00:00:00 2001 From: Andrew Dawson Date: Thu, 19 Sep 2024 16:52:21 -0400 Subject: [PATCH 28/29] Adding OpenShift SCC for clusterController, removing hostPort on clusterController Adding OpenShift SCC for clusterController, removing hostPort on clusterController --- .github/workflows/chart.yaml | 1 + .../kubecost-cluster-controller-ocp-scc.yaml | 33 +++++++++++++++++++ .../kubecost-cluster-controller-template.yaml | 1 - cost-analyzer/values-openshift.yaml | 7 ++-- cost-analyzer/values.yaml | 1 + 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 cost-analyzer/templates/kubecost-cluster-controller-ocp-scc.yaml diff --git a/.github/workflows/chart.yaml b/.github/workflows/chart.yaml index 30d9b3867..e19db758d 100644 --- a/.github/workflows/chart.yaml +++ b/.github/workflows/chart.yaml @@ -186,6 +186,7 @@ jobs: --set global.platforms.openshift.route.enabled=true \ --set global.platforms.openshift.scc.nodeExporter=true \ --set global.platforms.openshift.scc.networkCosts=true \ + --set global.platforms.openshift.scc.clusterController=true \ --set networkCosts.enabled=true \ --set prometheus.nodeExporter.enabled=true # run: ct install --namespace kubecost --chart-dirs=cost-analyzer/ --charts cost-analyzer/ diff --git a/cost-analyzer/templates/kubecost-cluster-controller-ocp-scc.yaml b/cost-analyzer/templates/kubecost-cluster-controller-ocp-scc.yaml new file mode 100644 index 000000000..3a33b7811 --- /dev/null +++ b/cost-analyzer/templates/kubecost-cluster-controller-ocp-scc.yaml @@ -0,0 +1,33 @@ +{{- if and (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") (.Values.global.platforms.openshift.scc.clusterController) (.Values.clusterController.enabled) }} +apiVersion: security.openshift.io/v1 +kind: SecurityContextConstraints +metadata: + name: {{ template "kubecost.clusterControllerName" . }} +priority: 10 +allowPrivilegedContainer: true +allowHostDirVolumePlugin: true +allowHostNetwork: true +allowHostPorts: true +allowHostPID: false +allowHostIPC: false +readOnlyRootFilesystem: false +runAsUser: + type: RunAsAny +fsGroup: + type: RunAsAny +seLinuxContext: + type: RunAsAny +supplementalGroups: + type: RunAsAny +seccompProfiles: +- runtime/default +volumes: + - hostPath + - projected + - configMap +hostPorts: + - min: 9731 + max: 9731 +users: + - system:serviceaccount:{{ .Release.Namespace }}:{{ template "kubecost.clusterControllerName" . }} +{{- 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 ac86658be..ba46531a5 100644 --- a/cost-analyzer/templates/kubecost-cluster-controller-template.yaml +++ b/cost-analyzer/templates/kubecost-cluster-controller-template.yaml @@ -256,7 +256,6 @@ spec: ports: - name: http-server containerPort: 9731 - hostPort: 9731 serviceAccount: {{ template "kubecost.clusterControllerName" . }} serviceAccountName: {{ template "kubecost.clusterControllerName" . }} {{- with .Values.clusterController.tolerations }} diff --git a/cost-analyzer/values-openshift.yaml b/cost-analyzer/values-openshift.yaml index 7c8ea13b3..023b30a47 100644 --- a/cost-analyzer/values-openshift.yaml +++ b/cost-analyzer/values-openshift.yaml @@ -12,14 +12,11 @@ global: scc: nodeExporter: false # Creates an SCC for Prometheus Node Exporter. This requires Node Exporter be enabled. networkCosts: false # Creates an SCC for Kubecost network-costs. This requires network-costs be enabled. + clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled. + # When OpenShift is enabled, the following securityContext will be applied to all resources unless they define their own. securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault -# networkCosts: -# enabled: true # Enable network costs. -# prometheus: -# nodeExporter: -# enabled: true # Enable Prometheus Node Exporter. diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 2fa5b39f5..29ce83b67 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -247,6 +247,7 @@ global: scc: nodeExporter: false # Creates an SCC for Prometheus Node Exporter. This requires Node Exporter be enabled. networkCosts: false # Creates an SCC for Kubecost network-costs. This requires network-costs be enabled. + clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled. # When OpenShift is enabled, the following securityContext will be applied to all resources unless they define their own. securityContext: runAsNonRoot: true From 0cb474a04161f4c770754a1e54ce675b38d19e20 Mon Sep 17 00:00:00 2001 From: Chip Zoller Date: Sat, 21 Sep 2024 09:02:01 -0400 Subject: [PATCH 29/29] Update cost-analyzer/values.yaml Add space to fix linting error to allow CI to complete against the remainder of these changes. Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> --- cost-analyzer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 29ce83b67..cdcbe0095 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -247,7 +247,7 @@ global: scc: nodeExporter: false # Creates an SCC for Prometheus Node Exporter. This requires Node Exporter be enabled. networkCosts: false # Creates an SCC for Kubecost network-costs. This requires network-costs be enabled. - clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled. + clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled. # When OpenShift is enabled, the following securityContext will be applied to all resources unless they define their own. securityContext: runAsNonRoot: true