Skip to content

Commit

Permalink
Merge branch 'main' into break/addNewSecretConfigFlags
Browse files Browse the repository at this point in the history
Signed-off-by: thameezbo <[email protected]>
  • Loading branch information
thameezb authored Oct 23, 2023
2 parents 053dde4 + 6fb47fb commit 82860c8
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 6 deletions.
14 changes: 14 additions & 0 deletions charts/kube-prometheus-stack/ci/03-non-defaults-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ defaultRules:
additionalRuleGroupLabels:
kubernetesSystem:
key2: value2

alertmanager:
alertmanagerSpec:
additionalConfig:
logFormat: json
additionalConfigString: |-
logLevel: {{ print "debug" | quote }}
prometheus:
prometheusSpec:
additionalConfig:
logFormat: json
additionalConfigString: |-
logLevel: {{ print "debug" | quote }}
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,10 @@ spec:
{{- if .Values.alertmanager.alertmanagerSpec.minReadySeconds }}
minReadySeconds: {{ .Values.alertmanager.alertmanagerSpec.minReadySeconds }}
{{- end }}
{{- with .Values.alertmanager.alertmanagerSpec.additionalConfig }}
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- with .Values.alertmanager.alertmanagerSpec.additionalConfigString }}
{{- tpl . $ | nindent 2 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,10 @@ spec:
tracingConfig:
{{ toYaml .Values.prometheus.prometheusSpec.tracingConfig | indent 4 }}
{{- end }}
{{- with .Values.prometheus.prometheusSpec.additionalConfig }}
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- with .Values.prometheus.prometheusSpec.additionalConfigString }}
{{- tpl . $ | nindent 2 }}
{{- end }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,14 @@ alertmanager:
## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).
minReadySeconds: 0

## Additional configuration which is not covered by the properties above. (passed through tpl)
additionalConfig: {}

## Additional configuration which is not covered by the properties above.
## Useful, if you need advanced templating inside alertmanagerSpec.
## Otherwise, use alertmanager.alertmanagerSpec.additionalConfig (passed through tpl)
additionalConfigString: ""

## ExtraSecret can be used to store various data in an extra secret
## (use it for example to store hashed basic auth credentials)
extraSecret:
Expand Down Expand Up @@ -3567,6 +3575,14 @@ prometheus:
## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheustracingconfig
tracingConfig: {}

## Additional configuration which is not covered by the properties above. (passed through tpl)
additionalConfig: {}

## Additional configuration which is not covered by the properties above.
## Useful, if you need advanced templating inside alertmanagerSpec.
## Otherwise, use prometheus.prometheusSpec.additionalConfig (passed through tpl)
additionalConfigString: ""

additionalRulesForClusterRole: []
# - apiGroups: [ "" ]
# resources:
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-json-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.3
version: 0.8.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
13 changes: 11 additions & 2 deletions charts/prometheus-json-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# prometheus-json-exporter

Prometheus exporter for scraping JSON by JSONPath.

This chart bootstraps a [json_exporter](https://github.com/prometheus-community/json_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Expand All @@ -8,22 +9,25 @@ This chart bootstraps a [json_exporter](https://github.com/prometheus-community/
- Kubernetes 1.10+ with Beta APIs enabled
- Helm 3+

## Get Repo Info
## Get Repository Info

```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add stable https://charts.helm.sh/stable
helm repo update
```

<!-- textlint-disable -->
_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
<!-- textlint-enable -->

## Install Chart

```console
# Helm
$ helm install [RELEASE_NAME] prometheus-community/prometheus-json-exporter
```

_See [configuration](## Configuring) below._

_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
Expand All @@ -46,6 +50,11 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
$ helm upgrade [RELEASE_NAME] [CHART] --install
```

### From 0.7.x to 0.8.0

This version fixes configmap name according to the chart standard so that configmap will be recreated with subsequent deployment rollout.
See [#3926](https://github.com/prometheus-community/helm-charts/pull/3926) for more context.

## Configuring

See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
Expand All @@ -55,4 +64,4 @@ See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_h
$ helm show values prometheus-community/prometheus-json-exporter
```

For more information please refer to the [json_exporter](https://github.com/prometheus-community/json_exporter) documentation.
For more information please refer to the [json_exporter](https://github.com/prometheus-community/json_exporter) documentation.
2 changes: 1 addition & 1 deletion charts/prometheus-json-exporter/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
name: {{ include "prometheus-json-exporter.fullname" . }}
data:
allow-snippet-annotations: "false"
config.yml: |
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-json-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
volumes:
- name: config-configmap-volume
configMap:
name: {{ .Release.Name }}-configmap
name: {{ include "prometheus-json-exporter.fullname" . }}
items:
- key: config.yml
path: config.yml
Expand Down
2 changes: 1 addition & 1 deletion 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.0
version: 25.1.0
version: 25.2.0
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ metadata:
namespace: {{ include "prometheus.namespace" . }}
annotations:
{{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }}
{{- if .Values.serviceAccounts.server.automountServiceAccountToken }}
automountServiceAccountToken: {{ .Values.serviceAccounts.server.automountServiceAccountToken }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/prometheus/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@
},
"name": {
"type": "string"
},
"automountServiceAccountToken": {
"type": "boolean"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ serviceAccounts:
create: true
name: ""
annotations: {}
# automountServiceAccountToken:

## Monitors ConfigMap changes and POSTs to a URL
## Ref: https://github.com/prometheus-operator/prometheus-operator/tree/main/cmd/prometheus-config-reloader
Expand Down

0 comments on commit 82860c8

Please sign in to comment.