Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
Update to v1.99.0 (#10)
Browse files Browse the repository at this point in the history
* Update to v1.99.0

Signed-off-by: Linh Lam <[email protected]>
  • Loading branch information
linhlam-kc authored Jan 9, 2023
1 parent 29bd7d8 commit e946504
Show file tree
Hide file tree
Showing 39 changed files with 362 additions and 98 deletions.
38 changes: 19 additions & 19 deletions cost-analyzer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
apiVersion: v2
appVersion: "1.98.0"
description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to monitor
cloud costs.
name: cost-analyzer
version: "1.98.0"
annotations:
"artifacthub.io/links": |
artifacthub.io/links: |
- name: Homepage
url: https://www.kubecost.com
apiVersion: v2
appVersion: 1.99.0
dependencies:
- condition: global.grafana.enabled
name: grafana
repository: file://./charts/grafana
version: "~1.17.2"
- condition: global.prometheus.enabled
name: prometheus
repository: file://./charts/prometheus
version: "~11.0.2"
- condition: global.thanos.enabled
name: thanos
repository: file://./charts/thanos
version: "~0.24.0"
- condition: global.grafana.enabled
name: grafana
repository: file://./charts/grafana
version: ~1.17.2
- condition: global.prometheus.enabled
name: prometheus
repository: file://./charts/prometheus
version: ~11.0.2
- condition: global.thanos.enabled
name: thanos
repository: file://./charts/thanos
version: ~0.29.0
description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to monitor
cloud costs.
name: cost-analyzer
version: 1.99.0
2 changes: 1 addition & 1 deletion cost-analyzer/charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: 6.0.0
description: The leading tool for querying and visualizing time series and metrics.
engine: gotpl
home: https://grafana.net
icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png
kubeVersion: ^1.8.0-0
Expand Down
2 changes: 1 addition & 1 deletion cost-analyzer/charts/grafana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
type: {{ .Values.deploymentStrategy }}
{{- if ne .Values.deploymentStrategy "RollingUpdate" }}
rollingUpdate: null
{{- end }}
{{- end }}
template:
metadata:
labels:
Expand Down
18 changes: 18 additions & 0 deletions cost-analyzer/charts/grafana/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
{{- $fullName := include "grafana.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $apiV1 := false -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- $apiV1 = true -}}
apiVersion: networking.k8s.io/v1
{{ else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{ else }}
apiVersion: extensions/v1beta1
{{ end -}}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -35,10 +43,20 @@ spec:
- host: {{ . }}
http:
paths:
{{- if $apiV1 }}
- path: {{ $ingressPath }}
pathType: {{ $.Values.ingress.pathType }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $servicePort }}
{{- else }}
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
{{ end }}
2 changes: 2 additions & 0 deletions cost-analyzer/charts/grafana/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if .Values.global.grafana.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.rbac.pspEnabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
Expand Down Expand Up @@ -42,4 +43,5 @@ spec:
rule: 'RunAsAny'
readOnlyRootFilesystem: false
{{- end }}
{{- end }}
{{ end }}
2 changes: 2 additions & 0 deletions cost-analyzer/charts/grafana/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .Values.rbac.pspEnabled }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames: [{{ template "grafana.fullname" . }}]
{{- end }}
{{- end }}
{{ end }}
6 changes: 5 additions & 1 deletion cost-analyzer/charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ image:

securityContext: {}

grafana:
containerSecurityContext: {}

downloadDashboardsImage:
repository: curlimages/curl
tag: latest
Expand Down Expand Up @@ -65,6 +68,7 @@ ingress:
# kubernetes.io/tls-acme: "true"
labels: {}
path: /
pathType: Prefix
hosts:
- chart-example.local
tls: []
Expand Down Expand Up @@ -253,7 +257,7 @@ smtp:
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
image: kiwigrid/k8s-sidecar:1.19.2
image: kiwigrid/k8s-sidecar:1.21.0
imagePullPolicy: IfNotPresent
resources:
# limits:
Expand Down
6 changes: 0 additions & 6 deletions cost-analyzer/charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: v1
appVersion: 2.17.2
description: Prometheus is a monitoring system and time series database.
engine: gotpl
home: https://prometheus.io/
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
maintainers:
Expand All @@ -16,9 +15,4 @@ sources:
- https://github.com/prometheus/pushgateway
- https://github.com/prometheus/node_exporter
- https://github.com/kubernetes/kube-state-metrics
tillerVersion: '>=2.8.0'
version: 11.0.2
dependencies:
- condition: kube-state-metrics.disabled
name: kube-state-metrics
repository: file://./charts/kube-state-metrics
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if not .Values.disabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
Expand Down Expand Up @@ -38,4 +39,5 @@ spec:
max: 65535
readOnlyRootFilesystem: false
{{- end }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if .Values.global.prometheus.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.rbac.create }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: {{ template "prometheus.podSecurityPolicy.apiVersion" . }}
Expand Down Expand Up @@ -47,4 +48,5 @@ spec:
readOnlyRootFilesystem: true
{{- end }}
{{- end }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if .Values.global.prometheus.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if and .Values.nodeExporter.enabled .Values.rbac.create }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: {{ template "prometheus.podSecurityPolicy.apiVersion" . }}
Expand Down Expand Up @@ -54,4 +55,5 @@ spec:
max: 65535
{{- end }}
{{- end }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if .Values.global.prometheus.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.rbac.create }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: {{ template "prometheus.podSecurityPolicy.apiVersion" . }}
Expand Down Expand Up @@ -43,4 +44,5 @@ spec:
readOnlyRootFilesystem: true
{{- end }}
{{- end }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ data:
{{- if eq $key "prometheus.yml" }}
global:
{{ $root.Values.server.global | toYaml | trimSuffix "\n" | indent 6 }}
remote_write:
{{- if $root.Values.global.amp.enabled }}
remote_write:
- url: {{ $root.Values.global.amp.remoteWriteService }}
sigv4:
{{ $root.Values.global.amp.sigv4 | toYaml | indent 8 }}
{{- end }}
{{- if $root.Values.server.remoteWrite }}
remote_write:
{{ $root.Values.server.remoteWrite | toYaml | indent 4 }}
{{- end }}
{{- if $root.Values.server.remoteRead }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ if .Values.global.prometheus.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.rbac.create }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: {{ template "prometheus.podSecurityPolicy.apiVersion" . }}
Expand Down Expand Up @@ -52,4 +53,5 @@ spec:
readOnlyRootFilesystem: false
{{- end }}
{{- end }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ metadata:
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
name: {{ template "prometheus.serviceAccountName.server" . }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{ end }}
5 changes: 4 additions & 1 deletion cost-analyzer/charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,10 @@ server:
## Security context to be added to server pods
##
securityContext:
# runAsUser: 1001
runAsNonRoot: true
# runAsGroup: 1001
# fsGroup: 1001

service:
annotations: {}
Expand Down Expand Up @@ -1252,7 +1255,7 @@ serverFiles:

metric_relabel_configs:
- source_labels: [ __name__ ]
regex: (kubelet_volume_stats_used_bytes) # this metric is in alpha
regex: (kubelet_volume_stats_used_bytes) # this metric is in alpha
action: keep

# Scrape config for service endpoints.
Expand Down
28 changes: 15 additions & 13 deletions cost-analyzer/charts/thanos/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
apiVersion: v1
appVersion: 0.24.0
description: Thanos is a set of components that can be composed into a highly available metric system with unlimited storage capacity, which can be added seamlessly on top of existing Prometheus deployments.
name: thanos
keywords:
- thanos
- prometheus
- metrics
sources:
- https://github.com/thanos-io/thanos
- https://github.com/banzaicloud/banzai-charts/tree/master/thanos
version: 0.24.0
appVersion: 0.29.0
description: Thanos is a set of components that can be composed into a highly available
metric system with unlimited storage capacity, which can be added seamlessly on
top of existing Prometheus deployments.
icon: https://raw.githubusercontent.com/thanos-io/thanos/master/website/static/Thanos-logo_full.svg
keywords:
- thanos
- prometheus
- metrics
maintainers:
- name: Banzai Cloud
email: [email protected]
- email: [email protected]
name: Banzai Cloud
name: thanos
sources:
- https://github.com/thanos-io/thanos
- https://github.com/banzaicloud/banzai-charts/tree/master/thanos
version: 0.29.0
21 changes: 21 additions & 0 deletions cost-analyzer/charts/thanos/templates/bucket-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{{ if .Values.global.thanos.enabled }}
{{ if and .Values.bucket.enabled .Values.bucket.http.ingress.enabled }}
{{- $apiV1 := false -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- $apiV1 = true -}}
apiVersion: networking.k8s.io/v1
{{ else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{ else }}
apiVersion: extensions/v1beta1
{{ end -}}
kind: Ingress
metadata:
name: {{ include "thanos.componentname" (list $ "bucket") }}
Expand All @@ -18,6 +26,9 @@ metadata:
{{ toYaml .Values.bucket.http.ingress.labels | indent 4 }}
{{- end }}
spec:
{{- if .Values.bucket.http.ingress.className }}
ingressClassName: {{ .Values.ingress.bucket.http.className }}
{{- end }}
{{- if .Values.bucket.http.ingress.tls }}
tls:
{{- range .Values.bucket.http.ingress.tls }}
Expand All @@ -33,10 +44,20 @@ spec:
- host: {{ . }}
http:
paths:
{{- if $apiV1 }}
- path: {{ $.Values.bucket.http.ingress.path }}
pathType: {{ $.Values.bucket.http.ingress.pathType }}
backend:
service:
name: {{ include "thanos.componentname" (list $ "bucket") }}
port:
number: {{ $.Values.bucket.http.port }}
{{- else }}
- path: {{ $.Values.bucket.http.ingress.path }}
backend:
serviceName: {{ include "thanos.componentname" (list $ "bucket") }}
servicePort: {{ $.Values.bucket.http.port }}
{{- end }}
{{- end }}
{{ end }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ spec:
- "--retention.resolution-raw={{ .Values.compact.retentionResolutionRaw }}"
- "--retention.resolution-5m={{ .Values.compact.retentionResolution5m }}"
- "--retention.resolution-1h={{ .Values.compact.retentionResolution1h }}"
- "--block-sync-concurrency={{ .Values.compact.blockSyncConcurrency }}"
- "--compact.concurrency={{ .Values.compact.compactConcurrency }}"
{{- if .Values.compact.disableDownsampling }}
- "--downsampling.disable"
Expand Down
Loading

0 comments on commit e946504

Please sign in to comment.