Created
February 8, 2019 14:47
-
-
Save aditya-konarde/2a50c9e0eec49203bd7920a099b5ab30 to your computer and use it in GitHub Desktop.
This file contains 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: monitoring.coreos.com/v1 | |
kind: Prometheus | |
metadata: | |
name: app-sre | |
# ToDo eliminate the namespace field, doesn't work well with saasherder. | |
namespace: app-sre-prometheus | |
spec: | |
# Additional scrape config, for external services | |
# Requires a secret with referenced name to be present | |
additionalScrapeConfigs: | |
name: prometheus-app-sre-additional-scrapeconfig | |
key: prometheus-app-sre-additional.yaml | |
# List of alertmanagers to fire the alerts to | |
alerting: | |
alertmanagers: | |
- name: alertmanager-operated | |
namespace: app-sre-prometheus | |
port: web | |
scheme: http | |
baseImage: quay.io/prometheus/prometheus | |
externalLabels: | |
cluster: app-sre | |
# # ToDo get a sane URL | |
# externalUrl: http://prometheus-app-sre-app-sre-prometheus.1061.app-sre.openshiftapps.com | |
replicas: 3 | |
retention: 15d | |
securityContext: {} | |
# The Serviceaccount to use for prometheus stuff | |
# This SA must have view access on the project you want | |
# prometheus to monitor | |
serviceAccountName: prometheus-k8s | |
# Once you've added the project name above, make sure your | |
# ServiceMonitors are labelled with the one specified below | |
serviceMonitorSelector: | |
matchLabels: | |
prometheus: app-sre | |
# Similar selector to select prometheus alert rules. | |
ruleSelector: | |
matchLabels: | |
prometheus: app-sre | |
# Add persistent storage to the prometheus pods. | |
# Since its a statefulset, n*replicas PV's will be created | |
storage: | |
volumeClaimTemplate: | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 50Gi | |
storageClassName: gp2-encrypted | |
# Addons-ToDo | |
# # Do not schedule the pods on the same nodes | |
# # This works better for upgrades | |
# affinity: | |
# podAntiAffinity: | |
# preferredDuringSchedulingIgnoredDuringExecution: | |
# - podAffinityTerm: | |
# labelSelector: | |
# matchNames: | |
# - key: prometheus | |
# operator: In | |
# values: | |
# - app-sre | |
# # ToDo template the namespace below, to work across other environments | |
# namespaces: | |
# - app-sre-prometheus | |
# topologyKey: kubernetes.io/hostname | |
# weight: 100 | |
# # Namespaces to find servicemonitors in. | |
# # If you have a new project, add the project name here. | |
# serviceMonitorNamespaceSelector: | |
# matchNames: | |
# - app-sre-prometheus | |
# - telemeter-production | |
# - vault-stage | |
# - app-sre-exporters | |
# # Namespaces in which to find PrometheusRule objects | |
# # In most cases you want this to have the same values as serviceMonitorNamespaceSelector | |
# ruleNamespaceSelector: | |
# matchNames: | |
# - app-sre-prometheus | |
# - telemeter-production | |
# - vault-stage | |
# - app-sre-exporters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment