Skip to content

Commit

Permalink
Merge branch 'main' into issue-3340
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Grimes <scott-grimes@users.noreply.github.com>
  • Loading branch information
scott-grimes authored May 8, 2023
2 parents e05e54f + c6445f7 commit 4e57354
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 13 deletions.
4 changes: 2 additions & 2 deletions charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 45.25.1
appVersion: v0.63.0
version: 45.26.1
appVersion: v0.65.1
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
keywords:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ spec:
- --config-reloader-cpu-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }}
- --config-reloader-memory-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }}
- --config-reloader-memory-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }}
{{- if .Values.prometheusOperator.prometheusConfigReloader.enableProbe }}
- --enable-config-reloader-probes=true
{{- end }}
{{- if .Values.prometheusOperator.alertmanagerInstanceNamespaces }}
- --alertmanager-instance-namespaces={{ .Values.prometheusOperator.alertmanagerInstanceNamespaces | join "," }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,9 @@ prometheusOperator:
tag: ""
sha: ""

# add prometheus config reloader liveness and readiness probe. Default: false
enableProbe: false

# resource config for prometheusConfigReloader
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- prometheus
- exporter
type: application
version: 4.17.1
version: 4.17.2
appVersion: 1.5.0
home: https://github.com/prometheus/node_exporter/
sources:
Expand Down
10 changes: 9 additions & 1 deletion charts/prometheus-node-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ spec:
{{- end }}
env:
- name: HOST_IP
{{- if .Values.service.listenOnAllInterfaces }}
{{- if .Values.kubeRBACProxy.enabled }}
value: 127.0.0.1
{{- else if .Values.service.listenOnAllInterfaces }}
value: 0.0.0.0
{{- else }}
valueFrom:
Expand All @@ -84,6 +86,9 @@ spec:
livenessProbe:
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
{{- if .Values.kubeRBACProxy.enabled }}
host: 127.0.0.1
{{- end }}
httpHeaders:
{{- range $_, $header := .Values.livenessProbe.httpGet.httpHeaders }}
- name: {{ $header.name }}
Expand All @@ -99,6 +104,9 @@ spec:
readinessProbe:
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
httpGet:
{{- if .Values.kubeRBACProxy.enabled }}
host: 127.0.0.1
{{- end }}
httpHeaders:
{{- range $_, $header := .Values.readinessProbe.httpGet.httpHeaders }}
- name: {{ $header.name }}
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-stackdriver-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Stackdriver exporter for Prometheus
name: prometheus-stackdriver-exporter
version: 4.2.0
version: 4.3.0
appVersion: 0.13.0
home: https://www.stackdriver.com/
sources:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.prometheusRule.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "stackdriver-exporter.fullname" . }}
{{- with .Values.prometheusRule.namespace }}
namespace: {{ . }}
{{- end }}
labels:
{{- include "stackdriver-exporter.labels" . | indent 4 }}
{{- with .Values.prometheusRule.additionalLabels -}}
{{- toYaml . | nindent 4 -}}
{{- end }}
spec:
{{- with .Values.prometheusRule.rules }}
groups:
- name: {{ template "stackdriver-exporter.name" $ }}
rules: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/prometheus-stackdriver-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,11 @@ serviceMonitor:
metricRelabelings: []
# RelabelConfigs to apply to samples before scraping. https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
relabelings: []

## Custom PrometheusRules to be defined
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
prometheusRule:
enabled: false
additionalLabels: {}
namespace: ""
rules: []
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.43.0
version: 22.2.0
appVersion: v2.43.1
version: 22.4.1
kubeVersion: ">=1.16.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
10 changes: 10 additions & 0 deletions charts/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ helm upgrade [RELEASE_NAME] [CHART] --install

_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

### To 22.4

Support for environment variables in the _prometheus-config-reloader_'s container has been added through `configmapReload.env`. These can be useful together with `configmapReload.reloadUrl` if basic authentication is set at Prometheus.

