diff --git a/execution/infrastructure/prometheus/cluster-role-binding.yaml b/execution/infrastructure/prometheus/cluster-role-binding.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5369e02aac84440053b3be5485f0644419d981d1 --- /dev/null +++ b/execution/infrastructure/prometheus/cluster-role-binding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: prometheus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus +subjects: +- kind: ServiceAccount + name: prometheus + namespace: titan-scalability \ No newline at end of file diff --git a/execution/infrastructure/prometheus/cluster-role.yaml b/execution/infrastructure/prometheus/cluster-role.yaml new file mode 100644 index 0000000000000000000000000000000000000000..299ebd0a3be0b53adcadc514b2ef6d1d15efc98d --- /dev/null +++ b/execution/infrastructure/prometheus/cluster-role.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: prometheus +rules: +- apiGroups: [""] + resources: + - nodes + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: [""] + resources: + - configmaps + verbs: ["get"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] \ No newline at end of file diff --git a/execution/infrastructure/prometheus/prometheus.yaml b/execution/infrastructure/prometheus/prometheus.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2cec39877386cc06408783c372521025883310da --- /dev/null +++ b/execution/infrastructure/prometheus/prometheus.yaml @@ -0,0 +1,15 @@ +apiVersion: monitoring.coreos.com/v1 +kind: Prometheus +metadata: + name: prometheus +spec: + serviceAccountName: prometheus + serviceMonitorSelector: + matchLabels: + #app: cp-kafka + appScope: titan-ccp + resources: + requests: + memory: 400Mi + #scrapeInterval: 1s + enableAdminAPI: true \ No newline at end of file diff --git a/execution/infrastructure/prometheus/service-account.yaml b/execution/infrastructure/prometheus/service-account.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f671fc5ab75c995b4c172089b57a9c72860d5cb0 --- /dev/null +++ b/execution/infrastructure/prometheus/service-account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus \ No newline at end of file