buildkit-service
by andrcuns
Helm chart for buildkit service deployment
About this chart
buildkit-service
buildkit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner.
buildkit-service wraps kubernetes deployment examples in to helm chart
Introduction
This chart bootstraps buildkit service deployment on a Kubernetes cluster using the Helm package manager.
Add Helm repo
helm repo add andrcuns https://andrcuns.github.io/charts
Installing the Chart
Install this chart using:
helm install buildkit andrcuns/buildkit-service --values values.yaml
The command deploys buildkit-service on the Kubernetes cluster in the default configuration. The values section lists the parameters that can be configured during installation.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity |
| autoscaling.enabled | bool | false | Enable horizontal pod auto-scaler |
| autoscaling.maxReplicas | int | 5 | Maximum number of replicas |
| autoscaling.minReplicas | int | 1 | Minimum number of replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization percentage |
| autoscaling.targetMemoryUtilizationPercentage | int | 80 | Target memory utilization percentage |
| buildkitVolume.emptyDir.medium | string | "" | Storage medium (e.g., "Memory" for tmpfs) |
| buildkitVolume.emptyDir.sizeLimit | string | "" | Size limit for the volume |
| buildkitVolume.pvc.accessModes | list | ["ReadWriteOnce"] | Access modes |
| buildkitVolume.pvc.existingClaim | string | "" | Use existing PVC name |
| buildkitVolume.pvc.size | string | "10Gi" | Storage size |
| buildkitVolume.pvc.storageClassName | string | "" | Storage class name |
| buildkitVolume.type | string | "emptyDir" | Volume type: 'emptyDir' or 'pvc' |
| buildkitdToml | string | "" | Custom configuration buildkitd.toml |
| caCerts.certs | object | {} | base64 encoded CA certs to include in /etc/buildkit/certs |
| caCerts.enabled | bool | false | Add additional CA certificates |
| daemonArgs | list | [] | Buildkitd command line parameters |
| debugLog | bool | false | Enable debug logging |
| env | list | [] | Environment variables for the buildkit container |
| extraSelectorLabels | object | {} | Additional selector labels to add to the deployment and pod template. Useful for integrating with tools like buildx that require specific labels (e.g. app). |
| extraVolumeMounts | list | [] | Additional volume mounts to add to containers. Useful to manage image or emptyDir volumes for cloud provider credentials. |
| extraVolumes | list | [] | Additional volumes to add to the deployment and pod template. Useful to manage image or emptyDir volumes for cloud provider credentials. |
| image.pullPolicy | string | "IfNotPresent" | Pull policy |
| image.repository | string | "moby/buildkit" | Image name |
| image.tag | string | "" | Image tag |
| initContainers | list | [] | Init containers to run before the main buildkit container Useful for network configuration, volume preparation, etc. |
| lifecycle | object | {} | Lifecycle hooks and termination |
| livenessProbe | object | {"failureThreshold":3,"initialDelaySeconds":5,"periodSeconds":30,"timeoutSeconds":1} | Liveness probe configuration |
| nodeSelector | object | {} | Node selector |
| pdb.minAvailable | int | 1 | Minimum available pods |
| podAnnotations | object | {} | Pod annotations |
| preStop | bool | false | Enable the preStop script for graceful shutdown, https://github.com/seatgeek/buildkit-prestop-script |
| readinessProbe | object | {"failureThreshold":3,"initialDelaySeconds":5,"periodSeconds":30,"successThreshold":1,"timeoutSeconds":1} | Readiness probe configuration |
| replicaCount | int | 1 | |
| resources | object | {} | Resource definitions |
| rootless | bool | false | Run rootless mode, https://github.com/moby/buildkit/blob/master/docs/rootless.md |
| securityContext | object | {} | Container security context options |
| service.annotations | object | {} | Service annotations |
| service.loadbalancerIp | string | "" | Static ip address for load balancer |
| service.port | int | 1234 | Service port |
| service.type | string | "ClusterIP" | Service type |
| serviceAccountName | string | "default" | Service account name for the pod |
| terminationGracePeriodSeconds | int | 30 | |
| tls.cert | string | nil | Base64 encoded cert.pem |
| tls.certCA | string | nil | Base64 encoded ca.pem |
| tls.certKey | string | nil | Base64 encoded key.pem |
| tls.enabled | bool | false | Enable mTLS, refer to https://github.com/moby/buildkit/tree/master/examples/kubernetes#deployment--service |
| tls.existingSecret | string | nil | Name of an existing Secret in this namespace containing the certificate to be used for the server half of mTLS. Expected to contain tls.crt, tls.key ,ca.crt. |
| tolerations | list | [] | Tolerations |
Deploy buildkit-service with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has buildkit-service 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 chartbuildkit-service is pinned at v1.9.0 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