Skip to main content

Controller Configuration

This guide covers the configuration options for the Stratos controller.

Helm Values

When deploying with Helm, configuration is passed via --set flags or a values file:

helm install stratos oci://ghcr.io/stratos-sh/charts/stratos \
--namespace stratos-system --create-namespace \
--set clusterName=my-cluster \
--set syncPeriod=60s \
--set cloudProvider=aws

Or with a values file:

values.yaml
clusterName: my-cluster
cloudProvider: aws
syncPeriod: "60s"
leaderElect: true

image:
repository: ghcr.io/stratos-sh/stratos
pullPolicy: IfNotPresent

replicaCount: 1

serviceAccount:
create: true
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/stratos-controller-role

resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi

extraEnv: []
extraArgs: []
helm install stratos oci://ghcr.io/stratos-sh/charts/stratos \
--namespace stratos-system --create-namespace \
-f values.yaml

Controller Flags

The Stratos controller accepts the following command-line flags. When using Helm, most of these are configured via Helm values (shown in parentheses):

FlagHelm ValueDefaultDescription
--cluster-nameclusterName""Kubernetes cluster name. Used for cloud instance tagging. Required.
--cloud-providercloudProviderawsCloud provider to use: aws or fake.
--sync-periodsyncPeriod30sMinimum interval for reconciliation.
--leader-electleaderElecttrueEnable leader election for HA.
--metrics-bind-addressmetricsBindAddress:8080Address for the metrics endpoint.
--health-probe-bind-addresshealthProbeBindAddress:8081Address for health probe endpoints.

Additional flags can be passed via the extraArgs Helm value.

Zap Logger Flags

The controller uses the Zap logger with these additional flags:

FlagDefaultDescription
--zap-develtrueDevelopment mode (human-readable output).
--zap-log-levelinfoLog level: debug, info, error.
--zap-encoderconsoleLog encoder: console or json.
--zap-stacktrace-levelerrorLevel at which to print stack traces.

To set logger flags via Helm:

helm install stratos oci://ghcr.io/stratos-sh/charts/stratos \
--namespace stratos-system --create-namespace \
--set clusterName=my-cluster \
--set extraArgs[0]=--zap-encoder=json \
--set extraArgs[1]=--zap-devel=false \
--set extraArgs[2]=--zap-log-level=info

Production Configuration

For production environments, use JSON logging and IRSA:

values-production.yaml
clusterName: production
cloudProvider: aws
leaderElect: true

serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/stratos-controller-role

resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi

extraArgs:
- --zap-encoder=json
- --zap-devel=false
- --zap-log-level=info
helm install stratos oci://ghcr.io/stratos-sh/charts/stratos \
--namespace stratos-system --create-namespace \
-f values-production.yaml

Health Checks

The controller exposes health endpoints:

EndpointPortDescription
/healthz8081Liveness probe - is the controller running
/readyz8081Readiness probe - is the controller ready to serve

These are configured automatically by the Helm chart.

Metrics

Prometheus metrics are exposed at :8080/metrics. See Monitoring for details.

Environment Variables

VariableDescription
CLUSTER_NAMEAlternative to --cluster-name flag
AWS_REGIONDefault AWS region (can be overridden per NodePool)
AWS_ACCESS_KEY_IDAWS access key (prefer IRSA instead)
AWS_SECRET_ACCESS_KEYAWS secret key (prefer IRSA instead)

Environment variables can be passed via the extraEnv Helm value.

Next Steps