_prometheus-config-reloader_ has been bumped to release [0.65.1](https://github.com/prometheus-operator/prometheus-operator/releases).

### To 22.3

Prometheus has been bumped to release [v2.43.1](https://github.com/prometheus/prometheus/releases/tag/v2.43.1) which is a bugfix release.

### To 22.0

The `app.kubernetes.io/version` label has been removed from the pod selector.
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
{{- range .Values.configmapReload.prometheus.extraVolumeDirs }}
- --watched-dir={{ . }}
{{- end }}
{{- with .Values.configmapReload.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.configmapReload.prometheus.containerPort }}
ports:
- containerPort: {{ .Values.configmapReload.prometheus.containerPort }}
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: {{ template "prometheus.serviceAccountName.server" $ }}
{{ include "prometheus.namespace" $ | indent 4 }}
namespace: {{ include "prometheus.namespace" $ }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
6 changes: 5 additions & 1 deletion charts/prometheus/templates/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
{{- range .Values.configmapReload.prometheus.extraVolumeDirs }}
- --watched-dir={{ . }}
{{- end }}
{{- with .Values.configmapReload.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.configmapReload.prometheus.containerPort }}
ports:
- containerPort: {{ .Values.configmapReload.prometheus.containerPort }}
Expand Down Expand Up @@ -207,7 +211,7 @@ spec:
volumeMounts:
- name: config-volume
mountPath: /etc/config
- name: {{ ternary .Values.server.persistentVolume.statefulSetNameOverride "storage-volume" (and .Values.server.persistentVolume.enabled .Values.server.persistentVolume.statefulSetNameOverride) }}
- name: {{ ternary .Values.server.persistentVolume.statefulSetNameOverride "storage-volume" (and .Values.server.persistentVolume.enabled (not (empty .Values.server.persistentVolume.statefulSetNameOverride))) }}
mountPath: {{ .Values.server.persistentVolume.mountPath }}
subPath: "{{ .Values.server.persistentVolume.subPath }}"
{{- range .Values.server.extraHostPathMounts }}
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 @@ -41,6 +41,9 @@
"configmapReload": {
"type": "object",
"properties": {
"env": {
"type": "array"
},
"prometheus": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -83,6 +86,9 @@
"type": "object"
}
}
},
"reloadUrl": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -367,6 +373,9 @@
"size": {
"type": "string"
},
"statefulSetNameOverride": {
"type": "string"
},
"subPath": {
"type": "string"
}
Expand Down
25 changes: 21 additions & 4 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ serviceAccounts:
## Ref: https://github.com/prometheus-operator/prometheus-operator/tree/main/cmd/prometheus-config-reloader
##
configmapReload:
## URL for configmap-reload to use for reloads
##
reloadUrl: ""

## env sets environment variables to pass to the container. Can be set as name/value pairs,
## read from secrets or configmaps.
env: []
# - name: SOMEVAR
# value: somevalue
# - name: PASSWORD
# valueFrom:
# secretKeyRef:
# name: mysecret
# key: password
# optional: false

prometheus:
## If false, the configmap-reload container will not be deployed
##
Expand All @@ -32,7 +48,7 @@ configmapReload:
##
image:
repository: quay.io/prometheus-operator/prometheus-config-reloader
tag: v0.63.0
tag: v0.65.1
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
digest: ""
pullPolicy: IfNotPresent
Expand All @@ -42,11 +58,11 @@ configmapReload:
## Additional configmap-reload container arguments
##
extraArgs: {}

## Additional configmap-reload volume directories
##
extraVolumeDirs: []


## Additional configmap-reload mounts
##
extraConfigmapMounts: []
Expand Down Expand Up @@ -361,7 +377,7 @@ server:
## If set it will override the name of the created persistent volume claim
## generated by the stateful set.
##
statefulSetNameOverride:
statefulSetNameOverride: ""

## Prometheus server data Persistent Volume access modes
## Must match those of existing PV or dynamic provisioner
Expand Down Expand Up @@ -1086,7 +1102,8 @@ forceNamespace: ""

# Extra manifests to deploy as an array
extraManifests: []
# - apiVersion: v1
# - |
# apiVersion: v1
# kind: ConfigMap
# metadata:
# labels:
Expand Down

0 comments on commit 4e57354

Please sign in to comment.