build_tokenreview_cluster_role_binding

Function build_tokenreview_cluster_role_binding 

Source
pub fn build_tokenreview_cluster_role_binding(
    namespace: &str,
) -> Result<ClusterRoleBinding>
Expand description

Build the TokenReview ClusterRoleBinding for the requested install namespace.

Parses the embedded manifest (BINDCAR_TOKENREVIEW_CLUSTER_ROLE_BINDING_YAML) and rewrites every subject’s namespace to namespace. The static manifest hardcodes bindy-system, but bindy bootstrap operator --namespace foo creates the operand bind9 ServiceAccount in foo, so the binding must follow the requested namespace or bindcar’s TokenReview calls are denied.

§Arguments

  • namespace - Namespace the operator (and operand bind9 SA) is installed into

§Errors

Returns an error if the embedded YAML fails to parse or has no subjects.