Skip to main content

write_ca_material

Function write_ca_material 

Source
pub fn write_ca_material(
    dir: &Path,
    material: Option<&CaMaterial>,
) -> Result<(), CaMaterialError>
Expand description

Writes caproni’s CA cert/key into dir under the conventional tls.crt/tls.key filenames the builtin dev-CA overlay references.

When material is None – Undeploy and Status lack the cluster profile and so cannot load the CA – empty placeholder files are written instead. The secretGenerator inputs must exist for kustomize build to succeed, but their contents are irrelevant to a delete-by-name (Undeploy) or a build check (Status).

§Errors

Returns CaMaterialError::Write if writing either file fails.