chekr

by ckotzbauer

Helm chartv0.5.3App 0.5.1Verified publisher

A inspection utility for the maintenance of Kubernetes clusters.

About this chart

Chekr

A inspection utility for the maintenance of Kubernetes clusters.

Learn more: https://github.com/ckotzbauer/chekr

TL;DR;

$ helm install ckotzbauer/chekr

Prerequisites

  • Kubernetes 1.17+ (Helm chart)

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release ckotzbauer/chekr

The command deploys the nginx-pod of this chart on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Chekr chart and their default values.

ParameterDescriptionDefault
imagePullSecretsPull-Secrets to use for each pod[]
nameOverrideName-Override""
fullnameOverrideFullName-Override""
webserver.image.repositorycontainer image repositorynginxinc/nginx-unprivileged
webserver.image.tagcontainer image tagmainline-alpine
webserver.image.pullPolicycontainer image pull policyIfNotPresent
webserver.service.typetype of the webserver-serviceClusterIP
webserver.service.portport of the webserver-service8080
webserver.ingress.enabledwhether to create an Ingressfalse
webserver.ingress.classNamename of the IngressClass""
webserver.ingress.annotationsAnnotations for the Ingress{}
webserver.ingress.hostsList of host-objects for the Ingress[]
webserver.ingress.tlsList of TLS-configs for the Ingress[]
webserver.resourceswebserver-pod resource requests & limitsSee values.yaml
webserver.nodeSelectornode labels for webserver-pod assignment{}
webserver.tolerationsnode tolerations for webserver-pod assignment[]
webserver.affinitynode affinity for webserver-pod assignment{}
job.image.repositorycontainer image repositoryghcr.io/ckotzbauer/chekr
job.image.tagcontainer image tag0.5.1
job.image.pullPolicycontainer image pull policyIfNotPresent
job.schedulecron-schedule for the job0 22 * * *
job.commandsArray of commands and output-files to process[] See values.yaml
job.configGlobal config-values for chekr-config-file{} See values.yaml
job.envList of environment-variables[] See values.yaml
job.resourcesjob-pod resource requests & limitsSee values.yaml
job.nodeSelectornode labels for job-pod assignment{}
job.tolerationsnode tolerations for job-pod assignment[]
job.affinitynode affinity for job-pod assignment{}
job.serviceAccount.createShould we create a ServiceAccount for the Jobtrue
job.serviceAccount.nameName of the ServiceAccount to usenull
podSecurityContextsecurityContext to add to each podSee values.yaml
securityContextsecurityContext to add to each containerSee values.yaml
podAnnotationsannotations to add to each pod{}
persistence.storageClassstorage class of the PVC (RWX is required)-
persistence.sizesize of the PVC (RWX is required)256Mi

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    ckotzbauer/chekr

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

# example for staging
$ helm install --name my-release -f values.yaml ckotzbauer/chekr

Example

webserver:
  ingress:
    enabled: true
    className: "nginx"
    hosts:
      - host: chekr.myorg.com
        paths:
          - path: /
            pathType: ImplementationSpecific
    tls:
      - secretName: ""
        hosts:
          - chekr.myorg.com

job:
  commands:
    - command: "deprecation list -o html"
      outputFile: "deprecation.html"
    - command: "resources -n flux-system --limits-threshold 20 -o json"
      outputFile: "flux-system-resources.json"
    - command: "resources -n infrastructure -o html"
      outputFile: "infrastructure-resources.html"

  config:
    prometheus-url: monitoring/k8s-prometheus:9090

This will deploy the nginx-webserver pod under the Domain "chekr.myorg.com". The CronJob will be executed each night (default schedule) and will execute the following commands on each run:

chekr deprecation list -o html --output-file deprecation.html
chekr resources -n flux-system --limits-threshold 20 -o json --output-file flux-system-resources.json
chekr resources -n infrastructure -o html --output-file infrastructure-resources.html

The output-files are served from the webserver:

https://chekr.myorg.com/deprecation.html
https://chekr.myorg.com/flux-system-resources.json
https://chekr.myorg.com/infrastructure-resources.html

Chekr will use the in-cluster Service k8s-prometheus in the monitoring namespace at port 9090 to query prometheus for the resources subcommand.

Tip: You can use the default values.yaml

Deploy chekr with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has chekr on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartchekr is pinned at v0.5.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply