diff --git a/cost-analyzer/Chart.yaml b/cost-analyzer/Chart.yaml index add353d..e2948d2 100644 --- a/cost-analyzer/Chart.yaml +++ b/cost-analyzer/Chart.yaml @@ -3,7 +3,7 @@ annotations: - name: Homepage url: https://www.kubecost.com apiVersion: v2 -appVersion: 1.101.3 +appVersion: 1.102.2 dependencies: - condition: global.grafana.enabled name: grafana @@ -20,4 +20,4 @@ dependencies: description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to monitor cloud costs. name: cost-analyzer -version: 1.101.3 +version: 1.102.2 diff --git a/cost-analyzer/README.md b/cost-analyzer/README.md index 6a4caee..f55e7f4 100644 --- a/cost-analyzer/README.md +++ b/cost-analyzer/README.md @@ -26,6 +26,7 @@ Parameter | Description | Default `persistentVolume.dbSize` | Define PVC size for cost-analyzer's flat file database | `32.0Gi` `ingress.enabled` | If true, Ingress will be created | `false` `ingress.annotations` | Ingress annotations | `{}` +`ingress.className` | Ingress class name | `{}` `ingress.paths` | Ingress paths | `["/"]` `ingress.hosts` | Ingress hostnames | `[cost-analyzer.local]` `ingress.tls` | Ingress TLS configuration (YAML) | `[]` @@ -65,4 +66,4 @@ kind create cluster --image kindest/node: - perform ct execution ```shell ct install --chart-dirs="." --charts="." --helm-repo-extra-args="--set=global.prometheus.enabled=false --set=global.grafana.enabled=false" -``` \ No newline at end of file +``` diff --git a/cost-analyzer/charts/grafana/values.yaml b/cost-analyzer/charts/grafana/values.yaml index 00eb049..a379ec8 100644 --- a/cost-analyzer/charts/grafana/values.yaml +++ b/cost-analyzer/charts/grafana/values.yaml @@ -25,7 +25,7 @@ livenessProbe: image: repository: grafana/grafana - tag: 9.3.1 + tag: 9.4.3 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml index 4d3797c..189cc57 100644 --- a/cost-analyzer/templates/cost-analyzer-deployment-template.yaml +++ b/cost-analyzer/templates/cost-analyzer-deployment-template.yaml @@ -102,7 +102,7 @@ spec: {{- end }} {{- if .Values.kubecostProductConfigs }} {{- if .Values.kubecostProductConfigs.productKey }} - {{- if .Values.kubecostProductConfigs.productKey.secretname }} + {{- if and .Values.kubecostProductConfigs.productKey.enabled .Values.kubecostProductConfigs.productKey.secretname }} - name: productkey-secret secret: secretName: {{ .Values.kubecostProductConfigs.productKey.secretname }} @@ -748,6 +748,8 @@ spec: value: {{ (quote .Values.kubecostModel.etlDailyStoreDurationDays) | default (quote 91) }} - name: ETL_HOURLY_STORE_DURATION_HOURS value: {{ (quote .Values.kubecostModel.etlHourlyStoreDurationHours) | default (quote 49) }} + - name: ETL_WEEKLY_STORE_DURATION_WEEKS + value: {{ (quote .Values.kubecostModel.etlWeeklyStoreDurationWeeks) | default (quote 53) }} - name: ETL_FILE_STORE_ENABLED value: {{ (quote .Values.kubecostModel.etlFileStoreEnabled) | default (quote true) }} - name: ETL_ASSET_RECONCILIATION_ENABLED diff --git a/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml b/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml index 275374a..1325d44 100644 --- a/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml +++ b/cost-analyzer/templates/cost-analyzer-pricing-configmap.yaml @@ -47,6 +47,9 @@ data: {{- if .Values.kubecostProductConfigs.clusterName }} clusterName: "{{ .Values.kubecostProductConfigs.clusterName }}" {{- end -}} + {{- if .Values.kubecostProductConfigs.clusterAccountID }} + clusterAccountID: "{{ .Values.kubecostProductConfigs.clusterAccountID }}" + {{- end -}} {{- if .Values.kubecostProductConfigs.currencyCode }} currencyCode: "{{ .Values.kubecostProductConfigs.currencyCode }}" {{- end -}} diff --git a/cost-analyzer/templates/cost-analyzer-psp-role.template.yaml b/cost-analyzer/templates/cost-analyzer-psp-role.template.yaml index 00fbcbf..c62be76 100644 --- a/cost-analyzer/templates/cost-analyzer-psp-role.template.yaml +++ b/cost-analyzer/templates/cost-analyzer-psp-role.template.yaml @@ -1,3 +1,4 @@ +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} {{- if .Values.podSecurityPolicy }} {{- if .Values.podSecurityPolicy.enabled }} apiVersion: rbac.authorization.k8s.io/v1 @@ -19,3 +20,4 @@ rules: - {{ template "cost-analyzer.fullname" . }}-psp {{- end }} {{- end }} +{{- end }} diff --git a/cost-analyzer/templates/cost-analyzer-psp-rolebinding.template.yaml b/cost-analyzer/templates/cost-analyzer-psp-rolebinding.template.yaml index dbf35d4..2eda00d 100644 --- a/cost-analyzer/templates/cost-analyzer-psp-rolebinding.template.yaml +++ b/cost-analyzer/templates/cost-analyzer-psp-rolebinding.template.yaml @@ -1,3 +1,4 @@ +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} {{- if .Values.podSecurityPolicy }} {{- if .Values.podSecurityPolicy.enabled }} apiVersion: rbac.authorization.k8s.io/v1 @@ -17,3 +18,4 @@ subjects: namespace: {{ .Release.Namespace }} {{- end }} {{- end }} +{{- end }} diff --git a/cost-analyzer/values-agent.yaml b/cost-analyzer/values-agent.yaml index a6ce372..7dc9c1c 100644 --- a/cost-analyzer/values-agent.yaml +++ b/cost-analyzer/values-agent.yaml @@ -1,12 +1,22 @@ # Kubecost running as an Agent is designed for external hosting. The current setup deploys a # kubecost-agent pod, low data retention prometheus server + thanos sidecar, and node-exporter. +networkCosts: + enabled: false + # config: + # services: + # amazon-web-services: true + # google-cloud-services: true + # azure-cloud-services: true + + global: thanos: enabled: false grafana: enabled: false proxy: false - +agentCsi: + enabled: false # Agent enables specific features designed to enhance the metrics exporter deployment # with enhancements designed for external hosting. agent: true @@ -18,6 +28,7 @@ agentCsi: provider: parameters: {} + # No Grafana configuration is required. grafana: sidecar: @@ -33,13 +44,34 @@ kubecostMetrics: exportClusterInfo: true exportClusterCache: true -# Prometheus defaults to low rentention (10h), disables KSM, and attaches a thanos-sidecar +# Prometheus defaults to low retention (10h), disables KSM, and attaches a thanos-sidecar # for exporting metrics. prometheus: + nodeExporter: + enabled: false kube-state-metrics: enabled: false disabled: true - + extraScrapeConfigs: | + - job_name: kubecost-agent + honor_labels: true + scrape_interval: 1m + scrape_timeout: 60s + metrics_path: /metrics + scheme: http + dns_sd_configs: + - names: + - kubecost-agent-agent + type: 'A' + port: 9005 + - job_name: kubecost-networking + kubernetes_sd_configs: + - role: pod + relabel_configs: + # Scrape only the the targets matching the following metadata + - source_labels: [__meta_kubernetes_pod_label_app] + action: keep + regex: {{ template "cost-analyzer.networkCostsName" . }} server: extraArgs: storage.tsdb.min-block-duration: 2h @@ -56,7 +88,7 @@ prometheus: enableAdminApi: true sidecarContainers: - name: thanos-sidecar - image: thanosio/thanos:v0.22.0 + image: thanosio/thanos:v0.29.0 securityContext: runAsNonRoot: true runAsUser: 1001 diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 8e0ee21..8f65c17 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -185,7 +185,7 @@ pricingCsv: csvAccessCredentials: pricing-schema-access-secret # SAML integration for user management and RBAC, enterprise key required -# Ref: https://github.com/kubecost/docs/blob/master/user-management.md +# Ref: https://github.com/kubecost/docs/blob/main/user-management.md saml: enabled: false secretName: "kubecost-authzero" @@ -375,6 +375,10 @@ kubecostModel: # The total number of hours the ETL pipelines will build # Set to 0 to disable hourly ETL (not recommended) etlHourlyStoreDurationHours: 49 + # The total number of weeks the ETL pipelines will build + # Set to 0 to disable weekly ETL (not recommended) + # The default is 53 to ensure at least a year of coverage (371 days) + etlWeeklyStoreDurationWeeks: 53 # For deploying kubecost in a cluster that does not self-monitor etlReadOnlyMode: false @@ -415,7 +419,7 @@ kubecostModel: failureThreshold: 200 extraArgs: [] -# Basic Kubecost ingress, more examples available at https://github.com/kubecost/docs/blob/master/ingress-examples.md +# Basic Kubecost ingress, more examples available at https://github.com/kubecost/docs/blob/main/ingress-examples.md ingress: enabled: false # className: nginx @@ -489,7 +493,7 @@ extraVolumes: [] ## extraVolumeMounts: [] -# Define persistence volume for cost-analyzer, more information at https://github.com/kubecost/docs/blob/master/storage.md +# Define persistence volume for cost-analyzer, more information at https://github.com/kubecost/docs/blob/main/storage.md persistentVolume: size: 32Gi dbSize: 32.0Gi @@ -632,12 +636,12 @@ prometheus: daemonset: "true" ## Module for measuring network costs -## Ref: https://github.com/kubecost/docs/blob/master/network-allocation.md +## Ref: https://github.com/kubecost/docs/blob/main/network-allocation.md networkCosts: enabled: false podSecurityPolicy: enabled: false - image: gcr.io/kubecost1/kubecost-network-costs:v16.5 + image: gcr.io/kubecost1/kubecost-network-costs:v0.16.6 imagePullPolicy: Always updateStrategy: type: RollingUpdate @@ -894,14 +898,14 @@ costEventsAudit: # kubecostProductConfigs: # An optional list of cluster definitions that can be added for frontend access. The local # cluster is *always* included by default, so this list is for non-local clusters. -# Ref: https://github.com/kubecost/docs/blob/master/multi-cluster.md +# Ref: https://github.com/kubecost/docs/blob/main/multi-cluster.md # clusters: # - name: "Cluster A" # address: http://cluster-a.kubecost.com:9090 # # Optional authentication credentials - only basic auth is currently supported. # auth: # type: basic -# # Secret name should be a secret formatted based on: https://github.com/kubecost/docs/blob/master/ingress-examples.md +# # Secret name should be a secret formatted based on: https://github.com/kubecost/docs/blob/main/ingress-examples.md # secretName: cluster-a-auth # # Or pass auth directly as base64 encoded user:pass # data: YWRtaW46YWRtaW4= @@ -967,6 +971,7 @@ costEventsAudit: # pod_external_label: "kubernetes_pod" # grafanaURL: "" # clusterName: "" # clusterName is the default context name in settings. +# clusterAccountID: "" # Manually set Account property for assets # currencyCode: "USD" # official support for USD, AUD, BRL, CAD, CHF, CNY, DKK, EUR, GBP, INR, JPY, NOK, PLN, SEK # azureBillingRegion: US # Represents 2-letter region code, e.g. West Europe = NL, Canada = CA. ref: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes # azureSubscriptionID: 0bd50fdf-c923-4e1e-850c-196dd3dcc5d3 diff --git a/index.yaml b/index.yaml index c6b221d..f2b0798 100644 --- a/index.yaml +++ b/index.yaml @@ -6,8 +6,8 @@ entries: - name: Homepage url: https://www.kubecost.com apiVersion: v2 - appVersion: 1.101.3 - created: "2023-03-21T12:51:09.407686095Z" + appVersion: 1.102.2 + created: "2023-04-20T12:51:09.407686095Z" dependencies: - condition: global.grafana.enabled name: grafana @@ -26,6 +26,6 @@ entries: digest: b4fc6cdeb1d06325c1a183bfbbfa54020f87167fec8a584c30328ebcf3d35fa8 name: cost-analyzer urls: - - kubecost-1.101.3.tgz - version: 1.101.3 -generated: "2023-03-21T12:51:09.397504141Z" + - kubecost-1.102.2.tgz + version: 1.102.2 +generated: "2023-04-20T12:51:09.397504141Z" diff --git a/kubecost-1.101.3.tgz b/kubecost-1.101.3.tgz deleted file mode 100644 index 7040d25..0000000 Binary files a/kubecost-1.101.3.tgz and /dev/null differ diff --git a/kubecost-1.102.2.tgz b/kubecost-1.102.2.tgz new file mode 100644 index 0000000..84cab97 Binary files /dev/null and b/kubecost-1.102.2.tgz differ