Module bootstrap

Module bootstrap 

Source
Expand description

Bootstrap logic for bindy bootstrap.

Applies all prerequisites to a Kubernetes cluster in order:

  1. Namespace (bindy-system by default, or --namespace)
  2. CRDs — generated from Rust types, always in sync with the operator
  3. ServiceAccount (bindy)
  4. ClusterRole (bindy-role) — operator permissions
  5. ClusterRole (bindy-admin-role) — admin/destructive permissions
  6. ClusterRoleBinding (bindy-rolebinding) — binds SA to operator role

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 the operator Deployment.
DEFAULT_NAMESPACE
Default namespace for the bindy operator deployment.
OPERATOR_DEPLOYMENT_NAME
Operator Deployment name.
OPERATOR_IMAGE_BASE
Container image registry and repository (without tag).
OPERATOR_ROLE_NAME
Operator ClusterRole name.
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: true and served: true.
build_deployment
Build the operator Deployment manifest.
build_namespace
Build the operator namespace object.
build_service_account
Build the bindy ServiceAccount in the given namespace.
parse_cluster_role
Parse a ClusterRole from embedded YAML.
run_bootstrap
Run the bootstrap process.