diff --git a/charts/incubator/checkmk/.helmignore b/charts/incubator/checkmk/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/checkmk/.helmignore @@ -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 diff --git a/charts/incubator/checkmk/CHANGELOG.md b/charts/incubator/checkmk/CHANGELOG.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/checkmk/Chart.yaml b/charts/incubator/checkmk/Chart.yaml new file mode 100644 index 00000000000..69f814b858c --- /dev/null +++ b/charts/incubator/checkmk/Chart.yaml @@ -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 diff --git a/charts/incubator/checkmk/README.md b/charts/incubator/checkmk/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/checkmk/icon.png b/charts/incubator/checkmk/icon.png new file mode 100644 index 00000000000..135535195f6 Binary files /dev/null and b/charts/incubator/checkmk/icon.png differ diff --git a/charts/incubator/checkmk/questions.yaml b/charts/incubator/checkmk/questions.yaml new file mode 100644 index 00000000000..802a237a1d8 --- /dev/null +++ b/charts/incubator/checkmk/questions.yaml @@ -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} diff --git a/charts/incubator/checkmk/templates/_secret.tpl b/charts/incubator/checkmk/templates/_secret.tpl new file mode 100644 index 00000000000..fe671058a92 --- /dev/null +++ b/charts/incubator/checkmk/templates/_secret.tpl @@ -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 }} diff --git a/charts/incubator/checkmk/templates/common.yaml b/charts/incubator/checkmk/templates/common.yaml new file mode 100644 index 00000000000..61ad7c95fa3 --- /dev/null +++ b/charts/incubator/checkmk/templates/common.yaml @@ -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" . }} diff --git a/charts/incubator/checkmk/values.yaml b/charts/incubator/checkmk/values.yaml new file mode 100644 index 00000000000..9acba87a9e4 --- /dev/null +++ b/charts/incubator/checkmk/values.yaml @@ -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