remove prometheus-msteams (#14)

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
This commit is contained in:
Christian Kotzbauer 2020-07-18 12:11:31 +02:00 committed by GitHub
parent 3925581ca6
commit 9032e5acb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 0 additions and 389 deletions

View File

@ -19,4 +19,3 @@ helm repo add ckotzbauer https://ckotzbauer.github.io/helm-charts
- [cadvisor](https://github.com/ckotzbauer/helm-charts/tree/master/charts/cadvisor)
- [nfs-client-provisioner](https://github.com/ckotzbauer/helm-charts/tree/master/charts/nfs-client-provisioner)
- [prometheus-blackbox-exporter](https://github.com/ckotzbauer/helm-charts/tree/master/charts/prometheus-blackbox-exporter)
- [prometheus-msteams](https://github.com/ckotzbauer/helm-charts/tree/master/charts/prometheus-msteams) (deprecated)

View File

@ -1,21 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@ -1,16 +0,0 @@
apiVersion: v1
description: DEPRECATED - Alertmanager Webhook for Microsoft Teams
name: prometheus-msteams
version: 1.0.3
appVersion: 1.3.3
home: https://github.com/bzon/prometheus-msteams
sources:
- https://github.com/bzon/prometheus-msteams
- https://github.com/ckotzbauer/helm-charts
keywords:
- prometheus
- msteams
- webhook
- alertmanager
maintainers: []
deprecated: true

View File

@ -1,83 +0,0 @@
# Prometheus MSTeams
## This chart is deprecated in favour of the [official helm-chart](https://hub.helm.sh/charts/prometheus-msteams/prometheus-msteams).
Alertmanager Webhook for Microsoft Teams
Learn more: [https://github.com/bzon/prometheus-msteams](https://github.com/bzon/prometheus-msteams)
## TL;DR;
```bash
$ helm install ckotzbauer/prometheus-msteams
```
## Introduction
This chart creates a Webhook deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.9+
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm install --name my-release ckotzbauer/prometheus-msteams
```
The command deploys this Webhook on the Kubernetes cluster using the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following table lists the configurable parameters of the Prometheus MSTeams chart and their default values.
| Parameter | Description | Default |
| -------------------------------------- | ------------------------------------------------- | ----------------------------- |
| `replicaCount` | Instance count to deploy | 1 |
| `image.repository` | container image repository | `bzon/prometheus-msteams` |
| `image.tag` | container image tag | `v1.1.5` |
| `image.pullPolicy` | container image pull policy | `IfNotPresent` |
| `extraEnvs` | Optional env variables for webhook deployment | `[]` |
| `nodeSelector` | node labels for pod assignment | `{}` |
| `tolerations` | node tolerations for pod assignment | `[]` |
| `affinity` | node affinity for pod assignment | `{}` |
| `connectors` | MS Teams Connectors (URLs) | `{}` |
| `customCardTemplate` | Customized template for Team cards | `""` |
| `podAnnotations` | annotations to add to each pod | `{}` |
| `additionalArgs` | additional container arguments | `[]` |
| `resources` | pod resource requests & limits | `{}` |
| `service.type` | type of service to create | `ClusterIP` |
| `service.port` | port for the blackbox http service | `9115` |
| `service.externalIPs` | list of external ips | `[]` |
| `service.loadBalancerIP` | optional load balancer ip | `""` |
| `service.loadBalancerSourceRanges` | optional load balancer source ranges | `[]` |
| `service.externalTrafficPolicy` | optional external traffic policy | `""` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
$ helm install --name my-release \
--set key_1=value_1,key_2=value_2 \
ckotzbauer/prometheus-msteams
```
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```bash
# example for staging
$ helm install --name my-release -f values.yaml ckotzbauer/prometheus-msteams
```
> **Tip**: You can use the default [values.yaml](values.yaml)

View File

@ -1,44 +0,0 @@
{{ define "teams.card" }}
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "{{- if eq .Status "resolved" -}}2DC72D
{{- else if eq .Status "firing" -}}
{{- if eq .CommonLabels.severity "critical" -}}8C1A1A
{{- else if eq .CommonLabels.severity "warning" -}}FFA500
{{- else -}}808080{{- end -}}
{{- else -}}808080{{- end -}}",
"summary": "{{- if eq .CommonAnnotations.summary "" -}}
{{- if eq .CommonAnnotations.message "" -}}
{{- .CommonLabels.alertname -}}
{{- else -}}
{{- .CommonAnnotations.message -}}
{{- end -}}
{{- else -}}
{{- .CommonAnnotations.summary -}}
{{- end -}}",
"title": "Prometheus Alert ({{ .Status }})",
"sections": [ {{$externalUrl := .ExternalURL}}
{{- range $index, $alert := .Alerts }}{{- if $index }},{{- end }}
{
"activityTitle": "[{{ $alert.Annotations.description }}]({{ $externalUrl }})",
"facts": [
{{- range $key, $value := $alert.Annotations }}
{
"name": "{{ reReplaceAll "_" "\\\\_" $key }}",
"value": "{{ reReplaceAll "_" "\\\\_" $value }}"
},
{{- end -}}
{{$c := counter}}{{ range $key, $value := $alert.Labels }}{{if call $c}},{{ end }}
{
"name": "{{ reReplaceAll "_" "\\\\_" $key }}",
"value": "{{ reReplaceAll "_" "\\\\_" $value }}"
}
{{- end }}
],
"markdown": true
}
{{- end }}
]
}
{{ end }}

View File

@ -1,6 +0,0 @@
** Please be patient while the chart is being deployed **
To monitor the deployment, execute the following command:
kubectl get pods -l app={{ template "app.name" . }} --namespace {{ .Release.Namespace }} -w

View File

@ -1,43 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "app.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app.name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "app.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "app.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare ">=1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1" -}}
{{- else -}}
{{- print "apps/v1beta2" -}}
{{- end -}}
{{- end -}}

View File

@ -1,11 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "app.name" . }}-config
data:
connectors.yaml: |
{{- with $.Values.connectors }}
connectors:
{{ toYaml . | indent 6 }}
{{- end }}

View File

@ -1,12 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "app.name" . }}-card-template
binaryData:
card.tmpl: |-
{{- if .Values.customCardTemplate }}
{{ .Values.customCardTemplate | b64enc | indent 4 }}
{{- else }}
{{ .Files.Get "card.tmpl" | b64enc | indent 4 }}
{{- end }}

View File

@ -1,73 +0,0 @@
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "app.name" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
volumes:
- name: config-volume
configMap:
name: {{ template "app.name" . }}-config
- name: card-template-volume
configMap:
name: {{ template "app.name" . }}-card-template
securityContext:
runAsUser: 1000
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $value := $.Values.extraEnvs }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
volumeMounts:
- name: config-volume
mountPath: /etc/config
- name: card-template-volume
mountPath: /etc/template
args:
- --config-file=/etc/config/connectors.yaml
- --template-file=/etc/template/card.tmpl
{{- with .Values.container.additionalArgs }}
{{ toYaml . | indent 12 }}
{{- end}}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.container.port }}
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@ -1,36 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "app.name" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
{{- if eq .Values.service.type "LoadBalancer" }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP | quote }}
{{- end }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- range .Values.service.loadBalancerSourceRanges }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
{{- if .Values.service.externalIPs }}
externalIPs:
{{- toYaml .Values.service.externalIPs | nindent 4 }}
{{- end }}
selector:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}

View File

@ -1,43 +0,0 @@
replicaCount: 1
image:
repository: prometheusmsteams/prometheus-msteams
tag: v1.3.3
pullPolicy: IfNotPresent
extraEnvs:
container:
port: 2000
additionalArgs: []
resources:
limits:
cpu: 10m
memory: 32Mi
requests:
cpu: 1m
memory: 8Mi
service:
type: ClusterIP
port: 2000
nodeSelector: {}
tolerations: []
affinity: {}
# Replace this!
connectors:
- alertmanager: https://outlook.office.com/webhook/xxxxx/IncomingWebhook/xxxx/xxxxx
## Specify the custom message card template for MS teams
# customCardTemplate: |
# {{ define "teams.card" }}
# {
#
# }
# {{ end }}