power-steering

by CodeScriptum

Helm chartv2.2.2

Dynamic Power Steering

About this chart

power-steering

Dynamic Power Steering

Prerequisites

  • Kubernetes >= 1.28
  • Helm >= 3.12
  • PostgreSQL >= 17

Installation

# Add chart dependencies
helm dependency update

# Install
helm install prs . --namespace prs --create-namespace

# Verify
kubectl get pods -n prs
helm test prs -n prs

PostgreSQL Modes

Standalone Power Steering installs keep the bundled Bitnami PostgreSQL subchart enabled by default with postgresql.enabled=true. In that mode, Power Steering creates <release>-secret with the database-password and postgres-password keys and the Power Steering services connect to <release>-postgresql.

When Power Steering is consumed as a DPS subchart, set power-steering.postgresql.enabled=false in the DPS values. Power Steering then consumes the parent-provided global.postgresql contract instead of deploying its own database:

# DPS Chart.yaml dependency (keep the existing version/repository fields)
dependencies:
  - name: power-steering
    condition: power-steering.enabled
global:
  postgresql:
    host: dps-postgresql.dps.svc.cluster.local
    service:
      ports:
        postgresql: "5432"
    auth:
      username: dps
      existingSecret: dps-postgresql
      secretKeys:
        userPasswordKey: database-password

power-steering:
  enabled: true
  postgresql:
    enabled: false

If global.postgresql.host is empty but global.postgresql is present, Power Steering defaults the database host to <release>-postgresql.<namespace>.svc.cluster.local. If global.postgresql.auth.existingSecret is empty, Power Steering expects the parent chart to provide <release>-postgresql. External database NetworkPolicy egress cannot be inferred safely from a hostname; use config.extraEgressRules and controller.extraEgressRules when the database is outside the release namespace.

When Power Steering inherits global.postgresql from DPS, the controller defaults its DPS backend to <release>-server-grpc:8080, matching the DPS chart's default in-cluster gRPC Service. Standalone Power Steering does not enable the DPS backend unless controller.cluster.dps.host is set explicitly. Override controller.cluster.dps.host or controller.cluster.dps.port when the DPS Service name or port is customized.

Values

KeyTypeDefaultDescription
config.extraEgressRuleslist[]
config.ingress.annotations."nginx.ingress.kubernetes.io/proxy-body-size"string"32m"
config.ingress.hoststring""
config.replicasint1
config.resources.limits.cpustring"500m"
config.resources.limits.memorystring"512Mi"
config.resources.requests.cpustring"100m"
config.resources.requests.memorystring"256Mi"
config.serviceMonitor.enabledboolfalse
config.serviceMonitor.intervalstring"30s"
config.serviceMonitor.scrapeTimeoutstring"10s"
config.sidecar.batchMaxSizeint0
config.sidecar.batchSizeint8192
config.sidecar.dumpBatchSizeint500000
config.sidecar.imagestring"otel/opentelemetry-collector-contrib:0.110.0"
config.sidecar.maxRecvMsgSizeMibint64
config.sidecar.resources.limits.cpustring"1"
config.sidecar.resources.limits.memorystring"1Gi"
config.sidecar.resources.requests.cpustring"50m"
config.sidecar.resources.requests.memorystring"128Mi"
controller.cluster.bcm.cidrstring""
controller.cluster.bcm.hoststring""
controller.cluster.bcm.ipRedirectbooltrue
controller.cluster.bcm.portint8081
controller.cluster.bcm.rpcTimeoutSecondsint10
controller.cluster.dps.auth.enabledboolfalse
controller.cluster.dps.auth.secretNamestring"power-steering-ldap"
controller.cluster.dps.getTimeoutfloat1
controller.cluster.dps.hoststring""
controller.cluster.dps.portint8080
controller.cluster.dps.setTimeoutfloat30
controller.cluster.dps.tls.caCertPathstring""
controller.cluster.dps.tls.insecureboolfalse
controller.cluster.dps.tls.skipVerifyboolfalse
controller.cluster.shadowModeboolfalse
controller.dump.enabledbooltrue
controller.extraEgressRuleslist[]
controller.ingress.hoststring""
controller.replicasint1
controller.resources.limits.cpustring"1000m"
controller.resources.limits.memorystring"2Gi"
controller.resources.requests.cpustring"250m"
controller.resources.requests.memorystring"1Gi"
controller.serviceMonitor.enabledboolfalse
controller.serviceMonitor.intervalstring"30s"
controller.serviceMonitor.scrapeTimeoutstring"10s"
controller.sidecar.batchMaxSizeint0
controller.sidecar.batchSizeint8192
controller.sidecar.dumpBatchSizeint500000
controller.sidecar.imagestring"otel/opentelemetry-collector-contrib:0.110.0"
controller.sidecar.maxRecvMsgSizeMibint64
controller.sidecar.resources.limits.cpustring"1"
controller.sidecar.resources.limits.memorystring"1Gi"
controller.sidecar.resources.requests.cpustring"50m"
controller.sidecar.resources.requests.memorystring"128Mi"
dashboards.annotationsobject{}
dashboards.enabledboolfalse
dashboards.labelsobject{}
dashboards.namespacestring""
global.database.existingSecretstring""
global.database.names.configstring"config_db"
global.database.names.configStagedstring"config_db_staged"
global.database.names.controllerstring"controller_db"
global.database.passwordstring"changeme"
global.database.portint5432
global.database.userstring"power_steering_user"
global.image.pullPolicystring"IfNotPresent"
global.image.pullSecretslist[]
global.image.registrystring"nvcr.io/nvidia"
global.ingress.classNamestring""
global.ingress.enabledboolfalse
global.ingress.tlsboolfalse
global.initImagestring"busybox:1.37-glibc"
global.lgtmboolfalse
global.storage.accessKeyIdKeystring"admin_access_key_id"
global.storage.bucketNamestring"power-steering"
global.storage.existingSecretstring""
global.storage.regionstring"us-east-1"
global.storage.s3Endpointstring""
global.storage.secretAccessKeyKeystring"admin_secret_access_key"
global.storage.weedImagestring"chrislusf/seaweedfs:4.18"
global.storage.weedResourcesobject{}
global.telemetry.dump.retentionstring"5h"
global.telemetry.endpoints.otlp.defaultstring""
global.telemetry.endpoints.otlp.insecurebooltrue
global.telemetry.endpoints.otlp.logsstring""
global.telemetry.endpoints.otlp.metricsstring""
global.telemetry.endpoints.otlp.tracesstring""
global.telemetry.endpoints.pyroscope.endpointstring""
global.telemetry.jsonLogsboolfalse
global.telemetry.logLevelstring"INFO"
lgtm.grafanaHoststring"grafana.127.0.0.1.nip.io"
lgtm.image.pullPolicystring"IfNotPresent"
lgtm.image.repositorystring"grafana/otel-lgtm"
lgtm.image.tagstring"latest"
lgtm.resources.limits.cpustring"1000m"
lgtm.resources.limits.ephemeral-storagestring"4Gi"
lgtm.resources.limits.memorystring"2Gi"
lgtm.resources.requests.cpustring"100m"
lgtm.resources.requests.ephemeral-storagestring"512Mi"
lgtm.resources.requests.memorystring"512Mi"
postgresql.auth.existingSecretstring"{{ .Release.Name }}-secret"
postgresql.auth.secretKeys.adminPasswordKeystring"postgres-password"
postgresql.auth.secretKeys.userPasswordKeystring"database-password"
postgresql.auth.usernamestring"power_steering_user"
postgresql.enabledbooltrue
postgresql.metrics.enabledbooltrue
postgresql.primary.initdb.scriptsConfigMapstring"{{ .Release.Name }}-postgresql-init"
postgresql.primary.persistence.enabledbooltrue
postgresql.primary.persistence.sizestring"8Gi"
postgresql.primary.podLabels."app.kubernetes.io/part-of"string"power-steering"
seaweedfs.enabledbooltrue
seaweedfs.filer.data.sizestring"1Gi"
seaweedfs.filer.data.typestring"persistentVolumeClaim"
seaweedfs.filer.replicasint1
seaweedfs.filer.resources.limits.cpustring"50m"
seaweedfs.filer.resources.limits.memorystring"1024Mi"
seaweedfs.filer.resources.requests.cpustring"50m"
seaweedfs.filer.resources.requests.memorystring"768Mi"
seaweedfs.master.data.sizestring"1Gi"
seaweedfs.master.data.typestring"persistentVolumeClaim"
seaweedfs.master.garbageThresholdfloat0.05
seaweedfs.master.replicasint1
seaweedfs.master.resources.limits.cpustring"50m"
seaweedfs.master.resources.limits.memorystring"64Mi"
seaweedfs.master.resources.requests.cpustring"50m"
seaweedfs.master.resources.requests.memorystring"64Mi"
seaweedfs.podLabels."app.kubernetes.io/part-of"string"power-steering"
seaweedfs.s3.createBuckets[0].anonymousReadboolfalse
seaweedfs.s3.createBuckets[0].namestring"power-steering"
seaweedfs.s3.enableAuthbooltrue
seaweedfs.s3.enabledbooltrue
seaweedfs.s3.portint8333
seaweedfs.s3.resources.limits.cpustring"100m"
seaweedfs.s3.resources.limits.memorystring"256Mi"
seaweedfs.s3.resources.requests.cpustring"50m"
seaweedfs.s3.resources.requests.memorystring"128Mi"
seaweedfs.volume.dataDirs[0].maxVolumesint0
seaweedfs.volume.dataDirs[0].namestring"data1"
seaweedfs.volume.dataDirs[0].sizestring"10Gi"
seaweedfs.volume.dataDirs[0].typestring"persistentVolumeClaim"
seaweedfs.volume.replicasint1
seaweedfs.volume.resources.limits.cpustring"50m"
seaweedfs.volume.resources.limits.memorystring"256Mi"
seaweedfs.volume.resources.requests.cpustring"50m"
seaweedfs.volume.resources.requests.memorystring"256Mi"
security.networkPolicies.enabledbooltrue

Maintainers

NameEmailUrl
Dynamic Power Teamhttps://gitlab-master.nvidia.com/applied-networking-ai/projects/power-reservation-steering/prs

Source Code

Deploy power-steering with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has power-steering 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 chartpower-steering is pinned at v2.2.2 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