krci-substrate
by sergk
A Helm chart for upstream Agent Substrate, matching the upstream ate-setup install
About this chart
krci-substrate
A Helm chart for upstream Agent Substrate, matching the upstream ate-setup install
Homepage: https://docs.kuberocketci.io/
Introduction
The chart installs objects of Agent Substrate release v1.0.1. The chart version and appVersion are the chart release.
Each chart object copied from upstream equals its reference install object: what upstream ate-setup deploy ate-system applies for that release, with the envoy dataplane on a non-kind cluster. Exceptions: Deviations from the reference install.
Objects copied from the upstream manifests of the release tag:
| Chart path | Upstream path |
|---|---|
crds/ate.dev_*.yaml | manifests/ate-install/generated/ate.dev_*.yaml, byte for byte |
templates/namespaces.yaml | manifests/ate-install/ate-system-namespace.yaml, the Namespace of manifests/ate-install/pod-certificate-controller.yaml |
templates/podcertificate-controller/serviceaccount.yaml | the ServiceAccount of manifests/ate-install/pod-certificate-controller.yaml |
templates/podcertificate-controller/rbac.yaml | the ClusterRole, ClusterRoleBinding, Role and RoleBinding of manifests/ate-install/pod-certificate-controller.yaml |
templates/podcertificate-controller/deployment.yaml | the Deployment of manifests/ate-install/pod-certificate-controller.yaml; image podcertificateController.image (<repository>:<tag>@<digest>) and --preview=, as the reference install has them |
templates/postgres/ | ConfigMap postgres-config, Service and StatefulSet of manifests/ate-install/postgres/postgres.yaml |
templates/ate-api-server/ | ClusterRole, ServiceAccount, ClusterRoleBinding, Deployment, PodDisruptionBudget and Service api of manifests/ate-install/ate-api-server.yaml |
templates/ate-idp-server/ | ServiceAccount, Deployment, PodDisruptionBudget and Service idp of manifests/ate-install/ate-idp-server.yaml |
templates/ate-controller/ | ServiceAccounts ate-client, ate-controller, the bindings, Service and Deployment of manifests/ate-install/ate-controller.yaml; ClusterRole and Role of manifests/ate-install/generated/role.yaml |
templates/networkpolicies.yaml | manifests/ate-install/ate-system-networkpolicies.yaml |
templates/ate-otel-config.yaml | manifests/ate-install/ate-otel-config.yaml |
templates/sandboxconfig/gvisor.yaml | manifests/ate-install/sandboxconfig-gvisor.yaml |
templates/sandboxconfig/validation.yaml | manifests/ate-install/sandboxconfig-validation.yaml |
templates/atelet/ | ServiceAccount, ClusterRole, ClusterRoleBinding, Role, RoleBinding, ResourceQuota and DaemonSet of manifests/ate-install/atelet.yaml |
templates/atenet-router/ | ServiceAccount, Role, RoleBinding, ConfigMap, Deployment and Service of manifests/ate-install/atenet-router.yaml |
templates/atenet-egress/ | ServiceAccount, ConfigMap, Deployment and Service of manifests/ate-install/atenet-egress.yaml |
templates/k8s-credential-provider/ | manifests/egress-credential-injection/k8s-credential-provider.yaml, manifests/egress-credential-injection/namespace-policy.yaml |
files/postgres/setup.sql | pkg/postgressetup/setup.sql, byte for byte |
files/atenet-egress/envoy.yaml | key envoy.yaml of ConfigMap atenet-egress in manifests/ate-install/atenet-egress.yaml, byte for byte |
Reference install changes in every substrate workload: image <service>.image (<repository>:<tag>@<digest>), --preview= appended. ate-api-server: --authz-bootstrap-owners appended, pod template annotation ate.dev/env-hash. ate-idp-server: --issuer=https://idp.ate-system.svc appended.
Reference install settings of the dataplane: envoy (--atenet-dataplane=envoy), image envoy-dataplane in place of ${ENVOY_DATAPLANE_IMAGE}. Credential provider {"name":"k8s.io"}: k8s-credential-provider deployed; on the atenet-egress ext-proc container, the --credential-provider-* flags in place of the #ATE_EGRESS_INJECT_FLAGS marker, server name k8s-credential-provider.ate-system.svc. atenet-router: --ingress-allowed-spiffe-ids appended when router.ingressAllowedSpiffeIds is not empty. Sandbox classes: gvisor only (--sandbox-classes=gvisor).
Upstream objects not in the chart:
manifests/ate-install/atenet-router-monitoring.yaml: PodMonitoringatenet-router-envoy, GKE Managed Prometheus only.manifests/egress-credential-injection/sample-secret.yaml: example;ate-setupdoes not apply it.manifests/ate-install/sandboxconfig-microvm.yaml.tmpl: microvm sandbox class; needs/dev/kvmand staged guest assets.
Install order
Argo CD sync waves, annotation argocd.argoproj.io/sync-wave on every chart object (templates/_helpers.tpl, krci-substrate.syncWave). Argo CD applies a wave after the objects of the earlier waves are healthy.
| Wave | Objects |
|---|---|
0 | CRDs (crds/, no annotation), Namespaces, ConfigMap ate-otel-config, NetworkPolicies, ValidatingAdmissionPolicy sandboxconfig-assets |
1 | PKI (templates/pki/), podcertificate-controller, SandboxConfig gvisor-default |
2 | PostgreSQL, atelet |
3 | ate-api-server, ate-idp-server, ate-controller, k8s-credential-provider, atenet-router, atenet-egress |
atelet rolls out before ate-api-server on every sync. Helm without Argo CD ignores the waves.
Chart objects without an upstream manifest:
templates/pki/: the cert-manager and ESO objects of the pool Secrets. The pool list:templates/pki/_pools.tpl.templates/ate-api-server/config.yaml: the objectsate-setupwrites for ate-api-server, bundled PostgreSQL: ConfigMapsate-api-server-envvars,ate-api-config,ate-api-authentication, Secretate-api-server-secret-envvars.templates/postgres/configmap.yaml, ConfigMappostgres-setup: the setup SQL run ofate-setup.
Deviations from the reference install
| Object | Reference install | Chart | Reason |
|---|---|---|---|
ate-api-server, sidecar objectstore-plugin | GCS (ATE_STORAGE_BACKEND=gcs, ambient Google credentials) | S3: ATE_STORAGE_BACKEND=s3, AWS_REGION, optional AWS_ENDPOINT_URL, AWS_S3_USE_PATH_STYLE; AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY only from snapshots.s3.credentialsSecret | Target clusters are EKS and kind. Production: no Secret; AWS SDK default chain with EKS Pod Identity or IRSA. The Secret is for the kind test bed or an S3-compatible store with no workload identity. |
ServiceAccount ate-api-server | no annotations | apiServer.serviceAccount.annotations | IRSA needs eks.amazonaws.com/role-arn on the ServiceAccount. Default: no annotations. |
ConfigMap ate-api-server-envvars | ATE_API_SNAPSHOT_LOCATION from --snapshot-location | s3://<snapshots.s3.bucket>/<snapshots.s3.prefix>/; empty prefix: s3://<snapshots.s3.bucket>/ | S3 bucket. The S3 backend reads the bucket from the URI host. The prefix scopes the IAM policies to one cluster. |
ConfigMap ate-api-authentication | issuer from GKE coordinates or cluster OIDC discovery | apiServer.serviceAccountIssuer | A chart cannot query the cluster. EKS: the cluster OIDC issuer URL. |
ConfigMap ate-otel-config | OTEL_EXPORTER_OTLP_ENDPOINT of the GKE managed collector | no endpoint; OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, ATE_WORKER_OTEL_TRACES_EXPORTER, ATE_WORKER_OTEL_METRICS_EXPORTER: none | No collector on the target clusters yet. Logs stay on stdout. |
StatefulSet postgres | ate-setup runs the setup SQL with kubectl exec after each rollout | the image entrypoint runs it from /docker-entrypoint-initdb.d, on an empty data directory only | No exec under GitOps. An existing volume keeps its roles and schema. |
StatefulSet postgres, postStart hook | waits for the Unix socket, then creates atepg when absent | waits for TCP 127.0.0.1:5432 first | The init server of the image is socket-only. A hook during init races the entrypoint CREATE DATABASE; a failed hook kills the container before the setup SQL runs, and the restart skips it. |
StatefulSet postgres | base size: resources and 500Gi claim; StorageClass from --postgres-storage-class | postgres.resources, postgres.storage | Default is the base size. Kind: the upstream kind overlay values. |
| Every chart object | no Argo CD annotations | argocd.argoproj.io/sync-wave | Install order under Argo CD: Install order. |
DaemonSet atelet, sidecar objectstore-plugin | GCS (ATE_STORAGE_BACKEND=gcs, ambient Google credentials) | S3, same environment as the ate-api-server sidecar | Same as ate-api-server. |
ServiceAccount atelet | no annotations | atelet.serviceAccount.annotations | IRSA, same as ate-api-server. |
DaemonSet atelet, image credential provider | GKE host paths /home/kubernetes/bin, /etc/srv/kubernetes/cri_auth_config.yaml | atelet.imageCredentialProvider: host paths; enabled: false drops the two flags and mounts, as the upstream kind overlay does | Host paths differ per node distribution (EKS: /etc/eks/image-credential-provider). Default: the GKE paths. |
Deployments atenet-router, atenet-egress, pod template | atenet-router: annotations prometheus.io/scrape, prometheus.io/port; atenet-egress: no annotations. ate-setup restarts atenet-egress after each deploy with a credential provider | annotation checksum/config added, the sha256 of the rendered ConfigMap | Envoy reads its configuration at start only. A ConfigMap change rolls the Deployment. |
Deployments atenet-router, atenet-egress | replicas: 1 | router.replicas, egress.replicas | Default: 1. |
ConfigMap k8s-credential-provider-namespace-policy | applied only when absent, policies: []; the operator edits it in the cluster | policies from credentialProvider.namespacePolicies; the chart owns the ConfigMap | GitOps: the policy lives in values. Default: [], same render. |
Deployment k8s-credential-provider, pod template | no annotations | annotation checksum/namespace-policy | The provider reads the policy at start only. A policy change rolls the Deployment. |
Deployment atenet-egress, egress.upstreamCA set | upstream TLS trusts the image system roots /etc/ssl/certs/ca-certificates.crt | ConfigMap atenet-egress-upstream-ca; init container upstream-ca-bundle (envoy image) writes system roots plus egress.upstreamCA to an emptyDir; clusters egress_forward_proxy and egress_forward_proxy_grpc trust that file | Origins behind a private CA. Default: empty, same render as the reference install. |
S3 access
Every pod with an objectstore-plugin sidecar reads and writes the snapshot bucket with its own credentials. ate-api-server does not pass credentials to other pods.
| Pod | Sidecar mode | S3 use | ServiceAccount |
|---|---|---|---|
| ate-api-server | control | copies snapshots for tags; deletes snapshots nothing refers to | ate-system/ate-api-server |
| atelet | node | uploads and downloads snapshot files; reads sandbox assets | ate-system/atelet |
- Give S3 access to both ServiceAccounts: one EKS Pod Identity association each, or the IRSA annotation
eks.amazonaws.com/role-arnin<service>.serviceAccount.annotations. IAM roles, policies and associations: EKS. - Objects:
<snapshots.s3.prefix>/atespaces/...; empty prefix:atespaces/.... snapshots.s3is the shared S3 environment of both sidecars,snapshots.s3.credentialsSecretincluded.- No other pod uses object storage: ate-idp-server, ate-controller, atenet, worker pods.
Values
One top-level key per service. A value exists only for a setting that changes often or that a known requirement needs. All other fields are fixed in the templates, as the reference install has them.
| Key | Service | Values |
|---|---|---|
podcertificateController | podcertificate-controller | image, replicas |
postgres | bundled PostgreSQL (one replica) | image, resources, storage |
apiServer | ate-api-server, sidecar objectstorePlugin | image, replicas, serviceAccountIssuer, bootstrapOwners, serviceAccount.annotations, objectstorePlugin.image |
idpServer | ate-idp-server | image, replicas |
controller | ate-controller | image, replicas |
atelet | atelet, sidecar objectstorePlugin | image, serviceAccount.annotations, objectstorePlugin.image, imageCredentialProvider |
router | atenet-router, container envoy | image, envoy.image, replicas, ingressAllowedSpiffeIds |
egress | atenet-egress, containers sdsmint, ext-proc, envoy | image, envoy.image, replicas, upstreamCA |
credentialProvider | k8s-credential-provider | image, namespacePolicies |
Shared keys: snapshots.s3 (every objectstore-plugin sidecar), pki (pool Secrets).
Defaults are the reference install.
Control plane
-
PostgreSQL logins:
substrate_owner_userandsubstrate_readwrite_user, client certificates from signerpostgres.podcert.ate.dev/identity(pg_hba.confcert). No role has a password. -
The setup SQL runs at database init only (ADR-0002). If the first init fails, the data directory stays without roles or schema, and ate-api-server cannot log in. Recovery: run the setup again; it is idempotent and keeps data:
kubectl -n ate-system exec postgres-0 -c postgres -- sh /docker-entrypoint-initdb.d/substrate-setup.sh -
ate-api-server reaches the database at
postgres.ate-system.svc:5432,sslmode=verify-full. -
kubectl ateport-forwards to Serviceate-system/apiand mints a token fo
Deploy krci-substrate with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has krci-substrate 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 chartkrci-substrate is pinned at v0.5.0 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