Agent Sandbox
v1alpha1 to v1beta1 Migration Guide
The v1alpha1 API was removed in v1.0.0.
If your cluster still has v1alpha1-serialized resources in etcd or if you are upgrading from v0.4.x / early v0.5.x releases, you cannot upgrade directly to v1.0.0 or later.
Migration Steps
- Upgrade to
v0.5.xfirst: Upgrade your installation to av0.5.xrelease. - Run the v0.5 migration: Follow the v0.5.x API migration guide to migrate all existing resources to
v1beta1and prune legacystoredVersions. - Pre-upgrade check: Before upgrading from
v0.5.xtov1.0.0, verify that every agent-sandbox CustomResourceDefinition reports onlyv1beta1instatus.storedVersions:Iffor crd in \ sandboxes.agents.x-k8s.io \ sandboxclaims.extensions.agents.x-k8s.io \ sandboxtemplates.extensions.agents.x-k8s.io \ sandboxwarmpools.extensions.agents.x-k8s.io; do printf '%s: ' "${crd}" kubectl get crd "${crd}" -o jsonpath='{.status.storedVersions}' printf '\n' donev1alpha1is still listed on any CRD, complete the v0.5 storage migration and CRD status prune first—otherwise the Kubernetes apiserver will reject the upgrade. - Upgrade to
v1.0.0: Once all four CRDs report only["v1beta1"], proceed with upgrading tov1.0.0or later.
Helm Upgrade Ordering
Helm does not upgrade CRDs in crds/ (see helm/README.md), so the order matters. Apply the CRDs before helm upgrade, otherwise the chart removes the webhook Service while the old CRDs still reference it for conversion.
After completing Migration Steps 1–3 above:
kubectl apply -f helm/crds/— installs the v1beta1-only CRDs and drops the conversion config.helm upgrade— now safe; removes the webhook Service, Role, and RoleBinding.- Delete the orphaned cert Secret (see Post-Upgrade Cleanup below).
Post-Upgrade Cleanup
When upgrading via kubectl apply -f k8s/ or sequential manifest application, Kubernetes does not automatically delete resources that have been removed from the newest release manifests. After upgrading to v1.0.0, four legacy webhook infrastructure objects from v0.5.x will remain in your cluster as orphans:
Service/agent-sandbox-webhook-serviceSecret/agent-sandbox-webhook-certsRole/agent-sandbox-controller(namespaced inagent-sandbox-system)RoleBinding/agent-sandbox-controller(namespaced inagent-sandbox-system)
To clean up these orphaned webhook resources, run:
kubectl delete -n agent-sandbox-system \
svc/agent-sandbox-webhook-service \
secret/agent-sandbox-webhook-certs \
role/agent-sandbox-controller \
rolebinding/agent-sandbox-controller \
--ignore-not-found
The cluster-scoped ClusterRole and ClusterRoleBinding named agent-sandbox-controller are still actively required by the running controller. Do not delete cluster-scoped roles; ensure the cleanup snippet above uses namespaced role/rolebinding within -n agent-sandbox-system.
Helm and OLM Users:
- Helm:
helm upgradeautomatically prunesService/agent-sandbox-webhook-service,Role/agent-sandbox-controller, andRoleBinding/agent-sandbox-controller. Helm users only need to deleteSecret/agent-sandbox-webhook-certs. - OLM: OLM automatically garbage-collects
Role/agent-sandbox-controllerandRoleBinding/agent-sandbox-controlleron CSV replacement. However, bothService/agent-sandbox-webhook-serviceandSecret/agent-sandbox-webhook-certsremain and must be deleted manually. - All users (kubectl, Helm, OLM) can safely run the 4-resource
kubectl deletecleanup command above with--ignore-not-found. (See OLM Installation Guide for OLM-specific instructions).