Last active
October 14, 2016 18:55
-
-
Save brancz/f3d564eaa23ab4de696c9b3357385e5c to your computer and use it in GitHub Desktop.
PetSet + (example) ConfigMap + Governing Service + Client Service for HA Alertmanager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: alertmanager-cluster | |
name: alertmanager-cluster-client | |
spec: | |
ports: | |
- name: alertmanager-web | |
nodePort: 30900 | |
port: 9093 | |
protocol: TCP | |
targetPort: 9093 | |
selector: | |
app: alertmanager-cluster | |
sessionAffinity: None | |
type: NodePort |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: alertmanager | |
data: | |
alertmanager.yaml: |- | |
global: | |
resolve_timeout: 5m | |
route: | |
group_by: ['alertname'] | |
group_wait: 10s | |
group_interval: 10s | |
repeat_interval: 1h | |
receiver: 'webhook' | |
receivers: | |
- name: 'webhook' | |
webhook_configs: | |
- url: 'http://alertmanagerwh:30500/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: alertmanager-cluster | |
name: alertmanager-cluster | |
spec: | |
clusterIP: None | |
ports: | |
- name: mesh | |
port: 6783 | |
protocol: TCP | |
targetPort: 6783 | |
selector: | |
app: alertmanager-cluster | |
sessionAffinity: None | |
type: ClusterIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1alpha1 | |
kind: PetSet | |
metadata: | |
labels: | |
app: alertmanager-cluster | |
name: alertmanager-cluster | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: alertmanager-cluster | |
serviceName: alertmanager-cluster | |
template: | |
metadata: | |
annotations: | |
pod.alpha.kubernetes.io/initialized: "true" | |
creationTimestamp: null | |
labels: | |
app: alertmanager-cluster | |
spec: | |
containers: | |
- command: | |
- /bin/alertmanager | |
- -config.file=/etc/prometheus/alertmanager.yaml | |
- -web.listen-address=:9093 | |
- -mesh.listen-address=:6783 | |
- -storage.path=/tmp/alertmanager-data | |
- -mesh.peer=alertmanager-cluster-0.alertmanager-cluster.default.svc | |
- -mesh.peer=alertmanager-cluster-1.alertmanager-cluster.default.svc | |
- -mesh.peer=alertmanager-cluster-2.alertmanager-cluster.default.svc | |
image: quay.io/prometheus/alertmanager:v0.5.0-alpha.0 | |
imagePullPolicy: IfNotPresent | |
name: alertmanager-cluster | |
ports: | |
- containerPort: 9093 | |
name: web | |
protocol: TCP | |
- containerPort: 6783 | |
name: mesh | |
protocol: TCP | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
volumeMounts: | |
- mountPath: /etc/prometheus | |
name: config-volume | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
securityContext: {} | |
terminationGracePeriodSeconds: 0 | |
volumes: | |
- configMap: | |
defaultMode: 420 | |
name: alertmanager | |
name: config-volume |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment