krci-env-daemon

by sergk

Helm chartv0.2.0-SNAPSHOT.3App 0.2.0-SNAPSHOT.3Apache-2.0Verified publisher

A Helm chart for krci-env-daemon, which wakes KubeRocketCI environments that KEDA scaled to zero when they are accessed

About this chart

krci-env-daemon

A Helm chart for krci-env-daemon, which wakes KubeRocketCI environments that KEDA scaled to zero when they are accessed

Homepage: https://docs.kuberocketci.io/

Maintainers

NameEmailUrl
epmd-edp[email protected]https://solutionshub.epam.com/solution/kuberocketci

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
environmentslist[]Environments the daemon serves. namespace gets read access for the daemon, hostnames get the waiting page path /.krci-wake/, and route names the environment's HTTPRoute that shows the waiting page while the environment sleeps.
fullnameOverridestring"krci-env-daemon"
gatewayobject{"name":"main-gateway","namespace":"envoy-gateway-system"}Gateway that the waiting page route attaches to. Only the environment HTTPRoutes this Gateway accepted give their hostnames to the environments.
goMemLimitstring"230MiB"Go's soft memory limit (GOMEMLIMIT): the garbage collector works harder as the heap nears it. Keep it about 10% below resources.limits.memory.
idlestring"15m"How long an environment stays active after its last use: a request or a running pipeline; at least 1s. KEDA scales its workloads to zero a cooldownPeriod after that.
imageobject{"pullPolicy":"IfNotPresent","repository":"epamedp/krci-env-daemon","tag":""}Daemon image. Top-level image because the CD Pipeline Operator overrides image.repository and image.tag at this path.
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]
networkPolicy.enabledbooltrueAccept traffic only from Envoy, KEDA and, when set, the metrics namespace.
networkPolicy.envoyNamespacestring"envoy-gateway-system"Namespace of the Envoy proxies: access log and waiting page requests.
networkPolicy.kedaNamespacestring"keda"Namespace of KEDA: external scaler calls.
networkPolicy.metricsNamespacestring""Namespace allowed to scrape the metrics port. Empty keeps the port closed.
nodeSelectorobject{}https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
podAnnotationsobject{}
podLabelsobject{}
resourcesobject{"limits":{"memory":"256Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}Memory grows with the number of environments, faster with a Role per namespace than with watchAllNamespaces (one set of informers per watched namespace). Raise limits.memory and goMemLimit together for many environments.
scaledObjectSelectorstring"krci.epam.com/env-daemon=enabled"Label selector of the ScaledObjects the daemon drives.
serviceAccount.annotationsobject{}Annotations to add to the service account.
serviceAccount.createbooltrueCreate the service account. The daemon needs its token to read the cluster.
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template.
serviceMonitor.enabledboolfalseCreate a Prometheus Operator ServiceMonitor for the metrics port.
serviceMonitor.intervalstring"30s"Scrape interval.
tolerationslist[]https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
waitingPage.mergeTypestring"StrategicMerge"How the waiting page's BackendTrafficPolicy merges with one that targets the Gateway: StrategicMerge or JSONMerge. Empty replaces the Gateway's policy for the environment's route.
wakeAfterTimeoutstring"2m"Longest wait for a krci.epam.com/wake-after dependency before the dependent workload starts anyway.
watchAllNamespacesboolfalseRead all namespaces through a ClusterRole instead of a Role in each environment namespace. Any namespace with selected ScaledObjects is then an environment; environments is needed only for the waiting page.

Deploy krci-env-daemon with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has krci-env-daemon 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 chartkrci-env-daemon is pinned at v0.2.0-SNAPSHOT.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