agents-sandbox-controller

by OpenKruise

Helm chartv0.6.0App v0.6.0

The Helm chart for Agents Sandbox Controller

About this chart

Agents Sandbox Controller v0.6.0

Installation

Server-side apply (SSA) is not supported by this chart. The sandbox-controller manages the template annotation on the mutating and validating webhook configurations at runtime under its own field manager (manager). Applying the chart with Kubernetes server-side apply competes for that same annotation and fails with a field-ownership conflict such as:

Apply failed with 1 conflict: conflict with "manager" using
admissionregistration.k8s.io/v1: .metadata.annotations.template

Disable server-side apply when using Helm. Do not pass --server-side to helm install / helm upgrade (Helm 3 uses client-side apply by default). If you use Helm 4 or another tool that applies with SSA by default, turn SSA off:

helm upgrade --install agents-sandbox-controller next \
  -n sandbox-system \
  --set image.registry=<your-registry>
  # do NOT add --server-side

Configuration Parameters

The following tables list the configurable parameters of the agents-sandbox-controller chart and their default values.

Common Parameters

ParameterDescriptionDefault
replicaCountNumber of sandbox-controller replicas2
image.registryRegistry prepended to every image in this chartdocker.io
image.repositorysandbox-controller image repositoryopenkruise/agent-sandbox-controller
image.tagsandbox-controller image tagv0.6.0
image.pullPolicyController image pull policyIfNotPresent
imagePullSecretsImage pull secrets list[]
namespace.nameNamespace name for deploymentsandbox-system
resources.limits.cpuController CPU resource limit2
resources.limits.memoryController memory resource limit4Gi
resources.requests.cpuController CPU resource request2
resources.requests.memoryController memory resource request4Gi
webhook.portWebhook service port9443
metrics.portMetrics service port (HTTPS with authn/authz delegation to kube-apiserver)8443
healthProbe.portHealth probe port8081
controller.featureGatesComma-separated --feature-gates key=value pairs (e.g. Foo=true,Bar=false); empty sets no flag""

Advanced Parameters

All remaining parameters are optional. Sensible defaults apply and most installs do not need to change them.

