Skip to main content

Kubernetes Deployment

pg-kinetic ships Kubernetes manifests as a Helm chart. Use the public chart repository for normal installs and the local chart path when you are changing templates.

Install From The Helm Repository

helm repo add pgkinetic https://helm.pgkinetic.dev
helm repo update
helm install pg-kinetic pgkinetic/pg-kinetic \
--set image.repository=ghcr.io/hookwoods/pg-kinetic \
--set image.tag=latest

Use immutable image tags for production rollouts when you want exact rollback targets:

helm upgrade --install pg-kinetic pgkinetic/pg-kinetic \
--set image.tag=0.1.0

Test The Local Chart

helm lint ./charts/pg-kinetic
helm template pg-kinetic ./charts/pg-kinetic
helm install pg-kinetic ./charts/pg-kinetic \
--set image.repository=pg-kinetic \
--set image.tag=local \
--set image.pullPolicy=Never

Use that local-image form only for a development cluster where pg-kinetic:local has been loaded into the node image store. For production clusters, set image.repository and image.tag to an immutable image that already exists in a registry reachable by the cluster.

Deployment Shape

The chart renders:

  • a Deployment running one pg-kinetic process per pod
  • a ConfigMap containing pg-kinetic.toml
  • a ClusterIP Service
  • readiness and liveness probes
  • non-root container security defaults

Default service ports:

PortPurpose
6432PostgreSQL client traffic
7000PostgreSQL-compatible admin listener
9090Prometheus metrics when metrics_addr is configured
9091HTTP health and readiness when health_addr is configured

Keep admin, metrics, and health listeners private to the cluster network.

Helm Values

Important values:

ValueDefaultPurpose
image.repositoryghcr.io/hookwoods/pg-kineticContainer image repository.
image.tag0.1.0Image tag to deploy. Override with latest for the moving release image, or with an immutable version for controlled rollouts.
replicaCount2Number of proxy pods.
service.proxyPort6432PostgreSQL client-facing service port.
service.adminPort7000Admin listener service port.
service.metricsPort9090Metrics service port.
service.healthPort9091Health service port.
backendPassword.existingSecretemptyOptional secret for backend password injection.
configembedded TOML stringFull pg-kinetic.toml rendered into a ConfigMap.

The chart does not validate the TOML beyond YAML rendering. Run pg-kinetic preflight --config against the final rendered config before rollout.

Probes

The chart uses:

  • readiness: GET /readyz
  • liveness: GET /healthz

The chart does not configure an HTTP pre-stop drain hook because the proxy does not implement /drain today.

Reload Behavior

The file reload loop reloads config_file when reload_enabled = true. A reload is accepted only when every field checked by Config::is_reload_compatible_with stays equal between the active config and the next config.

Accepted reloads affect new client connections and newly loaded assets. They do not rewrite existing client sessions, already checked-out backends, listener sockets, route lists, runtime settings, capacity limits, TLS modes, auth mode, health listener configuration, or socket options.

ChangeApplied By ReloadRequires Restart
Runtime adaptive scalar valuesnoyes
TLS certificate file contents at the same configured pathsyes, after asset validation
Auth user file contents at the same configured pathyes, after asset validation
Listener addressnoyes
Backend address or route listnoyes
Capacity limitsnoyes
Admin listener confignoyes
Metrics listener confignoyes
TLS mode or backend TLS modenoyes
Auth mode or backend credential variable namenoyes
Health listener confignoyes
Socket optionsnoyes
Policy/sharding runtime confignot part of the main runtime confignot supported as live traffic config

Rejected reloads leave the active config running and increment the config reload metric with outcome="rejected".

Rollout And Rollback

Use ordinary Kubernetes Deployment rollout controls:

kubectl rollout status deployment/pg-kinetic
kubectl rollout undo deployment/pg-kinetic

Rollback triggers:

  • /readyz stays 503
  • application connection errors increase after the Service points to pg-kinetic
  • admin or metrics endpoints expose unexpected capacity, timeout, or backend health state
  • client drivers hit unsupported protocol or session-state behavior

Operator Status

The repository ships a Helm chart, not a Kubernetes operator. There are no CRDs, controller-managed failover, automatic resharding, or operator-managed config reconciliation.