Helm Chart Deployment
Relevant source files
The following files were used as context for generating this wiki page:
Kuberhealthy utilizes Helm as a primary deployment mechanism to manage its installation and lifecycle within Kubernetes clusters. The Helm chart provides a templated approach to deploying the Kuberhealthy operator, its associated configuration, and various synthetic checks. This system allows for modular configuration, enabling or disabling specific monitors and integrating with external observability tools like Prometheus and Grafana.
The deployment infrastructure is designed to support both direct Helm installations and the generation of "flat" YAML specification files for environments where Helm is not natively used. It includes automation for CI/CD pipelines to update chart versions and app versions based on GitHub releases, ensuring that the latest stable or development versions are readily available to users.
Sources: deploy/README.md, deploy/helm/kuberhealthy/README.md, deploy/helm/helm-repo-update.sh
Installation and Configuration
Deployment via Helm requires adding the Kuberhealthy repository and installing the chart into a dedicated namespace. The process typically involves creating the kuberhealthy namespace and setting the context before running the install command.
The diagram shows the standard progression from cluster preparation to specific installation flavors.
Installation Commands
| Environment | Command |
|---|---|
| Standard | helm install kuberhealthy kuberhealthy/kuberhealthy |
| Prometheus | helm install kuberhealthy kuberhealthy/kuberhealthy --set prometheus.enabled=true --set prometheus.prometheusRule.enabled=true |
| Prometheus Operator | helm install kuberhealthy kuberhealthy/kuberhealthy --set prometheus.enabled=true --set prometheus.serviceMonitor.enabled=true |
Sources: deploy/README.md:52-84, helm-repos/README.md:12-19
Core Deployment Architecture
The deployment.yaml template defines the Kuberhealthy operator's pod structure. It uses a RollingUpdate strategy to ensure high availability during transitions. The operator is configured with resource limits, security contexts, and liveness/readiness probes targeting port 8080.
Component Relationships
This diagram illustrates the relationship between the core Kuberhealthy deployment components and the optional monitoring resources.
Security and Resource Management
The chart enforces a non-root security context by default, running as user 999. It also supports Pod Disruption Budgets to maintain availability.
- Security Context:
runAsNonRoot: true,runAsUser: 999,allowPrivilegeEscalation: false. - Resources: Default requests are set to
400mCPU and300MiMemory. - Probes: Liveness and readiness use
tcpSocketon port8080with a 2-second initial delay.
Sources: deploy/helm/kuberhealthy/templates/deployment.yaml:20-130, deploy/helm/kuberhealthy/values.yaml:126-150
Monitoring and Observability Integration
The Helm chart includes comprehensive support for the Prometheus Operator ecosystem, including ServiceMonitor and PrometheusRule resources.
Prometheus Configuration Options
| Parameter | Default | Description |
|---|---|---|
prometheus.enabled | false | Enables deployment of monitoring specs |
prometheus.serviceMonitor.enabled | false | Creates a ServiceMonitor for Prometheus Operator |
prometheus.prometheusRule.enabled | false | Creates alerting rules for Prometheus Operator |
prometheus.grafanaDashboard.enabled | false | Deploys a ConfigMap containing a Grafana dashboard |
Sources: deploy/helm/kuberhealthy/values.yaml:15-60, deploy/helm/kuberhealthy/templates/grafana-dashboard.yaml:1-10
Release Automation and Flat Files
Kuberhealthy uses automation scripts to maintain chart integrity and provide alternative installation methods.
Release Workflow
The helm-repo-update.sh script automates the versioning process:
- Version Update: Synchronizes
appVersionwith GitHub tags andversionwith the GitHub Run Number. - Linting: Runs
helm lintto ensure chart validity. - Packaging: Packages the chart into a
.tgzarchive. - Indexing: Merges new package information into
index.yaml.
Sources: deploy/helm/helm-repo-update.sh:16-52
Flat File Generation
For users who do not use Helm, the project provides create-flat-files.sh. This script uses helm template to render the chart into static YAML files, which are then concatenated with Custom Resource Definitions (CRDs).
kuberhealthy.yaml: Standard deployment.kuberhealthy-prometheus.yaml: Deployment with Prometheus enabled.kuberhealthy-prometheus-operator.yaml: Full stack with ServiceMonitors.
Sources: deploy/helm/create-flat-files.sh:10-44
Summary
The Helm Chart Deployment for Kuberhealthy provides a flexible and automated framework for cluster monitoring. By centralizing configuration in values.yaml and providing automated paths for both Helm-native and static YAML installations, the project ensures that synthetic monitoring can be integrated into diverse Kubernetes environments with minimal manual overhead. Significance is placed on security defaults and deep integration with the Prometheus ecosystem to facilitate immediate alerting and visualization of cluster health.
Sources: deploy/helm/kuberhealthy/README.md, deploy/README.md