-
-
Save narenarjun/8a5e5785e76c4cc47f736598c4dbc742 to your computer and use it in GitHub Desktop.
Deploy a batch monitoring stack with Prometheus PushGateway - yaml files
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: helm.cattle.io/v1 | |
kind: HelmChart | |
metadata: | |
name: grafana | |
namespace: kube-system | |
spec: | |
repo: https://grafana.github.io/helm-charts | |
chart: grafana | |
version: 6.58.6 | |
targetNamespace: default | |
valuesContent: |- | |
datasources: | |
datasources.yaml: | |
apiVersion: 1 | |
datasources: | |
- name: Prometheus | |
type: prometheus | |
url: http://prometheus-operated:9090 | |
access: proxy | |
isDefault: true |
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: v1 | |
kind: ServiceAccount | |
metadata: | |
name: prometheus | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: prometheus | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
- services | |
- endpoints | |
- pods | |
verbs: | |
- get | |
- list | |
- watch | |
- apiGroups: | |
- "" | |
resources: | |
- configmaps | |
verbs: | |
- get | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: prometheus | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: prometheus | |
subjects: | |
- kind: ServiceAccount | |
name: prometheus | |
namespace: default | |
--- | |
apiVersion: monitoring.coreos.com/v1 | |
kind: Prometheus | |
metadata: | |
labels: | |
app: prometheus | |
name: prometheus | |
spec: | |
serviceAccountName: prometheus | |
serviceMonitorSelector: | |
matchLabels: | |
app: prometheus-pushgateway |
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: helm.cattle.io/v1 | |
kind: HelmChart | |
metadata: | |
name: metrics-sink | |
namespace: kube-system | |
spec: | |
repo: https://prometheus-community.github.io/helm-charts | |
chart: prometheus-pushgateway | |
version: 2.4.0 | |
targetNamespace: default | |
valuesContent: |- | |
metrics: | |
enabled: true | |
serviceMonitor: | |
enabled: true | |
namespace: default | |
additionalLabels: | |
app: prometheus-pushgateway |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment