Skip to content

Commit

Permalink
Merge branch 'main' into grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson committed Nov 12, 2023
2 parents 9fececf + 26ff0a7 commit 23ded19
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 20 deletions.
8 changes: 4 additions & 4 deletions charts/prometheus/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ dependencies:
version: 1.7.0
- name: kube-state-metrics
repository: https://prometheus-community.github.io/helm-charts
version: 5.14.0
version: 5.15.2
- name: prometheus-node-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 4.23.2
- name: prometheus-pushgateway
repository: https://prometheus-community.github.io/helm-charts
version: 2.4.1
digest: sha256:b34c16be0857b51ad2e961b2a232a869873f43fc6a15f937c9f3d9083be72f8e
generated: "2023-10-28T21:25:54.084688+03:00"
version: 2.4.2
digest: sha256:51d21628967a95217345e39b2d8f5bb6466a6ed1d86e251720331a144c5e5e43
generated: "2023-11-11T23:40:32.006194+02:00"
4 changes: 2 additions & 2 deletions charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus
appVersion: v2.47.2
version: 25.4.0
version: 25.6.0
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down Expand Up @@ -30,7 +30,7 @@ dependencies:
repository: https://prometheus-community.github.io/helm-charts
condition: alertmanager.enabled
- name: kube-state-metrics
version: "5.14.*"
version: "5.15.*"
repository: https://prometheus-community.github.io/helm-charts
condition: kube-state-metrics.enabled
- name: prometheus-node-exporter
Expand Down
10 changes: 4 additions & 6 deletions charts/prometheus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ Return the appropriate apiVersion for deployment.
{{- define "prometheus.deployment.apiVersion" -}}
{{- print "apps/v1" -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for daemonset.
*/}}
{{- define "prometheus.daemonset.apiVersion" -}}
{{- print "apps/v1" -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for networkpolicy.
*/}}
Expand All @@ -133,6 +128,7 @@ Return the appropriate apiVersion for poddisruptionbudget.
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for rbac.
*/}}
Expand All @@ -143,6 +139,7 @@ Return the appropriate apiVersion for rbac.
{{- print "rbac.authorization.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for ingress.
*/}}
Expand All @@ -169,6 +166,7 @@ Return if ingress supports ingressClassName.
{{- define "ingress.supportsIngressClassName" -}}
{{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18.x" (include "prometheus.kubeVersion" .))) -}}
{{- end -}}

{{/*
Return if ingress supports pathType.
*/}}
Expand Down
11 changes: 9 additions & 2 deletions charts/prometheus/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ spec:
ports:
- containerPort: {{ .Values.configmapReload.prometheus.containerPort }}
{{- end }}
{{- with .Values.configmapReload.prometheus.resources }}
resources:
{{ toYaml .Values.configmapReload.prometheus.resources | indent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
Expand Down Expand Up @@ -123,6 +125,9 @@ spec:
{{- else }}
{{- if .Values.server.retention }}
- --storage.tsdb.retention.time={{ .Values.server.retention }}
{{- end }}
{{- if .Values.server.retentionSize }}
- --storage.tsdb.retention.size={{ .Values.server.retentionSize }}
{{- end }}
- --config.file={{ .Values.server.configPath }}
{{- if .Values.server.storagePath }}
Expand Down Expand Up @@ -213,8 +218,10 @@ spec:
periodSeconds: {{ .Values.server.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.server.startupProbe.timeoutSeconds }}
{{- end }}
{{- with .Values.server.resources }}
resources:
{{ toYaml .Values.server.resources | indent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
{{- end }}
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
{{- with .Values.server.persistentVolume.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "prometheus.server.fullname" . }}
namespace: {{ include "prometheus.namespace" . }}
spec:
Expand Down
11 changes: 9 additions & 2 deletions charts/prometheus/templates/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ spec:
ports:
- containerPort: {{ .Values.configmapReload.prometheus.containerPort }}
{{- end }}
{{- with .Values.configmapReload.prometheus.resources }}
resources:
{{ toYaml .Values.configmapReload.prometheus.resources | indent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
Expand Down Expand Up @@ -128,6 +130,9 @@ spec:
{{- end }}
{{- if .Values.server.retention }}
- --storage.tsdb.retention.time={{ .Values.server.retention }}
{{- end }}
{{- if .Values.server.retentionSize }}
- --storage.tsdb.retention.size={{ .Values.server.retentionSize }}
{{- end }}
- --config.file={{ .Values.server.configPath }}
{{- if .Values.server.storagePath }}
Expand Down Expand Up @@ -215,8 +220,10 @@ spec:
periodSeconds: {{ .Values.server.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.server.startupProbe.timeoutSeconds }}
{{- end }}
{{- with .Values.server.resources }}
resources:
{{ toYaml .Values.server.resources | indent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
Expand Down
9 changes: 9 additions & 0 deletions charts/prometheus/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@
}
}
},
"portName": {
"type": "string"
},
"prefixURL": {
"type": "string"
},
Expand Down Expand Up @@ -463,6 +466,9 @@
"retention": {
"type": "string"
},
"retentionSize": {
"type": "string"
},
"revisionHistoryLimit": {
"type": "integer"
},
Expand All @@ -486,6 +492,9 @@
"service": {
"type": "object",
"properties": {
"additionalPorts": {
"type": "array"
},
"annotations": {
"type": "object"
},
Expand Down
21 changes: 17 additions & 4 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# yaml-language-server: $schema=values.schema.json
# Default values for prometheus.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

rbac:
create: true

Expand All @@ -16,6 +21,9 @@ serviceAccounts:
annotations: {}
# automountServiceAccountToken:

## Additional labels to attach to all resources
commonMetaLabels: {}

## Monitors ConfigMap changes and POSTs to a URL
## Ref: https://github.com/prometheus-operator/prometheus-operator/tree/main/cmd/prometheus-config-reloader
##
Expand Down Expand Up @@ -198,6 +206,7 @@ server:
# List of flags to override default parameters, e.g:
# - --enable-feature=agent
# - --storage.agent.retention.max-time=30m
# - --config.file=/etc/config/prometheus.yml
defaultFlagsOverride: []

extraFlags:
Expand Down Expand Up @@ -364,7 +373,7 @@ server:
# - "example.com"

## Node tolerations for server scheduling to nodes with taints
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
##
tolerations: []
# - key: "key"
Expand All @@ -373,7 +382,7 @@ server:
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"

## Node labels for Prometheus server pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
##
nodeSelector: {}

Expand Down Expand Up @@ -679,6 +688,10 @@ server:
##
retention: "15d"

## Prometheus' data retention size. Supported units: B, KB, MB, GB, TB, PB, EB.
##
retentionSize: ""

## Prometheus server ConfigMap entries for rule files (allow prometheus labels interpolation)
ruleFiles: {}

Expand Down Expand Up @@ -1206,7 +1219,7 @@ kube-state-metrics:
##
enabled: true

## promtheus-node-exporter sub-chart configurable values
## prometheus-node-exporter sub-chart configurable values
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-node-exporter
##
prometheus-node-exporter:
Expand All @@ -1220,7 +1233,7 @@ prometheus-node-exporter:
containerSecurityContext:
allowPrivilegeEscalation: false

## pprometheus-pushgateway sub-chart configurable values
## prometheus-pushgateway sub-chart configurable values
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-pushgateway
##
prometheus-pushgateway:
Expand Down

0 comments on commit 23ded19

Please sign in to comment.