mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Generate all manifests
This commit is contained in:
parent
6fc585900c
commit
073b5169ee
@ -15,4 +15,4 @@ spec:
|
|||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
serviceAccountName: alertmanager-main
|
serviceAccountName: alertmanager-main
|
||||||
version: v0.15.3
|
version: v0.16.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
alertmanager.yaml: Z2xvYmFsOgogIHJlc29sdmVfdGltZW91dDogNW0Kcm91dGU6CiAgZ3JvdXBfYnk6IFsnam9iJ10KICBncm91cF93YWl0OiAzMHMKICBncm91cF9pbnRlcnZhbDogNW0KICByZXBlYXRfaW50ZXJ2YWw6IDEyaAogIHJlY2VpdmVyOiAnbnVsbCcKICByb3V0ZXM6CiAgLSBtYXRjaDoKICAgICAgYWxlcnRuYW1lOiBEZWFkTWFuc1N3aXRjaAogICAgcmVjZWl2ZXI6ICdudWxsJwpyZWNlaXZlcnM6Ci0gbmFtZTogJ251bGwnCg==
|
alertmanager.yaml: Imdsb2JhbCI6IAogICJyZXNvbHZlX3RpbWVvdXQiOiAiNW0iCiJyZWNlaXZlcnMiOiAKLSAibmFtZSI6ICJudWxsIgoicm91dGUiOiAKICAiZ3JvdXBfYnkiOiAKICAtICJqb2IiCiAgImdyb3VwX2ludGVydmFsIjogIjVtIgogICJncm91cF93YWl0IjogIjMwcyIKICAicmVjZWl2ZXIiOiAibnVsbCIKICAicmVwZWF0X2ludGVydmFsIjogIjEyaCIKICAicm91dGVzIjogCiAgLSAibWF0Y2giOiAKICAgICAgImFsZXJ0bmFtZSI6ICJEZWFkTWFuc1N3aXRjaCIKICAgICJyZWNlaXZlciI6ICJudWxsIg==
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: alertmanager-main
|
name: alertmanager-main
|
||||||
|
@ -27,7 +27,7 @@ spec:
|
|||||||
- args:
|
- args:
|
||||||
- --secure-listen-address=$(IP):9243
|
- --secure-listen-address=$(IP):9243
|
||||||
- --upstream=http://127.0.0.1:9243/
|
- --upstream=http://127.0.0.1:9243/
|
||||||
image: carlosedp/kube-rbac-proxy:v0.4.0
|
image: carlosedp/kube-rbac-proxy:v0.4.1
|
||||||
name: kube-rbac-proxy
|
name: kube-rbac-proxy
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9243
|
- containerPort: 9243
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
grafana.ini: W2F1dGguYW5vbnltb3VzXQplbmFibGVkID0gZmFsc2UKW2F1dGguYmFzaWNdCmVuYWJsZWQgPSBmYWxzZQpbZGF0YWJhc2VdCnBhdGggPSAvZGF0YS9ncmFmYW5hLmRiCltwYXRoc10KZGF0YSA9IC92YXIvbGliL2dyYWZhbmEKbG9ncyA9IC92YXIvbGliL2dyYWZhbmEvbG9nCnBsdWdpbnMgPSAvdmFyL2xpYi9ncmFmYW5hL3BsdWdpbnMKcHJvdmlzaW9uaW5nID0gL2V0Yy9ncmFmYW5hL3Byb3Zpc2lvbmluZwpbc2Vzc2lvbl0KcHJvdmlkZXIgPSBtZW1vcnkKW3NtdHBdCmVuYWJsZWQgPSB0cnVlCmZyb21fYWRkcmVzcyA9IGNhcmxvc2VkcEBnbWFpbC5jb20KZnJvbV9uYW1lID0gR3JhZmFuYSBBbGVydApob3N0ID0gc210cC1zZXJ2ZXIubW9uaXRvcmluZy5zdmM6MjUKcGFzc3dvcmQgPSAKc2tpcF92ZXJpZnkgPSB0cnVlCnVzZXIgPSAK
|
grafana.ini: W2F1dGguYW5vbnltb3VzXQplbmFibGVkID0gZmFsc2UKW2F1dGguYmFzaWNdCmVuYWJsZWQgPSBmYWxzZQpbc2Vzc2lvbl0KcHJvdmlkZXIgPSBtZW1vcnkKW3NtdHBdCmVuYWJsZWQgPSB0cnVlCmZyb21fYWRkcmVzcyA9IGNhcmxvc2VkcEBnbWFpbC5jb20KZnJvbV9uYW1lID0gR3JhZmFuYSBBbGVydApob3N0ID0gc210cC1zZXJ2ZXIubW9uaXRvcmluZy5zdmM6MjUKcGFzc3dvcmQgPSAKc2tpcF92ZXJpZnkgPSB0cnVlCnVzZXIgPSAK
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-config
|
name: grafana-config
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ spec:
|
|||||||
app: grafana
|
app: grafana
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: carlosedp/monitoring-grafana:v5.4.0
|
- image: grafana/grafana:5.4.3
|
||||||
name: grafana
|
name: grafana
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
@ -57,6 +57,9 @@ spec:
|
|||||||
- mountPath: /grafana-dashboard-definitions/0/k8s-resources-pod
|
- mountPath: /grafana-dashboard-definitions/0/k8s-resources-pod
|
||||||
name: grafana-dashboard-k8s-resources-pod
|
name: grafana-dashboard-k8s-resources-pod
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /grafana-dashboard-definitions/0/kubernetes-cluster-dashboard
|
||||||
|
name: grafana-dashboard-kubernetes-cluster-dashboard
|
||||||
|
readOnly: false
|
||||||
- mountPath: /grafana-dashboard-definitions/0/nodes
|
- mountPath: /grafana-dashboard-definitions/0/nodes
|
||||||
name: grafana-dashboard-nodes
|
name: grafana-dashboard-nodes
|
||||||
readOnly: false
|
readOnly: false
|
||||||
@ -66,9 +69,15 @@ spec:
|
|||||||
- mountPath: /grafana-dashboard-definitions/0/pods
|
- mountPath: /grafana-dashboard-definitions/0/pods
|
||||||
name: grafana-dashboard-pods
|
name: grafana-dashboard-pods
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /grafana-dashboard-definitions/0/prometheus-dashboard
|
||||||
|
name: grafana-dashboard-prometheus-dashboard
|
||||||
|
readOnly: false
|
||||||
- mountPath: /grafana-dashboard-definitions/0/statefulset
|
- mountPath: /grafana-dashboard-definitions/0/statefulset
|
||||||
name: grafana-dashboard-statefulset
|
name: grafana-dashboard-statefulset
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /grafana-dashboard-definitions/0/traefik-dashboard
|
||||||
|
name: grafana-dashboard-traefik-dashboard
|
||||||
|
readOnly: false
|
||||||
- mountPath: /etc/grafana
|
- mountPath: /etc/grafana
|
||||||
name: grafana-config
|
name: grafana-config
|
||||||
readOnly: false
|
readOnly: false
|
||||||
@ -102,6 +111,9 @@ spec:
|
|||||||
- configMap:
|
- configMap:
|
||||||
name: grafana-dashboard-k8s-resources-pod
|
name: grafana-dashboard-k8s-resources-pod
|
||||||
name: grafana-dashboard-k8s-resources-pod
|
name: grafana-dashboard-k8s-resources-pod
|
||||||
|
- configMap:
|
||||||
|
name: grafana-dashboard-kubernetes-cluster-dashboard
|
||||||
|
name: grafana-dashboard-kubernetes-cluster-dashboard
|
||||||
- configMap:
|
- configMap:
|
||||||
name: grafana-dashboard-nodes
|
name: grafana-dashboard-nodes
|
||||||
name: grafana-dashboard-nodes
|
name: grafana-dashboard-nodes
|
||||||
@ -111,9 +123,15 @@ spec:
|
|||||||
- configMap:
|
- configMap:
|
||||||
name: grafana-dashboard-pods
|
name: grafana-dashboard-pods
|
||||||
name: grafana-dashboard-pods
|
name: grafana-dashboard-pods
|
||||||
|
- configMap:
|
||||||
|
name: grafana-dashboard-prometheus-dashboard
|
||||||
|
name: grafana-dashboard-prometheus-dashboard
|
||||||
- configMap:
|
- configMap:
|
||||||
name: grafana-dashboard-statefulset
|
name: grafana-dashboard-statefulset
|
||||||
name: grafana-dashboard-statefulset
|
name: grafana-dashboard-statefulset
|
||||||
|
- configMap:
|
||||||
|
name: grafana-dashboard-traefik-dashboard
|
||||||
|
name: grafana-dashboard-traefik-dashboard
|
||||||
- name: grafana-config
|
- name: grafana-config
|
||||||
secret:
|
secret:
|
||||||
secretName: grafana-config
|
secretName: grafana-config
|
||||||
|
@ -16,6 +16,54 @@ spec:
|
|||||||
app: kube-state-metrics
|
app: kube-state-metrics
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
|
- args:
|
||||||
|
- --logtostderr
|
||||||
|
- --secure-listen-address=:8443
|
||||||
|
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||||
|
- --upstream=http://127.0.0.1:8081/
|
||||||
|
image: carlosedp/kube-rbac-proxy:v0.4.1
|
||||||
|
name: kube-rbac-proxy-main
|
||||||
|
ports:
|
||||||
|
- containerPort: 8443
|
||||||
|
name: https-main
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 20m
|
||||||
|
memory: 40Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- args:
|
||||||
|
- --logtostderr
|
||||||
|
- --secure-listen-address=:9443
|
||||||
|
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||||
|
- --upstream=http://127.0.0.1:8082/
|
||||||
|
image: carlosedp/kube-rbac-proxy:v0.4.1
|
||||||
|
name: kube-rbac-proxy-self
|
||||||
|
ports:
|
||||||
|
- containerPort: 9443
|
||||||
|
name: https-self
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 20m
|
||||||
|
memory: 40Mi
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 20Mi
|
||||||
|
- args:
|
||||||
|
- --host=127.0.0.1
|
||||||
|
- --port=8081
|
||||||
|
- --telemetry-host=127.0.0.1
|
||||||
|
- --telemetry-port=8082
|
||||||
|
image: carlosedp/kube-state-metrics:v1.5.0
|
||||||
|
name: kube-state-metrics
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 150Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 150Mi
|
||||||
- command:
|
- command:
|
||||||
- /pod_nanny
|
- /pod_nanny
|
||||||
- --container=kube-state-metrics
|
- --container=kube-state-metrics
|
||||||
|
16
manifests/metallb-service.yaml
Normal file
16
manifests/metallb-service.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metallb-controller
|
||||||
|
name: metallb-controller
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 7472
|
||||||
|
targetPort: 7472
|
||||||
|
selector:
|
||||||
|
app: metallb
|
||||||
|
component: controller
|
19
manifests/metallb-serviceMonitor.yaml
Normal file
19
manifests/metallb-serviceMonitor.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metallb-controller
|
||||||
|
name: metallb
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- interval: 30s
|
||||||
|
port: http
|
||||||
|
scheme: http
|
||||||
|
jobLabel: k8s-app
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- metallb-system
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: metallb-controller
|
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-controller-manager
|
||||||
|
name: kube-controller-manager-prometheus-discovery
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: http-metrics
|
||||||
|
port: 10252
|
||||||
|
targetPort: 10252
|
||||||
|
selector:
|
||||||
|
component: kube-controller-manager
|
15
manifests/prometheus-kubeDnsPrometheusDiscoveryService.yaml
Normal file
15
manifests/prometheus-kubeDnsPrometheusDiscoveryService.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
name: kube-dns-prometheus-discovery
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: metrics
|
||||||
|
port: 9153
|
||||||
|
targetPort: 9153
|
||||||
|
selector:
|
||||||
|
k8s-app: kube-dns
|
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-scheduler
|
||||||
|
name: kube-scheduler-prometheus-discovery
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: http-metrics
|
||||||
|
port: 10251
|
||||||
|
targetPort: 10251
|
||||||
|
selector:
|
||||||
|
component: kube-scheduler
|
@ -41,5 +41,4 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 20Gi
|
storage: 20Gi
|
||||||
storageClassName: nfs-ssd-node1
|
version: v2.7.0
|
||||||
version: v2.5.0
|
|
||||||
|
@ -52,4 +52,17 @@ items:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: prometheus-k8s
|
name: prometheus-k8s
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: prometheus-k8s
|
||||||
|
namespace: metallb-system
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: prometheus-k8s
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: prometheus-k8s
|
||||||
|
namespace: monitoring
|
||||||
kind: RoleBindingList
|
kind: RoleBindingList
|
||||||
|
@ -64,4 +64,20 @@ items:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: prometheus-k8s
|
||||||
|
namespace: metallb-system
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
- endpoints
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
kind: RoleList
|
kind: RoleList
|
||||||
|
38
manifests/smtp-server-deployment.yaml
Normal file
38
manifests/smtp-server-deployment.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: apps/v1beta2
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
run: smtp-server
|
||||||
|
name: smtp-server
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
run: smtp-server
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
run: smtp-server
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: GMAIL_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: smtp-account
|
||||||
|
- name: GMAIL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: smtp-account
|
||||||
|
- name: DISABLE_IPV6
|
||||||
|
value: "True"
|
||||||
|
- name: RELAY_DOMAINS
|
||||||
|
value: :192.168.0.0/24:10.0.0.0/16
|
||||||
|
image: carlosedp/docker-smtp:latest
|
||||||
|
name: smtp-server
|
||||||
|
ports:
|
||||||
|
- containerPort: 25
|
||||||
|
name: smtp
|
14
manifests/smtp-server-service.yaml
Normal file
14
manifests/smtp-server-service.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
run: smtp-server
|
||||||
|
name: smtp-server
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: smtp
|
||||||
|
port: 25
|
||||||
|
targetPort: smtp
|
||||||
|
selector:
|
||||||
|
run: smtp-server
|
@ -9,7 +9,7 @@ spec:
|
|||||||
endpoints:
|
endpoints:
|
||||||
- interval: 30s
|
- interval: 30s
|
||||||
port: admin
|
port: admin
|
||||||
scheme: https
|
scheme: http
|
||||||
jobLabel: k8s-app
|
jobLabel: k8s-app
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
|
Loading…
Reference in New Issue
Block a user