From ed0968bcd8b8e793f174a1bf4306df0f7514447c Mon Sep 17 00:00:00 2001 From: Domagoj Zecevic Date: Fri, 3 Dec 2021 11:47:15 +0100 Subject: [PATCH] added check_mk --- 01_onsite/00_infra/checkmk/check_mk_rbac.yaml | 1789 +++++++++++++++++ 01_onsite/00_infra/checkmk/deployment.yaml | 91 + 2 files changed, 1880 insertions(+) create mode 100644 01_onsite/00_infra/checkmk/check_mk_rbac.yaml create mode 100644 01_onsite/00_infra/checkmk/deployment.yaml diff --git a/01_onsite/00_infra/checkmk/check_mk_rbac.yaml b/01_onsite/00_infra/checkmk/check_mk_rbac.yaml new file mode 100644 index 0000000..0f62414 --- /dev/null +++ b/01_onsite/00_infra/checkmk/check_mk_rbac.yaml @@ -0,0 +1,1789 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + checkmk/check_mk_rbac.yaml at master · tribe29/checkmk · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content + + + + + + + + + + +
+ +
+ + + + + + +
+ + + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+ + + + + Permalink + + +
+ +
+
+ + + master + + + + +
+
+
+ Switch branches/tags + +
+ + + +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+ +
+ + + + Go to file + + +
+ + + + + + + + + +
+
+
+ + + + +
+ +
+
+
 
+
+ +
+
 
+ Cannot retrieve contributors at this time +
+
+ + + + + + + +
+ +
+ + +
+ + 77 lines (77 sloc) + + 1.23 KB +
+ + + +
+ +
+
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
---
apiVersion: v1
kind: Namespace
metadata:
name: check-mk
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: check-mk
namespace: check-mk
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: check-mk
rules:
- apiGroups:
- ""
- storage.k8s.io
- rbac.authorization.k8s.io
- apps
- extensions
- batch
- autoscaling
- networking.k8s.io/v1beta1
resources:
- componentstatuses
- nodes
- nodes/proxy
- services
- pods
- configmaps
- secrets
- resourcequotas
- replicationcontrollers
- limitranges
- persistentvolumeclaims
- persistentvolumes
- namespaces
- endpoints
- storageclasses
- clusterroles
- roles
- daemonsets
- deployments
- replicasets
- ingresses
- statefulsets
- cronjobs
- jobs
- horizontalpodautoscalers
verbs: ["get", "list"]
- apiGroups:
- custom.metrics.k8s.io
resources: ["*"]
verbs:
- get
- list
- nonResourceURLs:
- /version
- /healthz
- /metrics
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: check-mk
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: check-mk
subjects:
- kind: ServiceAccount
name: check-mk
namespace: check-mk
+
+ + + +
+ +
+ + + + +
+ + +
+ + +
+
+ + +
+ + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/01_onsite/00_infra/checkmk/deployment.yaml b/01_onsite/00_infra/checkmk/deployment.yaml new file mode 100644 index 0000000..24c4107 --- /dev/null +++ b/01_onsite/00_infra/checkmk/deployment.yaml @@ -0,0 +1,91 @@ +# Deployment description +apiVersion: apps/v1 +kind: Deployment +metadata: + name: checkmk + namespace: infra-environment + labels: + app: checkmk +spec: + strategy: + type: Recreate + replicas: 1 + selector: + matchLabels: + app: checkmk + template: + metadata: + labels: + app: checkmk + spec: + containers: + - name: checkmk + image: checkmk/check-mk-raw:2.0.0 + resources: + requests: + memory: "512Mi" + cpu: "100m" + limits: + memory: "1Gi" + cpu: "4" + ports: + - containerPort: 5000 + name: checkmk-http + protocol: TCP + volumeMounts: + - mountPath: /omd/sites + name: checkmk-pv-dev + volumes: + - name: checkmk-pv-dev + persistentVolumeClaim: + claimName: checkmk-pvc-dev +--- +# Persistent Volume Claim description +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: checkmk-pvc-dev + namespace: infra-environment + labels: + app: checkmk-dev +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +# Service Description +apiVersion: v1 +kind: Service +metadata: + name: checkmk + namespace: infra-environment +spec: + selector: + app: checkmk + ports: + - name: checkmk-http + port: 5000 + targetPort: checkmk-http + type: NodePort +--- + +# Ingress description +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: checkmk-ingress + namespace: infra-environment + annotations: + kubernetes.io/ingress.class: "traefik" +spec: + rules: + - host: checkmk.k3s.semapp.lan + http: + paths: + - path: / + backend: + serviceName: checkmk + servicePort: 5000 \ No newline at end of file