koptimize

by jaconi

Helm chartv0.5.4App 1.2.5MITVerified publisher

A Helm chart for koptimize

About this chart

koptimize

Helm chart for koptimize. Note, that while the Helm chart is open source and the Docker image is public, the code for koptimize itself is private.

koptimize aims at reducing cost of a Kubernetes cluster, going further than, for example, the cluster autoscaler.

Features

  • A mutating webhook, that forces workloads (that tolerate spot instances) onto spot instances. This is helpful, to ramp up spot instance usage. Example:
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
  namespace: default
spec:
  ...
  tolerations:
    - key: cloud.google.com/gke-spot
      operator: Equal
      value: "true"
      effect: NoSchedule

becomes

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
  namespace: default
spec:
  ...
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: cloud.google.com/gke-spot
                operator: In
                values:
                  - "true"
  tolerations:
    - key: cloud.google.com/gke-spot
      operator: Equal
      value: "true"
      effect: NoSchedule

Parameters

Common parameters

NameDescriptionValue
imagePullSecretsThe image pull secrets to use.[]
nameOverrideOverride for the chart name.""
fullnameOverrideOverride for the chart's full name.""

Deployment parameters

NameDescriptionValue
replicaCountNumber of replicas for the koptimize deployment.1
priorityClassNamePriority Class for the koptimize deployment.system-cluster-critical
annotationsAnnotations to add to the deployment{}
podAnnotationsThe annotations to add to the pod.{}
podSecurityContextThe pod's security context.{}
nodeSelectorThe nodeSelector to use.{}
tolerationsThe tolerations.[]
affinityThe affinity settings.{}

Controller parameters

NameDescriptionValue
controller.image.repositoryThe controller image.ghcr.io/jaconi-io/koptimize
controller.image.pullPolicyThe controller image's pull policy.IfNotPresent
controller.image.tagThe controller image tag.""
controller.securityContextThe controller container security context.{}
controller.resourcesThe controller container resources.{}

Scheduler parameters

NameDescriptionValue
scheduler.enabledEnable the scheduler container.false
scheduler.image.repositoryThe scheduler image.ghcr.io/jaconi-io/koptimize
scheduler.image.pullPolicyThe scheduler image's pull policy.IfNotPresent
scheduler.image.tagThe scheduler image tag.""
scheduler.securityContextThe scheduler container security context.{}
scheduler.resourcesThe scheduler container resources.{}

Service Account parameters

NameDescriptionValue
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to use.""

Service parameters

NameDescriptionValue
service.typeThe service typeClusterIP
service.portThe service port443
service.targetPortThe service target port9443
service.annotationsAnnotations to add to the service{}

Autoscaling parameters

NameDescriptionValue
autoscaling.enabledEnabled autoscalingfalse
autoscaling.minReplicasMin number of replicas1
autoscaling.maxReplicasMax number of replicas100
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80

Pod Disruption Budget

NameDescriptionValue
podDisruptionBudgetPod Disruption Budget parameters{}

Service Monitor parameters

NameDescriptionValue
serviceMonitor.createEnable or disable the Service Monitor creationfalse
serviceMonitor.intervalScrape interval10s
serviceMonitor.scrapeTimeoutScrape timeout10s

This section is generated using metadata from values.yaml!

Deploy koptimize with OpenTenant

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