kimai2
by robjuz
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
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template | "" |
commonLabels | Labels to add to all deployed resources | {} |
commonAnnotations | Annotations to add to all deployed resources | {} |
clusterDomain | Kubernetes Cluster Domain | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment |
Kimai Image parameters
| Name | Description | Value |
|---|---|---|
image.registry | Kimai image registry | docker.io |
image.repository | Kimai image repository | kimai/kimai2 |
image.tag | Kimai image tag (immutable tags are recommended) | apache-2.0.23-prod |
image.digest | Kimai image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | Kimai image pull policy | IfNotPresent |
image.pullSecrets | Kimai image pull secrets | [] |
image.debug | Specify if debug values should be set |
Kimai Configuration parameters
| Name | Description | Value |
|---|---|---|
kimaiEnvironment | Kimai environment name | prod |
kimaiAppSecret | Secret used to encrypt session cookies | change_this_to_something_unique |
kimaiAdminEmail | Email for the superadmin account | [email protected] |
kimaiAdminPassword | Password for the superadmin account | `` |
kimaiMailerFrom | Application specific “from” address for all emails | [email protected] |
kimaiMailerUrl | SMTP connection for emails | null://localhost |
kimaiTrustedProxies | "" | |
existingSecret | Name of existing secret containing Kimai credentials | "" |
configurationFromSecret | Use an existing secret match the common.names.fullname template containing “local.yaml“ key as configuration file | false |
Kimai deployment parameters
| Name | Description | Value |
|---|---|---|
replicaCount | Number of Kimai replicas to deploy | 1 |
updateStrategy.type | Kimai deployment strategy type | RollingUpdate |
schedulerName | Alternate scheduler | "" |
terminationGracePeriodSeconds | In seconds, time given to the Kimai pod to terminate gracefully | "" |
topologySpreadConstraints | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | [] |
priorityClassName | Name of the existing priority class to be used by Kimai pods, priority class needs to be created beforehand | "" |
hostAliases | Kimai pod host aliases | [] |
extraVolumes | Optionally specify extra list of additional volumes for Kimai pods | [] |
extraVolumeMounts | Optionally specify extra list of additional volumeMounts for Kimai container(s) | [] |
sidecars | Add additional sidecar containers to the Kimai pod | [] |
initContainers | Add additional init containers to the Kimai pods | [] |
podLabels | Extra labels for Kimai pods | {} |
podAnnotations | Annotations for Kimai pods | {} |
podAffinityPreset | Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard | "" |
podAntiAffinityPreset | Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard | soft |
nodeAffinityPreset.type | Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard | "" |
nodeAffinityPreset.key | Node label key to match. Ignored if affinity is set | "" |
nodeAffinityPreset.values | Node label values to match. Ignored if affinity is set | [] |
affinity | Affinity for pod assignment | {} |
nodeSelector | Node labels for pod assignment | {} |
tolerations | Tolerations for pod assignment | [] |
resources.limits | The resources limits for the Kimai containers | {} |
resources.limits.memory | The memory limit for the Kimai containers | 256Mi |
resources.requests.cpu | The requested cpu for the Kimai containers | 100m |
containerPorts.http | Kimai HTTP container port | 80 |
extraContainerPorts | Optionally specify extra list of additional ports for Kimai container(s) | [] |
podSecurityContext.enabled | Enabled Kimai pods' Security Context | false |
podSecurityContext.fsGroup | Set Kimai pod's Security Context fsGroup | 1001 |
podSecurityContext.seccompProfile.type | Set Kimai container's Security Context seccomp profile | RuntimeDefault |
containerSecurityContext.enabled | Enabled Kimai containers' Security Context | false |
containerSecurityContext.runAsUser | Set Kimai container's Security Context runAsUser | 1001 |
containerSecurityContext.runAsNonRoot | Set Kimai container's Security Context runAsNonRoot | true |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkimai2 is pinned at v5.0.22 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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