Last active
September 13, 2019 16:04
-
-
Save rmb938/da28568b640aeb347e1d9a62852d69b5 to your computer and use it in GitHub Desktop.
Prom Operator Deployment
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: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: prometheus-operator | |
| rules: | |
| - apiGroups: | |
| - apiextensions.k8s.io | |
| resources: | |
| - customresourcedefinitions | |
| verbs: | |
| - '*' | |
| - apiGroups: | |
| - monitoring.coreos.com | |
| resources: | |
| - alertmanagers | |
| - prometheuses | |
| - prometheuses/finalizers | |
| - alertmanagers/finalizers | |
| - servicemonitors | |
| - podmonitors | |
| - prometheusrules | |
| verbs: | |
| - '*' | |
| - apiGroups: | |
| - apps | |
| resources: | |
| - statefulsets | |
| verbs: | |
| - '*' | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - configmaps | |
| - secrets | |
| verbs: | |
| - '*' | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - pods | |
| verbs: | |
| - list | |
| - delete | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - services | |
| - endpoints | |
| verbs: | |
| - get | |
| - create | |
| - update | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - nodes | |
| verbs: | |
| - list | |
| - watch | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - namespaces | |
| verbs: | |
| - get | |
| - list | |
| - watch |
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: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: prometheus-operator | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: ClusterRole | |
| name: prometheus-operator | |
| subjects: | |
| - kind: ServiceAccount | |
| name: prometheus-operator | |
| namespace: prometheus |
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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: prometheus-operator | |
| name: prometheus-operator | |
| namespace: prometheus | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: prometheus-operator | |
| template: | |
| metadata: | |
| labels: | |
| app: prometheus-operator | |
| spec: | |
| containers: | |
| - args: | |
| - -kubelet-service=prometheus/kubelet | |
| image: quay.io/coreos/prometheus-operator:v0.31.1 | |
| imagePullPolicy: IfNotPresent | |
| name: prometheus-operator | |
| ports: | |
| - containerPort: 8080 | |
| name: http | |
| protocol: TCP | |
| resources: | |
| limits: | |
| cpu: 200m | |
| memory: 200Mi | |
| requests: | |
| cpu: 100m | |
| memory: 100Mi | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| readOnlyRootFilesystem: true | |
| securityContext: | |
| runAsNonRoot: true | |
| runAsUser: 65534 | |
| serviceAccountName: prometheus-operator |
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: ServiceAccount | |
| metadata: | |
| name: prometheus-operator | |
| namespace: prometheus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment