power-steering
by CodeScriptum
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
| Key | Type | Default | Description |
|---|---|---|---|
| config.extraEgressRules | list | [] | |
| config.ingress.annotations."nginx.ingress.kubernetes.io/proxy-body-size" | string | "32m" | |
| config.ingress.host | string | "" | |
| config.replicas | int | 1 | |
| config.resources.limits.cpu | string | "500m" | |
| config.resources.limits.memory | string | "512Mi" | |
| config.resources.requests.cpu | string | "100m" | |
| config.resources.requests.memory | string | "256Mi" | |
| config.serviceMonitor.enabled | bool | false | |
| config.serviceMonitor.interval | string | "30s" | |
| config.serviceMonitor.scrapeTimeout | string | "10s" | |
| config.sidecar.batchMaxSize | int | 0 | |
| config.sidecar.batchSize | int | 8192 | |
| config.sidecar.dumpBatchSize | int | 500000 | |
| config.sidecar.image | string | "otel/opentelemetry-collector-contrib:0.110.0" | |
| config.sidecar.maxRecvMsgSizeMib | int | 64 | |
| config.sidecar.resources.limits.cpu | string | "1" | |
| config.sidecar.resources.limits.memory | string | "1Gi" | |
| config.sidecar.resources.requests.cpu | string | "50m" | |
| config.sidecar.resources.requests.memory | string | "128Mi" | |
| controller.cluster.bcm.cidr | string | "" | |
| controller.cluster.bcm.host | string | "" | |
| controller.cluster.bcm.ipRedirect | bool | true | |
| controller.cluster.bcm.port | int | 8081 | |
| controller.cluster.bcm.rpcTimeoutSeconds | int | 10 | |
| controller.cluster.dps.auth.enabled | bool | false | |
| controller.cluster.dps.auth.secretName | string | "power-steering-ldap" | |
| controller.cluster.dps.getTimeout | float | 1 | |
| controller.cluster.dps.host | string | "" | |
| controller.cluster.dps.port | int | 8080 | |
| controller.cluster.dps.setTimeout | float | 30 | |
| controller.cluster.dps.tls.caCertPath | string | "" | |
| controller.cluster.dps.tls.insecure | bool | false | |
| controller.cluster.dps.tls.skipVerify | bool | false | |
| controller.cluster.shadowMode | bool | false | |
| controller.dump.enabled | bool | true | |
| controller.extraEgressRules | list | [] | |
| controller.ingress.host | string | "" | |
| controller.replicas | int | 1 | |
| controller.resources.limits.cpu | string | "1000m" | |
| controller.resources.limits.memory | string | "2Gi" | |
| controller.resources.requests.cpu | string | "250m" | |
| controller.resources.requests.memory | string | "1Gi" | |
| controller.serviceMonitor.enabled | bool | false | |
| controller.serviceMonitor.interval | string | "30s" | |
| controller.serviceMonitor.scrapeTimeout | string | "10s" | |
| controller.sidecar.batchMaxSize | int | 0 | |
| controller.sidecar.batchSize | int | 8192 | |
| controller.sidecar.dumpBatchSize | int | 500000 | |
| controller.sidecar.image | string | "otel/opentelemetry-collector-contrib:0.110.0" | |
| controller.sidecar.maxRecvMsgSizeMib | int | 64 | |
| controller.sidecar.resources.limits.cpu | string | "1" | |
| controller.sidecar.resources.limits.memory | string | "1Gi" | |
| controller.sidecar.resources.requests.cpu | string | "50m" | |
| controller.sidecar.resources.requests.memory | string | "128Mi" | |
| dashboards.annotations | object | {} | |
| dashboards.enabled | bool | false | |
| dashboards.labels | object | {} | |
| dashboards.namespace | string | "" | |
| global.database.existingSecret | string | "" | |
| global.database.names.config | string | "config_db" | |
| global.database.names.configStaged | string | "config_db_staged" | |
| global.database.names.controller | string | "controller_db" | |
| global.database.password | string | "changeme" | |
| global.database.port | int | 5432 | |
| global.database.user | string | "power_steering_user" | |
| global.image.pullPolicy | string | "IfNotPresent" | |
| global.image.pullSecrets | list | [] | |
| global.image.registry | string | "nvcr.io/nvidia" | |
| global.ingress.className | string | "" | |
| global.ingress.enabled | bool | false | |
| global.ingress.tls | bool | false | |
| global.initImage | string | "busybox:1.37-glibc" | |
| global.lgtm | bool | false | |
| global.storage.accessKeyIdKey | string | "admin_access_key_id" | |
| global.storage.bucketName | string | "power-steering" | |
| global.storage.existingSecret | string | "" | |
| global.storage.region | string | "us-east-1" | |
| global.storage.s3Endpoint | string | "" | |
| global.storage.secretAccessKeyKey | string | "admin_secret_access_key" | |
| global.storage.weedImage | string | "chrislusf/seaweedfs:4.18" | |
| global.storage.weedResources | object | {} | |
| global.telemetry.dump.retention | string | "5h" | |
| global.telemetry.endpoints.otlp.default | string | "" | |
| global.telemetry.endpoints.otlp.insecure | bool | true | |
| global.telemetry.endpoints.otlp.logs | string | "" | |
| global.telemetry.endpoints.otlp.metrics | string | "" | |
| global.telemetry.endpoints.otlp.traces | string | "" | |
| global.telemetry.endpoints.pyroscope.endpoint | string | "" | |
| global.telemetry.jsonLogs | bool | false | |
| global.telemetry.logLevel | string | "INFO" | |
| lgtm.grafanaHost | string | "grafana.127.0.0.1.nip.io" | |
| lgtm.image.pullPolicy | string | "IfNotPresent" | |
| lgtm.image.repository | string | "grafana/otel-lgtm" | |
| lgtm.image.tag | string | "latest" | |
| lgtm.resources.limits.cpu | string | "1000m" | |
| lgtm.resources.limits.ephemeral-storage | string | "4Gi" | |
| lgtm.resources.limits.memory | string | "2Gi" | |
| lgtm.resources.requests.cpu | string | "100m" | |
| lgtm.resources.requests.ephemeral-storage | string | "512Mi" | |
| lgtm.resources.requests.memory | string | "512Mi" | |
| postgresql.auth.existingSecret | string | "{{ .Release.Name }}-secret" | |
| postgresql.auth.secretKeys.adminPasswordKey | string | "postgres-password" | |
| postgresql.auth.secretKeys.userPasswordKey | string | "database-password" | |
| postgresql.auth.username | string | "power_steering_user" | |
| postgresql.enabled | bool | true | |
| postgresql.metrics.enabled | bool | true | |
| postgresql.primary.initdb.scriptsConfigMap | string | "{{ .Release.Name }}-postgresql-init" | |
| postgresql.primary.persistence.enabled | bool | true | |
| postgresql.primary.persistence.size | string | "8Gi" | |
| postgresql.primary.podLabels."app.kubernetes.io/part-of" | string | "power-steering" | |
| seaweedfs.enabled | bool | true | |
| seaweedfs.filer.data.size | string | "1Gi" | |
| seaweedfs.filer.data.type | string | "persistentVolumeClaim" | |
| seaweedfs.filer.replicas | int | 1 | |
| seaweedfs.filer.resources.limits.cpu | string | "50m" | |
| seaweedfs.filer.resources.limits.memory | string | "1024Mi" | |
| seaweedfs.filer.resources.requests.cpu | string | "50m" | |
| seaweedfs.filer.resources.requests.memory | string | "768Mi" | |
| seaweedfs.master.data.size | string | "1Gi" | |
| seaweedfs.master.data.type | string | "persistentVolumeClaim" | |
| seaweedfs.master.garbageThreshold | float | 0.05 | |
| seaweedfs.master.replicas | int | 1 | |
| seaweedfs.master.resources.limits.cpu | string | "50m" | |
| seaweedfs.master.resources.limits.memory | string | "64Mi" | |
| seaweedfs.master.resources.requests.cpu | string | "50m" | |
| seaweedfs.master.resources.requests.memory | string | "64Mi" | |
| seaweedfs.podLabels."app.kubernetes.io/part-of" | string | "power-steering" | |
| seaweedfs.s3.createBuckets[0].anonymousRead | bool | false | |
| seaweedfs.s3.createBuckets[0].name | string | "power-steering" | |
| seaweedfs.s3.enableAuth | bool | true | |
| seaweedfs.s3.enabled | bool | true | |
| seaweedfs.s3.port | int | 8333 | |
| seaweedfs.s3.resources.limits.cpu | string | "100m" | |
| seaweedfs.s3.resources.limits.memory | string | "256Mi" | |
| seaweedfs.s3.resources.requests.cpu | string | "50m" | |
| seaweedfs.s3.resources.requests.memory | string | "128Mi" | |
| seaweedfs.volume.dataDirs[0].maxVolumes | int | 0 | |
| seaweedfs.volume.dataDirs[0].name | string | "data1" | |
| seaweedfs.volume.dataDirs[0].size | string | "10Gi" | |
| seaweedfs.volume.dataDirs[0].type | string | "persistentVolumeClaim" | |
| seaweedfs.volume.replicas | int | 1 | |
| seaweedfs.volume.resources.limits.cpu | string | "50m" | |
| seaweedfs.volume.resources.limits.memory | string | "256Mi" | |
| seaweedfs.volume.resources.requests.cpu | string | "50m" | |
| seaweedfs.volume.resources.requests.memory | string | "256Mi" | |
| security.networkPolicies.enabled | bool | true |
Maintainers
| Name | Url | |
|---|---|---|
| Dynamic Power Team | https://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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpower-steering is pinned at v2.2.2 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