ParameterDescriptionDefault
controller.workers.sandboxWorkersConcurrent workers for the Sandbox reconciler200
controller.workers.sandboxsetWorkersConcurrent workers for the SandboxSet reconciler10
controller.workers.sandboxclaimWorkersConcurrent workers for the SandboxClaim reconciler200
controller.workers.sandboxupdateopsWorkersConcurrent workers for the SandboxUpdateOps reconciler5
controller.workers.poolautoscalerWorkersConcurrent workers for the PoolAutoscaler reconciler3
controller.workers.commitWorkersConcurrent workers for the Commit reconciler5
controller.clientQPSKubernetes API client QPS rate limit30000
controller.clientBurstKubernetes API client burst limit60000
metrics.rbac.createCreate a ClusterRole granting get on the /metrics nonResourceURL; bind it to your Prometheus / ARMS scraper ServiceAccounttrue
nameOverrideOverride Chart name""
fullnameOverrideOverride full name""
serviceAccount.createWhether to create ServiceAccounttrue
serviceAccount.automountWhether to automount ServiceAccount Tokentrue
serviceAccount.annotationsServiceAccount annotations{}
serviceAccount.nameServiceAccount name to use""
rbac.createWhether to create RBAC resourcestrue
podAnnotationsPod annotations{}
podLabelsPod labels{}
podSecurityContextPod security context{runAsNonRoot: true, seccompProfile: {type: RuntimeDefault}}
securityContextContainer security context{allowPrivilegeEscalation: false, capabilities: {drop: [ALL], add: [NET_BIND_SERVICE]}, readOnlyRootFilesystem: true}
nodeSelectorNode selector for Pod scheduling{}
tolerationsTolerations for Pod scheduling[]
affinityAffinity for Pod scheduling{}
agentRuntime.image.repositoryInjected agent-runtime sidecar image repositoryopenkruise/agent-runtime
agentRuntime.image.tagInjected agent-runtime sidecar image tagv0.3.0
agentRuntime.image.pullPolicyInjected agent-runtime sidecar image pull policyIfNotPresent
commitJob.image.repositoryImage repository of the Commit job podsopenkruise/commit-job
commitJob.image.tagImage tag of the Commit job podsv0.6.0
enableTLSMaster switch for cert-manager / trust-manager based TLS provisioning; when false nothing under templates/tls/ renders and the controller keeps plaintext runtime behaviorfalse
tls.createCACreate the shared root CA (selfSigned Issuer → CA Certificate → CA Issuer). The controller chart owns the CA; the sandbox-manager chart sets this to false and references the Issuer by nametrue
tls.selfSignedIssuerNameSelf-signed bootstrap Issuer namesandbox-selfsigned-issuer
tls.caCertificateNameCA Certificate resource namesandbox-ca
tls.caSecretNameSecret holding the CA key pair (tls.crt/tls.key); also the trust-manager Bundle source and the CA Issuer's signing materialsandbox-ca-key-pair
tls.signingIssuerNameCA Issuer name used to sign leaf certificatessandbox-signing-issuer
tls.caCommonNameCA certificate common namesandbox-ca
tls.caOrganizationCA certificate organizationopenkruise
tls.caDurationCA certificate lifetime87600h (10 years)
tls.certDurationLeaf certificate lifetime2160h (90 days)
tls.certRenewBeforeLeaf certificate renewal window360h (15 days)
tls.runtime.enabledIssue the runtime client/server certificates and activate the client-side TLS paths (--runtime-client-cert-dir plus the agent-runtime sidecar TLS env). Fails against an agent-runtime that does not serve TLS; requires enableTLSfalse
tls.runtimeClientCertNameController → agent-runtime client Certificate resource namesandbox-controller-runtime-client
tls.runtimeClientCertSecretNameController client certificate Secret namesandbox-controller-runtime-client-cert
tls.runtimeClientCommonNameController client certificate common namesystem:sandbox-controller-manager
tls.runtimeClientCertDirMount point for --runtime-client-cert-dir; the volume remaps tls.crt/tls.key/ca.crt to client.crt/client.key/ca.crt/etc/agent-runtime-client/certs
tls.agentRuntimeServerCertNameagent-runtime server Certificate resource namesandbox-agent-runtime-server
tls.agentRuntimeServerCertSecretNameagent-runtime server certificate Secret namesandbox-agent-runtime-server-certs
tls.agentRuntimeServerSANSAN the gateway/controller/manager use to reach the runtimeagentruntime.sandbox.agents.kruise.io
tls.bundle.enabledCreate the trust-manager Bundle distributing the CA as a ca.crt ConfigMaptrue
tls.bundle.nametrust-manager Bundle namesandbox-ca-bundle
tls.bundle.configMapKeyKey holding the CA in the distributed ConfigMapca.crt
tls.bundle.namespaceSelectorNamespace selector limiting where the CA ConfigMap is written; empty selects every namespace{}
agentio.trafficProxy.controlPlaneNamespaceNamespace containing the Agentio control planesandbox-system
agentio.trafficProxy.controlPlaneServiceAgentio control-plane Service nameagentiod
agentio.trafficProxy.xdsAddressExplicit XDS address; generated from service and namespace when empty""
agentio.trafficProxy.caAddressExplicit CA address; generated from service and namespace when empty""
agentio.trafficProxy.caCertConfigMapCA ConfigMap mounted in injected workload namespacesagentio-ca-root-cert
agentio.trafficProxy.clusterIdCluster identifier reported to the control planeKubernetes
agentio.trafficProxy.clusterDomainKubernetes service DNS domaincluster.local
agentio.trafficProxy.tokenAudienceProjected workload token audienceagentio-ca
agentio.trafficProxy.includeInboundPortsInbound ports captured by the traffic proxy*
agentio.trafficProxy.includeOutboundIPRangesOutbound IP ranges captured by the traffic proxy*
agentio.trafficProxy.includeOutboundPortsOutbound ports captured by the traffic proxy""
agentio.trafficProxy.excludeInboundPortsInbound ports excluded from capture""
agentio.trafficProxy.excludeOutboundIPRangesOutbound IP ranges excluded from capture""
agentio.trafficProxy.excludeOutboundPortsOutbound ports excluded from capture""
agentio.trafficProxy.enableFirewallRulesEnable traffic-proxy firewall rulestrue
agentio.trafficProxy.firewallBackendFirewall backend selectionauto
agentio.trafficProxy.imagePullPolicyTraffic-proxy image pull policyIfNotPresent
agentio.trafficProxy.healthProbeRewriteRewrite health probes for injected traffic proxiestrue
agentio.trafficProxy.dnsCaptureEnable DNS capturetrue
agentio.trafficProxy.image.registryInjected ztunnel image registry; empty inherits image.registry""
agentio.trafficProxy.image.repositoryInjected ztunnel image repositoryopenkruise/ztunnel
agentio.trafficProxy.image.tagInjected ztunnel image tag0.2.0
agentio.trafficProxy.image.digestOptional digest override; takes precedence over tag""
agentio.trafficProxy.initImage.registryInjected iptables init image registry; empty inherits image.registry""
agentio.trafficProxy.initImage.repositoryInjected iptables init image repositoryopenkruise/proxy-init
agentio.trafficProxy.initImage.tagInjected iptables init image tag0.2.0
agentio.trafficProxy.initImage.digestOptional digest override; takes precedence over tag""
agentio.trafficProxy.resourcesInjected ztunnel resourcesrequests: 100m/64Mi, limits: 200m/128Mi
agentio.trafficProxy.initResourcesInjected iptables init resourcesrequests: 100m/128Mi, limits: 1/1Gi

