Skip to content

Commit

Permalink
Merge branch 'main' into feat/es-exporter-sec-context-toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
zanhsieh authored Sep 9, 2023
2 parents ca6d06f + 67ccba3 commit 1f0ae0b
Show file tree
Hide file tree
Showing 153 changed files with 4,732 additions and 1,478 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/charts/prometheus-fastly-exporter/ @arslanbekov
/charts/prometheus-json-exporter/ @schmiddim @xiu @zanhsieh
/charts/prometheus-kafka-exporter/ @gkarthiks @golgoth31 @zeritti
/charts/prometheus-modbus-exporter/ @openenergyprojects
/charts/prometheus-mongodb-exporter/ @steven-sheehy @zeritti
/charts/prometheus-mysql-exporter/ @juanchimienti @monotek
/charts/prometheus-nats-exporter/ @caarlos0 @okgolove
Expand Down
2 changes: 1 addition & 1 deletion charts/alertmanager-snmp-notifier/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ home: https://github.com/maxwo/snmp_notifier
sources:
- https://github.com/maxwo/snmp_notifier
type: application
version: 0.1.1
version: 0.1.2
appVersion: v1.4.0
keywords:
- monitoring
Expand Down
2 changes: 2 additions & 0 deletions charts/alertmanager-snmp-notifier/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=values.schema.json

