kimai2

by robjuz

Helm chartv5.0.22App 2.73.0

A Helm chart for Kubernetes

About this chart

Kimai

Kimai is a free & open source timetracker. It tracks work time and prints out a summary of your activities on demand. Yearly, monthly, daily, by customer, by project … Its simplicity is its strength.

TL;DR

helm repo add robjuz https://robjuz.github.io/helm-charts/
helm install kimai robjuz/kimai2

Introduction

This chart bootstraps a Kimai deployment on a Kubernetes cluster using the Helm package manager.

It also packages the Bitnami MariaDB chart which is required for bootstrapping a MariaDB deployment for the database requirements of the Kimai application.

This chart has been tested to work with NGINX Ingress and cert-manager on top of the MicroK8s.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

To install the chart with the release name kimai:

helm install kimai robjuz/kimai2

The command deploys Kimai on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the kimai deployment:

helm delete kimai

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

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
commonLabelsLabels to add to all deployed resources{}
commonAnnotationsAnnotations to add to all deployed resources{}
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment

Kimai Image parameters

NameDescriptionValue
image.registryKimai image registrydocker.io
image.repositoryKimai image repositorykimai/kimai2
image.tagKimai image tag (immutable tags are recommended)apache-2.0.23-prod
image.digestKimai image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyKimai image pull policyIfNotPresent
image.pullSecretsKimai image pull secrets[]
image.debugSpecify if debug values should be set

Kimai Configuration parameters

NameDescriptionValue
kimaiEnvironmentKimai environment nameprod
kimaiAppSecretSecret used to encrypt session cookieschange_this_to_something_unique
kimaiAdminEmailEmail for the superadmin account[email protected]
kimaiAdminPasswordPassword for the superadmin account``
kimaiMailerFromApplication specific “from” address for all emails[email protected]
kimaiMailerUrlSMTP connection for emailsnull://localhost
kimaiTrustedProxies""
existingSecretName of existing secret containing Kimai credentials""
configurationFromSecretUse an existing secret match the common.names.fullname template containing “local.yaml“ key as configuration filefalse

Kimai deployment parameters

NameDescriptionValue
replicaCountNumber of Kimai replicas to deploy1
updateStrategy.typeKimai deployment strategy typeRollingUpdate
schedulerNameAlternate scheduler""
terminationGracePeriodSecondsIn seconds, time given to the Kimai pod to terminate gracefully""
topologySpreadConstraintsTopology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template[]
priorityClassNameName of the existing priority class to be used by Kimai pods, priority class needs to be created beforehand""
hostAliasesKimai pod host aliases[]
extraVolumesOptionally specify extra list of additional volumes for Kimai pods[]
extraVolumeMountsOptionally specify extra list of additional volumeMounts for Kimai container(s)[]
sidecarsAdd additional sidecar containers to the Kimai pod[]
initContainersAdd additional init containers to the Kimai pods[]
podLabelsExtra labels for Kimai pods{}
podAnnotationsAnnotations for Kimai pods{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set[]
affinityAffinity for pod assignment{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
resources.limitsThe resources limits for the Kimai containers{}
resources.limits.memoryThe memory limit for the Kimai containers256Mi
resources.requests.cpuThe requested cpu for the Kimai containers100m
containerPorts.httpKimai HTTP container port80
extraContainerPortsOptionally specify extra list of additional ports for Kimai container(s)[]
podSecurityContext.enabledEnabled Kimai pods' Security Contextfalse
podSecurityContext.fsGroupSet Kimai pod's Security Context fsGroup1001
podSecurityContext.seccompProfile.typeSet Kimai container's Security Context seccomp profileRuntimeDefault
containerSecurityContext.enabledEnabled Kimai containers' Security Contextfalse
containerSecurityContext.runAsUserSet Kimai container's Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet Kimai container's Security Context runAsNonRoottrue

Deploy kimai2 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kimai2 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 chartkimai2 is pinned at v5.0.22 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