WIP feat(checkmk): add checkmk (#6158)

* add checkmk

* Oops

* app version

* EOL

* EOL try 2

* root

* Update charts/incubator/checkmk/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/checkmk/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* update ports to avoid port conflicts with other apps

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* questions

* add some options

* labels

* Apply suggestions from code review

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/checkmk/templates/_secret.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* fix name

* permission denied in cron!?
and use the internal healthcheck

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
MaverickD650
2023-01-08 19:42:29 +02:00
committed by GitHub
co-authored by Stavros Kois Stavros kois
parent 5cf29bb1dc
commit 63043e45c8
9 changed files with 353 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# docs folder
/docs
# icon
icon.png
+29
View File
@@ -0,0 +1,29 @@
apiVersion: v2
appVersion: "2023.01.08"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 11.1.2
deprecated: false
description: Checkmk is a leading tool for Infrastructure and Application Monitoring. Simple configuration, scalable, flexible. It provides powerful monitoring of networks, servers, clouds, containers and applications.
home: https://truecharts.org/charts/incubator/checkmk
icon: https://truecharts.org/img/hotlink-ok/chart-icons/checkmk.png
keywords:
- checkmk
- monitoring
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: checkmk
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/checkmk
- https://github.com/tribe29/checkmk
type: application
version: 0.0.1
annotations:
truecharts.org/catagories: |
- monitoring
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

+185
View File
@@ -0,0 +1,185 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{controller}
# Include{replicas}
# Include{replica1}
# Include{controllerExpertExtraArgs}
- variable: cmk
group: App Configuration
label: Check-mk Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: password
label: Initial Password
description: Sets the initial password for cmkadmin user
schema:
type: string
required: true
private: true
default: ""
- variable: site_id
label: Site ID
description: Sets the siteID
schema:
type: string
required: true
default: cmk
- variable: livestatus_tcp
label: Livestatus TCP
description: Enables the livestatus TCP
schema:
type: boolean
default: false
- variable: mail_relay_host
label: Mail Relay Host
description: Sets the Mail Relay Host
schema:
type: string
default: ""
# Include{containerConfig}
# Include{serviceRoot}
- variable: main
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: Main Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 15000
required: true
- variable: receiver
label: Receiver Service
description: The Receiver service
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: receiver
label: Receiver Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 18000
required: true
- variable: livestatustcp
label: Livestatus TCP Service
description: The Livestatus TCP service
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: livestatustcp
label: Livestatus TCP Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 6557
required: true
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: config
label: App Config Storage
description: Stores the Application Configuration.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: Main Ingress
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressList}
# Include{security}
# Include{securityContextAdvancedRoot}
- variable: privileged
label: Privileged mode
schema:
type: boolean
default: false
- variable: readOnlyRootFilesystem
label: ReadOnly Root Filesystem
schema:
type: boolean
default: false
- variable: allowPrivilegeEscalation
label: Allow Privilege Escalation
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: runAsNonRoot
schema:
type: boolean
default: false
# Include{podSecurityContextRoot}
- variable: runAsUser
label: runAsUser
description: The UserID of the user running the application
schema:
type: int
default: 0
- variable: runAsGroup
label: runAsGroup
description: The groupID this App of the user running the application
schema:
type: int
default: 0
- variable: fsGroup
label: fsGroup
description: The group that should own ALL storage.
schema:
type: int
default: 568
# Include{podSecurityContextAdvanced}
# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{vpn}
# Include{documentation}
@@ -0,0 +1,20 @@
{{/* Define the secret */}}
{{- define "checkmk.secret" -}}
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
stringData:
CMK_PASSWORD: {{ .Values.cmk.password | quote }}
CMK_SITE_ID: {{ .Values.cmk.site_id | quote }}
CMK_LIVESTATUS_TCP: {{ ternary "on" "off" .Values.cmk.livestatus_tcp | quote }}
{{- with .Values.cmk.mail_relay_host }}
MAIL_RELAY_HOST: {{ . | quote }}
{{- end }}
{{- end }}
@@ -0,0 +1,8 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{/* Render secret */}}
{{- include "checkmk.secret" . }}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
+81
View File
@@ -0,0 +1,81 @@
image:
repository: tccr.io/truecharts/check-mk-raw
pullPolicy: IfNotPresent
tag: v2.1.0@sha256:1894f1adbd7e1dfacd570eb5238b6bcb51d5747220a91a591c8981df51323696
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
podSecurityContext:
runAsUser: 0
runAsGroup: 0
cmk:
password: secret
site_id: cmk
livestatus_tcp: true
mail_relay_host: ""
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-secret'
service:
main:
ports:
main:
protocol: HTTP
targetPort: 5000
port: 15000
receiver:
enabled: true
ports:
receiver:
enabled: true
protocol: HTTP
targetPort: 8000
port: 18000
livestatustcp:
enabled: true
ports:
livestatustcp:
enabled: true
targetPort: 6557
port: 6557
probes:
liveness:
spec:
exec:
command:
- /bin/sh
- -c
- omd status
readiness:
exec:
command:
- /bin/sh
- -c
- omd status
startup:
exec:
command:
- /bin/sh
- -c
- omd status
persistence:
config:
enabled: true
mountPath: /omd/sites
cmk-temp:
enabled: true
type: emptyDir
mountPath: /omd/sites/cmk/tmp
cmk-cron:
enabled: true
mountPath: /var/spool/cron/crontabs
portal:
enabled: true