Skip to content

Commit cb66531

Browse files
committed
chore(chart-deps): update prometheus-msteams to version 0.7.1
1 parent e634d34 commit cb66531

File tree

7 files changed

+74
-45
lines changed

7 files changed

+74
-45
lines changed

chart/chart-index/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies:
7171
version: 7.10.0
7272
repository: https://prometheus-community.github.io/helm-charts
7373
- name: prometheus-msteams
74-
version: 0.4.4
74+
version: 0.7.1
7575
repository: https://prometheus-msteams.github.io/prometheus-msteams/
7676
- name: promtail
7777
version: 6.16.6

charts/prometheus-msteams/Chart.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
apiVersion: v1
2-
appVersion: v1.3.3
2+
appVersion: v1.4.1
33
description: A Helm chart for Kubernetes
4+
home: https://github.com/prometheus-msteams/prometheus-msteams
5+
maintainers:
6+
- name: bzon
7+
url: https://github.com/bzon
8+
- name: Knappek
9+
url: https://github.com/Knappek
410
name: prometheus-msteams
5-
version: 0.4.4
11+
version: 0.7.1

charts/prometheus-msteams/README.md

+28-22
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<!-- vim-markdown-toc GFM -->
44

5-
* [Download the chart](#download-the-chart)
6-
* [Prepare the Deployment configuration](#prepare-the-deployment-configuration)
7-
* [Deploy to Kubernetes cluster](#deploy-to-kubernetes-cluster)
8-
* [When using with Prometheus Operator](#when-using-with-prometheus-operator)
9-
* [Customise messages to MS Teams](#customise-messages-to-ms-teams)
10-
* [Helm Configuration](#helm-configuration)
5+
- [Download the chart](#download-the-chart)
6+
- [Prepare the Deployment configuration](#prepare-the-deployment-configuration)
7+
- [Deploy to Kubernetes cluster](#deploy-to-kubernetes-cluster)
8+
- [When using with Prometheus Operator](#when-using-with-prometheus-operator)
9+
- [Customise messages to MS Teams](#customise-messages-to-ms-teams)
10+
- [Helm Configuration](#helm-configuration)
1111

1212
<!-- vim-markdown-toc -->
1313

@@ -17,7 +17,7 @@
1717
Clone this repository.
1818

1919
```bash
20-
helm repo add prometheus-msteams https://prometheus-msteams.github.io/helm-chart/
20+
helm repo add prometheus-msteams https://prometheus-msteams.github.io/prometheus-msteams/
2121
```
2222

2323
### Prepare the Deployment configuration
@@ -30,10 +30,13 @@ Create a helm values file to configure your Microsoft Teams channel connectors a
3030
replicaCount: 1
3131
image:
3232
repository: quay.io/prometheusmsteams/prometheus-msteams
33-
tag: v1.3.3
33+
tag: v1.4.1
34+
3435
connectors:
35-
- high_priority_channel: https://outlook.office.com/webhook/xxxx/xxxx
36-
- low_priority_channel: https://outlook.office.com/webhook/xxxx/xxxx
36+
# in alertmanager, this will be used as http://prometheus-msteams:2000/bar
37+
- bar: https://outlook.office.com/webhook/xxxx/xxxx
38+
# in alertmanager, this will be used as http://prometheus-msteams:2000/foo
39+
- foo: https://outlook.office.com/webhook/xxxx/xxxx
3740

3841
# extraEnvs is useful for adding extra environment variables such as proxy settings
3942
extraEnvs:
@@ -60,7 +63,7 @@ See [Helm Configuration](#helm-configuration) and [App Configuration](https://gi
6063
```bash
6164
helm upgrade --install prometheus-msteams \
6265
--namespace default -f config.yaml
63-
charts/prometheus-msteams
66+
prometheus-msteams/prometheus-msteams
6467
```
6568

6669
### When using with Prometheus Operator
@@ -69,16 +72,16 @@ Please see [Prometheus Operator alerting docs](https://github.com/coreos/prometh
6972

7073
### Customise messages to MS Teams
7174

72-
This application uses a [Default Teams Message Card Template](./prometheus-msteams/card.tmpl) to convert incoming Prometheus alerts to teams message cards.
73-
This template can be customised by specifying the value of `customCardTemplate` parameter.
75+
This application uses a [Default Teams Message Card Template](./prometheus-msteams/card.tmpl) to convert incoming Prometheus alerts to teams message cards.
76+
This template can be customised by specifying the value of `customCardTemplate` parameter.
7477
Simply create a new file that you want to use as your custom template (for example, `custom-card.tmpl`).
7578
You can use the `--set-file` flag to set the value from this file:
7679

7780
```bash
78-
helm install --name prometheus-msteams \
79-
./prometheus-msteams --namespace monitoring \
81+
helm upgrade --install prometheus-msteams \
82+
--namespace default -f config.yaml \
8083
--set-file customCardTemplate=custom-card.tmpl \
81-
-f config.yaml
84+
prometheus-msteams/prometheus-msteams
8285
```
8386

8487
Otherwise you can also set the value by specifying the template data directly via values file.
@@ -87,22 +90,25 @@ Otherwise you can also set the value by specifying the template data directly vi
8790
### Helm Configuration
8891

8992
| Parameter | Description | Default |
90-
| --- | --- | --- |
91-
| `image.repository` | Image repository | `quay.io/prometheusmsteams/prometheus-msteams` |
92-
| `image.tag` | Image tag | `v1.3.3` |
93+
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
94+
| `image.repository` | Image repository | `quay.io/prometheusmsteams/prometheus-msteams` |
95+
| `image.tag` | Image tag | `v1.4.1` |
9396
| `image.pullPolicy` | Image pull policy | `Always` |
97+
| `imagePullSecrets` | Configuration for [imagePullSecrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) so that you can use a private registry for your image | `[]` |
9498
| `extraEnvs` | Extra environment variables | `{}` |
95-
| `connectors` | Add your own Microsoft Teams connectors. | `{}` |
96-
| `connectors_with_custom_templates` | Add your own Microsoft Teams connectors with custom template file. | `{}` |
99+
| `connectors` | Add your own Microsoft Teams connectors. | `[]` |
100+
| `connectors_with_custom_templates` | Add your own Microsoft Teams connectors with custom template file. | `[]` |
97101
| `service.port` | Service port | `2000` |
98102
| `service.type` | Service type | `ClusterIP` |
99103
| `container.port` | Container port | `2000` |
100104
| `container.additionalArgs` | additional prometheus-msteams flags to use | `{}` |
101-
| `resources` | Pod resources | See [default](./prometheus-msteams/values.yaml) |
105+
| `resources` | Pod resources | See [default](./values.yaml) |
102106
| `nodeSelector` | Pod nodeSelector | `{}` |
103107
| `affinity` | Pod affinity | `{}` |
104108
| `tolerations` | Pod tolerations | `{}` |
109+
| `priorityClassName` | Pod priority class | `""` |
105110
| `podAnnotations` | Pod annotations | `{}` |
111+
| `podSecurityContext` | Pod securityContext | See [default](./values.yaml) |
106112
| `customCardTemplate` | Custom message card template for MS teams | `""` |
107113
| `metrics.serviceMonitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
108114
| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |

charts/prometheus-msteams/card.tmpl

+10-4
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,29 @@
1010
{{- else -}}808080{{- end -}}",
1111
"summary": "{{- if eq .CommonAnnotations.summary "" -}}
1212
{{- if eq .CommonAnnotations.message "" -}}
13-
{{- .CommonLabels.alertname -}}
13+
{{- if eq .CommonLabels.alertname "" -}}
14+
Prometheus Alert
15+
{{- else -}}
16+
{{- .CommonLabels.alertname -}}
17+
{{- end -}}
1418
{{- else -}}
1519
{{- .CommonAnnotations.message -}}
1620
{{- end -}}
1721
{{- else -}}
1822
{{- .CommonAnnotations.summary -}}
1923
{{- end -}}",
20-
"title": "Prometheus Alert ({{ .Status }})",
24+
"title": "Prometheus Alert ({{ .Status | title }})",
2125
"sections": [ {{$externalUrl := .ExternalURL}}
2226
{{- range $index, $alert := .Alerts }}{{- if $index }},{{- end }}
2327
{
2428
"activityTitle": "[{{ $alert.Annotations.description }}]({{ $externalUrl }})",
2529
"facts": [
2630
{{- range $key, $value := $alert.Annotations }}
2731
{
28-
"name": "{{ $key }}",
29-
"value": "{{ $value }}"
32+
{{- if ne $key "description" -}}
33+
"name": "{{ $key }}",
34+
"value": "{{ $value }}"
35+
{{- end -}}
3036
},
3137
{{- end -}}
3238
{{$c := counter}}{{ range $key, $value := $alert.Labels }}{{if call $c}},{{ end }}

charts/prometheus-msteams/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ Return the appropriate apiVersion for deployment.
3838
{{- if semverCompare ">=1.9-0" .Capabilities.KubeVersion.GitVersion -}}
3939
{{- print "apps/v1" -}}
4040
{{- else -}}
41-
{{- print "apps/v1" -}}
41+
{{- print "apps/v1beta2" -}}
4242
{{- end -}}
4343
{{- end -}}

charts/prometheus-msteams/templates/deployment.yaml

+14-7
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ metadata:
77
chart: {{ template "app.chart" . }}
88
release: {{ .Release.Name }}
99
heritage: {{ .Release.Service }}
10-
{{- if .Values.annotations }}
11-
annotations: {{ toYaml .Values.annotations | nindent 4 }}
12-
{{- end }}
1310
spec:
1411
replicas: {{ .Values.replicaCount }}
1512
selector:
@@ -21,15 +18,17 @@ spec:
2118
labels:
2219
app: {{ template "app.name" . }}
2320
release: {{ .Release.Name }}
24-
{{- if .Values.podAnnotations }}
2521
annotations:
22+
checksum/config: {{ include (print $.Template.BasePath "/configMapConfig.yaml") . | sha256sum }}
23+
checksum/msteams-card-templates: {{ include (print $.Template.BasePath "/configMapTemplate.yaml") . | sha256sum }}
24+
{{- if .Values.podAnnotations }}
2625
{{ toYaml .Values.podAnnotations | indent 8 }}
2726
{{- end }}
2827
spec:
29-
{{- with .Values.imagePullSecrets }}
28+
{{- if .Values.imagePullSecrets }}
3029
imagePullSecrets:
31-
{{- toYaml . | nindent 8 }}
32-
{{- end }}
30+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
31+
{{- end}}
3332
volumes:
3433
- name: config-volume
3534
configMap:
@@ -57,6 +56,7 @@ spec:
5756
{{- with .Values.container.additionalArgs }}
5857
{{ toYaml . | indent 12 }}
5958
{{- end}}
59+
imagePullPolicy: {{ .Values.image.pullPolicy }}
6060
ports:
6161
- name: http
6262
containerPort: {{ .Values.container.port }}
@@ -75,6 +75,10 @@ spec:
7575
periodSeconds: 20
7676
resources:
7777
{{ toYaml .Values.resources | indent 12 }}
78+
{{- with .Values.podSecurityContext }}
79+
securityContext:
80+
{{ toYaml . | indent 8 }}
81+
{{- end }}
7882
{{- with .Values.nodeSelector }}
7983
nodeSelector:
8084
{{ toYaml . | indent 8 }}
@@ -87,3 +91,6 @@ spec:
8791
tolerations:
8892
{{ toYaml . | indent 8 }}
8993
{{- end }}
94+
{{- if .Values.priorityClassName }}
95+
priorityClassName: {{ .Values.priorityClassName }}
96+
{{- end }}

charts/prometheus-msteams/values.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ replicaCount: 1
33

44
image:
55
repository: quay.io/prometheusmsteams/prometheus-msteams
6-
tag: v1.3.3
6+
tag: v1.4.1
77
pullPolicy: Always
88

9+
imagePullSecrets: []
10+
911
extraEnvs:
1012

1113
container:
@@ -30,21 +32,23 @@ tolerations: []
3032

3133
affinity: {}
3234

35+
podSecurityContext:
36+
runAsUser: 1000
37+
runAsNonRoot: true
38+
39+
priorityClassName: ""
40+
3341
metrics:
3442
serviceMonitor:
3543
enabled: false
3644
additionalLabels: {}
3745
scrapeInterval: 30s
3846

39-
connectors: {}
40-
connectors_with_custom_templates: {}
41-
47+
connectors: []
48+
connectors_with_custom_templates: []
4249

4350
## Specify the custom message card template for MS teams
4451
# customCardTemplate: |
4552
# {{ define "teams.card" }}
46-
# {
47-
#
48-
# }
53+
# {...}
4954
# {{ end }}
50-

0 commit comments

Comments
 (0)