image:
repository: maxwo/snmp-notifier
pullPolicy: IfNotPresent
Expand Down
4 changes: 2 additions & 2 deletions charts/alertmanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 1.1.0
appVersion: v0.25.0
version: 1.6.0
appVersion: v0.26.0
kubeVersion: ">=1.19.0-0"
keywords:
- monitoring
Expand Down
5 changes: 3 additions & 2 deletions charts/alertmanager/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.config }}
{{- if .Values.config.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -12,7 +12,8 @@ metadata:
namespace: {{ include "alertmanager.namespace" . }}
data:
alertmanager.yml: |
{{- toYaml .Values.config | default "{}" | nindent 4 }}
{{- $config := omit .Values.config "enabled" }}
{{- toYaml $config | default "{}" | nindent 4 }}
{{- range $key, $value := .Values.templates }}
{{ $key }}: |-
{{- $value | nindent 4 }}
Expand Down
10 changes: 8 additions & 2 deletions charts/alertmanager/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
{{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- with .Values.service.extraPorts }}
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
{{- include "alertmanager.selectorLabels" . | nindent 4 }}
---
Expand All @@ -53,13 +56,16 @@ spec:
name: http
{{- if or (gt (int .Values.replicaCount) 1) (.Values.additionalPeers) }}
- port: {{ .Values.service.clusterPort }}
targetPort: {{ .Values.service.clusterPort }}
targetPort: clusterpeer-tcp
protocol: TCP
name: cluster-tcp
- port: {{ .Values.service.clusterPort }}
targetPort: {{ .Values.service.clusterPort }}
targetPort: clusterpeer-udp
protocol: UDP
name: cluster-udp
{{- end }}
{{- with .Values.service.extraPorts }}
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
{{- include "alertmanager.selectorLabels" . | nindent 4 }}
33 changes: 31 additions & 2 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
namespace: {{ include "alertmanager.namespace" . }}
spec:
replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "alertmanager.selectorLabels" . | nindent 6 }}
Expand Down Expand Up @@ -97,18 +98,36 @@ spec:
- name: {{ .Chart.Name }}-{{ .Values.configmapReload.name }}
image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}"
{{- with .Values.configmapReload.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
args:
{{- if and (hasKey .Values.configmapReload.extraArgs "config-file" | not) (hasKey .Values.configmapReload.extraArgs "watched-dir" | not) }}
- --watched-dir=/etc/alertmanager
{{- end }}
{{- if not (hasKey .Values.configmapReload.extraArgs "reload-url") }}
- --reload-url=http://127.0.0.1:9093/-/reload
{{- end }}
{{- range $key, $value := .Values.configmapReload.extraArgs }}
- --{{ $key }}={{ $value }}
{{- end }}
resources:
{{- toYaml .Values.configmapReload.resources | nindent 12 }}
{{- with .Values.configmapReload.containerPort }}
ports:
- containerPort: {{ . }}
{{- end }}
{{- with .Values.configmapReload.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/alertmanager
{{- if .Values.configmapReload.extraVolumeMounts }}
{{- toYaml .Values.configmapReload.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- end }}
- name: {{ .Chart.Name }}
securityContext:
Expand All @@ -130,7 +149,9 @@ spec:
{{- end }}
args:
- --storage.path=/alertmanager
{{- if not (hasKey .Values.extraArgs "config.file") }}
- --config.file=/etc/alertmanager/alertmanager.yml
{{- end }}
{{- if or (gt (int .Values.replicaCount) 1) (.Values.additionalPeers) }}
- --cluster.advertise-address=[$(POD_IP)]:{{ $svcClusterPort }}
- --cluster.listen-address=0.0.0.0:{{ $svcClusterPort }}
Expand All @@ -153,14 +174,22 @@ spec:
- name: http
containerPort: 9093
protocol: TCP
{{- if or (gt (int .Values.replicaCount) 1) (.Values.additionalPeers) }}
- name: clusterpeer-tcp
containerPort: {{ $svcClusterPort }}
protocol: TCP
- name: clusterpeer-udp
containerPort: {{ $svcClusterPort }}
protocol: UDP
{{- end }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if .Values.config }}
{{- if .Values.config.enabled }}
- name: config
mountPath: /etc/alertmanager
{{- end }}
Expand All @@ -179,7 +208,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.config }}
{{- if .Values.config.enabled }}
- name: config
configMap:
name: {{ include "alertmanager.fullname" . }}
Expand Down
4 changes: 4 additions & 0 deletions charts/alertmanager/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,10 @@
"description": "Alertmanager configuration.",
"type": "object",
"properties": {
"enabled": {
"description": "Whether to create alermanager configmap or not.",
"type": "boolean"
},
"global": {
"description": "Global configuration options.",
"type": "object"
Expand Down
30 changes: 30 additions & 0 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

replicaCount: 1

# Number of old history to retain to allow rollback
# Default Kubernetes value is set to 10
revisionHistoryLimit: 10

image:
repository: quay.io/prometheus/alertmanager
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -107,6 +111,9 @@ service:
# if you want to force a specific nodePort. Must be use with service.type=NodePort
# nodePort:

# Optionally specify extra list of additional ports exposed on both services
extraPorts: []

ingress:
enabled: false
className: ""
Expand Down Expand Up @@ -201,6 +208,7 @@ configAnnotations: {}
# slack_api_url: '${vault:secret/data/slack-hook-alerts#URL}'

config:
enabled: true
global: {}
# slack_api_url: ''

Expand Down Expand Up @@ -245,6 +253,28 @@ configmapReload:
##
resources: {}

extraArgs: {}

## Optionally specify extra list of additional volumeMounts
extraVolumeMounts: []
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true

## Optionally specify extra environment variables to add to alertmanager container
extraEnv: []
# - name: FOO
# value: BAR

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 65534
# runAsNonRoot: true
# runAsGroup: 65534

templates: {}
# alertmanager.tmpl: |-

Expand Down
2 changes: 1 addition & 1 deletion charts/jiralert/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: jiralert
description: A Helm chart for Kubernetes to install jiralert
type: application
version: 1.5.0
version: 1.6.0
appVersion: "v1.3.0"
home: "https://github.com/prometheus-community/jiralert"
keywords:
Expand Down
6 changes: 6 additions & 0 deletions charts/jiralert/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- if .Values.releaseLabel }}
release: {{ .Release.Name }}
{{- end }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -56,6 +59,9 @@ Selector labels
{{- define "jiralert.selectorLabels" }}
app.kubernetes.io/name: {{ include "jiralert.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
12 changes: 6 additions & 6 deletions charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 48.2.2
appVersion: v0.66.0
kubeVersion: ">=1.16.0-0"
version: 50.3.1
appVersion: v0.67.1
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
keywords:
- operator
Expand All @@ -43,15 +43,15 @@ dependencies:
version: "0.0.0"
condition: crds.enabled
- name: kube-state-metrics
version: "5.10.*"
version: "5.12.*"
repository: https://prometheus-community.github.io/helm-charts
condition: kubeStateMetrics.enabled
- name: prometheus-node-exporter
version: "4.21.*"
version: "4.23.*"
repository: https://prometheus-community.github.io/helm-charts
condition: nodeExporter.enabled
- name: grafana
version: "6.58.*"
version: "6.59.*"
repository: https://grafana.github.io/helm-charts
condition: grafana.enabled
- name: prometheus-windows-exporter
Expand Down
27 changes: 26 additions & 1 deletion charts/kube-prometheus-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _Note: This chart was formerly named `prometheus-operator` chart, now renamed to

## Prerequisites

- Kubernetes 1.16+
- Kubernetes 1.19+
- Helm 3+

## Get Helm Repository Info
Expand Down Expand Up @@ -82,6 +82,31 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

### From 49.x to 50.x

This version requires Kubernetes 1.19+.

We do not expect any breaking changes in this version.

### From 48.x to 49.x

This version upgrades Prometheus-Operator to v0.67.1, 0, Alertmanager to v0.26.0, Prometheus to 2.46.0 and Thanos to v0.32.0

Run these commands to update the CRDs before applying the upgrade.

```console
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
```

### From 47.x to 48.x

This version moved all CRDs into a dedicated sub-chart. No new CRDs are introduced in this version.
Expand Down
Loading

0 comments on commit 1f0ae0b

Please sign in to comment.