diff --git a/charts/prometheus-pushgateway/Chart.yaml b/charts/prometheus-pushgateway/Chart.yaml index 764803de2d01..3cd53338e9bc 100644 --- a/charts/prometheus-pushgateway/Chart.yaml +++ b/charts/prometheus-pushgateway/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.10.0" description: A Helm chart for prometheus pushgateway name: prometheus-pushgateway -version: 2.15.0 +version: 2.16.0 home: https://github.com/prometheus/pushgateway sources: - https://github.com/prometheus/pushgateway diff --git a/charts/prometheus-pushgateway/ci/automount-sa-token-values.yaml b/charts/prometheus-pushgateway/ci/automount-sa-token-values.yaml new file mode 100644 index 000000000000..01edc785b340 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/automount-sa-token-values.yaml @@ -0,0 +1,2 @@ +--- +automountServiceAccountToken: false diff --git a/charts/prometheus-pushgateway/ci/default-sts-values.yaml b/charts/prometheus-pushgateway/ci/default-sts-values.yaml new file mode 100644 index 000000000000..d2163dce94f6 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/default-sts-values.yaml @@ -0,0 +1,2 @@ +# default sts values +runAsStatefulSet: true diff --git a/charts/prometheus-pushgateway/ci/default-values.yaml b/charts/prometheus-pushgateway/ci/default-values.yaml new file mode 100644 index 000000000000..d6c93d3e865b --- /dev/null +++ b/charts/prometheus-pushgateway/ci/default-values.yaml @@ -0,0 +1 @@ +# default values diff --git a/charts/prometheus-pushgateway/ci/extraargs-values.yaml b/charts/prometheus-pushgateway/ci/extraargs-values.yaml new file mode 100644 index 000000000000..9af57d52936f --- /dev/null +++ b/charts/prometheus-pushgateway/ci/extraargs-values.yaml @@ -0,0 +1,3 @@ +--- +extraArgs: + - "--log.level=debug" diff --git a/charts/prometheus-pushgateway/ci/extramanifests-values.yaml b/charts/prometheus-pushgateway/ci/extramanifests-values.yaml new file mode 100644 index 000000000000..a58767018faa --- /dev/null +++ b/charts/prometheus-pushgateway/ci/extramanifests-values.yaml @@ -0,0 +1,19 @@ +--- +extraManifests: + - apiVersion: v1 + kind: ConfigMap + metadata: + labels: + foo: bar + name: pushgateway-extra-cm-first + data: + FOO: "bar" + - apiVersion: v1 + kind: ConfigMap + metadata: + labels: + baz: qux + name: pushgateway-extra-cm-second + data: + pushgateway.txt: '{{ include "prometheus-pushgateway.fullname" . }}' + immutable: true diff --git a/charts/prometheus-pushgateway/ci/extravars-values.yaml b/charts/prometheus-pushgateway/ci/extravars-values.yaml new file mode 100644 index 000000000000..e19433e1409f --- /dev/null +++ b/charts/prometheus-pushgateway/ci/extravars-values.yaml @@ -0,0 +1,4 @@ +--- +extraVars: + - name: FOO + value: bar diff --git a/charts/prometheus-pushgateway/ci/lifecycle-values.yaml b/charts/prometheus-pushgateway/ci/lifecycle-values.yaml new file mode 100644 index 000000000000..84ba2de2bda8 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/lifecycle-values.yaml @@ -0,0 +1,5 @@ +--- +lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "sleep 10"] diff --git a/charts/prometheus-pushgateway/ci/persistence-sts-values.yaml b/charts/prometheus-pushgateway/ci/persistence-sts-values.yaml new file mode 100644 index 000000000000..5958cbeae566 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/persistence-sts-values.yaml @@ -0,0 +1,9 @@ +--- +runAsStatefulSet: true +persistentVolume: + enabled: true + size: 1Gi + +persistentVolumeLabels: + foo: bar + baz: qux diff --git a/charts/prometheus-pushgateway/ci/persistence-values.yaml b/charts/prometheus-pushgateway/ci/persistence-values.yaml new file mode 100644 index 000000000000..324d3e17b0af --- /dev/null +++ b/charts/prometheus-pushgateway/ci/persistence-values.yaml @@ -0,0 +1,8 @@ +--- +persistentVolume: + enabled: true + size: 1Gi + +persistentVolumeLabels: + foo: bar + baz: qux diff --git a/charts/prometheus-pushgateway/ci/podlabels-sts-values.yaml b/charts/prometheus-pushgateway/ci/podlabels-sts-values.yaml new file mode 100644 index 000000000000..be64c65d3527 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/podlabels-sts-values.yaml @@ -0,0 +1,5 @@ +--- +runAsStatefulSet: true +podLabels: + foo: bar + baz: qux diff --git a/charts/prometheus-pushgateway/ci/podlabels-values.yaml b/charts/prometheus-pushgateway/ci/podlabels-values.yaml new file mode 100644 index 000000000000..3d672e4b7bd9 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/podlabels-values.yaml @@ -0,0 +1,4 @@ +--- +podLabels: + foo: bar + baz: qux diff --git a/charts/prometheus-pushgateway/ci/resources-values.yaml b/charts/prometheus-pushgateway/ci/resources-values.yaml new file mode 100644 index 000000000000..f4d1629ac835 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/resources-values.yaml @@ -0,0 +1,8 @@ +--- +resources: + requests: + cpu: 50m + memory: 32Mi + limits: + cpu: 100m + memory: 32Mi diff --git a/charts/prometheus-pushgateway/ci/securitycontext-values.yaml b/charts/prometheus-pushgateway/ci/securitycontext-values.yaml new file mode 100644 index 000000000000..c8f28e21b692 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/securitycontext-values.yaml @@ -0,0 +1,9 @@ +--- +containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + seccompProfile: + type: RuntimeDefault diff --git a/charts/prometheus-pushgateway/ci/servicelabels-values.yaml b/charts/prometheus-pushgateway/ci/servicelabels-values.yaml new file mode 100644 index 000000000000..1802ef8cfcb9 --- /dev/null +++ b/charts/prometheus-pushgateway/ci/servicelabels-values.yaml @@ -0,0 +1,4 @@ +--- +serviceLabels: + foo: bar + baz: qux diff --git a/charts/prometheus-pushgateway/ci/servicemonitor-values.yaml b/charts/prometheus-pushgateway/ci/servicemonitor-values.yaml new file mode 100644 index 000000000000..3c0ba916eeef --- /dev/null +++ b/charts/prometheus-pushgateway/ci/servicemonitor-values.yaml @@ -0,0 +1,7 @@ +--- +serviceMonitor: + enabled: true + namespace: null + interval: 15s + additionalLabels: + release: prometheus diff --git a/charts/prometheus-pushgateway/templates/_helpers.tpl b/charts/prometheus-pushgateway/templates/_helpers.tpl index dcd42ff36bee..2d1f84056a96 100644 --- a/charts/prometheus-pushgateway/templates/_helpers.tpl +++ b/charts/prometheus-pushgateway/templates/_helpers.tpl @@ -224,6 +224,9 @@ containers: securityContext: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.lifecycle }} + lifecycle: {{ toYaml . | nindent 6 }} + {{- end }} volumeMounts: - name: storage-volume mountPath: "{{ .Values.persistentVolume.mountPath }}" diff --git a/charts/prometheus-pushgateway/values.yaml b/charts/prometheus-pushgateway/values.yaml index 85f267fdb864..4bc5e146281c 100644 --- a/charts/prometheus-pushgateway/values.yaml +++ b/charts/prometheus-pushgateway/values.yaml @@ -369,3 +369,9 @@ networkPolicy: {} # Array of extra K8s objects to deploy (evaluated as a template) # The value can hold an array of strings as well as objects extraManifests: [] + +# Lifecycle hooks configuration +lifecycle: {} +# preStop: +# exec: +# command: ["/bin/sh", "-c", "sleep 30"]