Expand description
Bootstrap logic for bindy bootstrap.
§bindy bootstrap operator
Applies all operator prerequisites to a Kubernetes cluster in order:
- Namespace (
bindy-systemby default, or--namespace) - CRDs — generated from Rust types, always in sync with the operator
- ServiceAccount (
bindy) - ClusterRole (
bindy-role) — operator permissions - ClusterRole (
bindy-admin-role) — admin/destructive permissions - ClusterRoleBinding (
bindy-rolebinding) — binds SA to operator role - Deployment (
bindy) — the operator itself
§bindy bootstrap scout
Applies all scout prerequisites to a Kubernetes cluster in order:
- Namespace (
bindy-systemby default, or--namespace) - CRDs — same 12 CRDs as the operator (shared types)
- ServiceAccount (
bindy-scout) - ClusterRole (
bindy-scout) — scout cluster-scoped permissions - ClusterRoleBinding (
bindy-scout) — binds scout SA to scout ClusterRole - Role (
bindy-scout-writer) — namespaced ARecord write permissions - RoleBinding (
bindy-scout-writer) — binds scout SA to writer Role - Deployment (
bindy-scout) — the scout controller itself
§bindy bootstrap mc
Sets up remote access so a scout running on a child (workload) cluster can write
ARecords to the queen-ship (bindy) cluster. Run this command against the
queen-ship cluster (KUBECONFIG must point at it):
- ServiceAccount (
bindy-scout-remoteby default, or--service-account) — one SA per child cluster so access can be revoked independently - Role (
bindy-scout-remote) — namespaced ARecord CRUD + DNSZone read permissions on the queen-ship. A namespaced Role is sufficient because the scout watches DNSZones viaApi::namespaced(notApi::all) in the same target namespace. - RoleBinding (
bindy-scout-remote) — binds the SA to the namespaced Role - SA token Secret — a long-lived token for the SA
- Kubeconfig Secret (
bindy-scout-remote-remote-kubeconfig) — a ready-to-use kubeconfig for the SA, printed to stdout as YAML
The stdout output is applied to the child cluster where scout runs:
bindy bootstrap mc | kubectl --context=<child-cluster> apply -f -Then set BINDY_SCOUT_REMOTE_SECRET=bindy-scout-remote-kubeconfig on the
scout Deployment so it picks up the remote kubeconfig at startup.
Structs§
- Scout
Deployment Options - Configuration options for the Scout Deployment and bootstrap process.
Constants§
- BINDY_
ADMIN_ ROLE_ YAML - BINDY_
ROLE_ YAML - Embedded RBAC YAML files — compiled into the binary so bootstrap is self-contained.
- CLUSTER_
ROLE_ BINDING_ NAME - ClusterRoleBinding name.
- DEFAULT_
IMAGE_ TAG - Default image tag for operator and scout Deployments.
- DEFAULT_
NAMESPACE - Default namespace for the bindy operator deployment.
- DEFAULT_
SCOUT_ CLUSTER_ NAME - Default logical cluster name stamped on ARecord labels by the scout controller.
- MC_
DEFAULT_ SERVICE_ ACCOUNT_ NAME - Default ServiceAccount name created by
bootstrap mcon the queen-ship cluster. - OPERATOR_
DEPLOYMENT_ NAME - Operator Deployment name.
- OPERATOR_
IMAGE_ BASE - Container image registry and repository (without tag).
- OPERATOR_
ROLE_ NAME - Operator ClusterRole name.
- REMOTE_
KUBECONFIG_ SECRET_ SUFFIX - Suffix appended to the service account name when naming the remote kubeconfig Secret.
- REMOTE_
KUBECONFIG_ SECRET_ TYPE - Secret type for the kubeconfig Secret placed on a child (workload) cluster.
- SA_
TOKEN_ SECRET_ SUFFIX - Suffix appended to the service account name when naming the SA token Secret.
- SCOUT_
CLUSTER_ ROLE_ BINDING_ NAME - Scout ClusterRoleBinding name.
- SCOUT_
CLUSTER_ ROLE_ NAME - Scout ClusterRole name.
- SCOUT_
DEPLOYMENT_ NAME - Scout Deployment name.
- SCOUT_
SERVICE_ ACCOUNT_ NAME - Scout ServiceAccount name.
- SCOUT_
WRITER_ ROLE_ BINDING_ NAME - Scout namespaced RoleBinding name.
- SCOUT_
WRITER_ ROLE_ NAME - Scout namespaced Role name (ARecord write permissions).
- SERVICE_
ACCOUNT_ NAME - ServiceAccount name created for the operator.
Functions§
- build_
all_ crds - Build all 12 CRDs in the same order as
crdgen. - build_
cluster_ role_ binding - Build the ClusterRoleBinding that binds the bindy ServiceAccount to
bindy-role. - build_
crd - Build a single CRD from a Rust type, ensuring
storage: trueandserved: true. - build_
deployment - Build the operator Deployment manifest.
- build_
kubeconfig_ yaml - Build a kubeconfig YAML string for the given service account token.
- build_
mc_ kubeconfig_ secret - Build the
bindy.firestoned.io/remote-kubeconfigSecret containing the kubeconfig YAML. - build_
mc_ sa_ token_ secret - Build the
kubernetes.io/service-account-tokenSecret that triggers token generation. - build_
mc_ service_ account - Build the multi-cluster ServiceAccount on the queen-ship cluster.
- build_
mc_ writer_ role - Build the namespaced Role for the multi-cluster service account on the queen-ship.
- build_
mc_ writer_ role_ binding - Build the RoleBinding that binds the multi-cluster SA to its Role on the queen-ship.
- build_
namespace - Build the operator namespace object.
- build_
scout_ cluster_ role - Build the scout ClusterRole with cluster-scoped permissions.
- build_
scout_ cluster_ role_ binding - Build the ClusterRoleBinding that binds the scout ServiceAccount to the scout ClusterRole.
- build_
scout_ deployment - Build the scout Deployment manifest.
- build_
scout_ service_ account - Build the scout ServiceAccount in the given namespace.
- build_
scout_ writer_ role - Build the scout writer Role (namespaced ARecord write permissions).
- build_
scout_ writer_ role_ binding - Build the scout writer RoleBinding (binds scout SA to writer Role).
- build_
service_ account - Build the bindy ServiceAccount in the given namespace.
- parse_
cluster_ role - Parse a ClusterRole from embedded YAML.
- resolve_
image - Resolve the full container image reference for the bindy image.
- run_
bootstrap_ multi_ cluster - Run the multi-cluster bootstrap process (
bindy bootstrap multi-cluster). - run_
bootstrap_ operator - Run the operator bootstrap process (
bindy bootstrap operator). - run_
bootstrap_ scout - Run the scout bootstrap process (
bindy bootstrap scout). - run_
revoke_ multi_ cluster - Revoke all resources that
bootstrap mccreated for a given service account.