Image Registry

Images render as <registry>/<repository>:<tag> or, with a digest override, <registry>/<repository>@<digest>. The registry defaults to the chart-wide image.registry. The agentio images carry their own registry key, which overrides image.registry when non-empty.

The registry prefix is dropped when the first path segment of a repository already names a host (it contains a . or a :), so setting image.repository to myreg.io/openkruise/agent-sandbox-controller keeps working without also clearing image.registry.

The sandbox-injection-config ConfigMap is installed in the sandbox-controller release namespace. controlPlaneNamespace is independent, so the injected traffic proxy can connect to Agentio running in another namespace.

Agentio images use the fixed 0.2.0 tag by default; an optional digest overrides the tag.

Upgrade the traffic-proxy configuration together with the Agentio control plane and recreate workload Pods for the agentio-ca-root-cert trust bundle and agentio-ca token audience.

TLS Provisioning (cert-manager / trust-manager)

All TLS resources live under templates/tls/ and are gated by enableTLS (default false), which requires cert-manager and, for the CA Bundle, trust-manager to be installed in the cluster.

  • enableTLS=true provisions the shared root CA (tls.createCA), the trust-manager Bundle (tls.bundle.*) that distributes the CA as a ca.crt ConfigMap, and — in the sandbox-manager chart — the ingress certificate. These resources are inert against a plaintext runtime.
  • The root CA is owned by this chart. The sandbox-manager chart must be installed in the same namespace (one-Issuer topology) and references the tls.signingIssuerName Issuer created here with its own tls.createCA=false.
  • tls.runtime.enabled=true additionally issues the controller's runtime client certificate (--runtime-client-cert-dir) and the agent-runtime server certificate, and activates the agent-runtime sidecar TLS environment. Those paths fail against an agent-runtime that does not yet serve TLS, so enable this only once the agent-runtime image supports runtime TLS. Requires enableTLS, and must be set together with tls.runtime.enabled in the sandbox-manager chart for the full runtime path.

Agent Runtime Injection

The sandbox-injection-config ConfigMap also ships an agent-runtime entry. It is applied only to sandboxes that explicitly opt in by declaring the runtime in Sandbox.spec.runtimes:

apiVersion: agents.kruise.io/v1alpha1
kind: Sandbox
metadata:
  name: demo
spec:
  runtimes:
    - name: agent-runtime
  # ... pod template

When the runtime is declared, the controller injects:

  • A native sidecar container named agent-runtime, built from agentRuntime.image.repository, agentRuntime.image.tag and agentRuntime.image.pullPolicy. The default is the public image openkruise/agent-runtime:v0.3.0. The sidecar carries its own ENVD_DIR environment variable and mounts envd-volume at /mnt/envd.
  • ENVD_DIR, GODEBUG and POD_UID environment variables, the envd-volume (/mnt/envd) mount, and a postStart hook into the first busi

Deploy agents-sandbox-controller with OpenTenant

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