devops_utils.core.sanitizer module

Sanitize Kubernetes manifests by masking Secret values.

devops_utils.core.sanitizer.dump_yaml(data, filename: str, force: bool, debug: bool) → None[source]

Serialize data to filename (- for stdout).

devops_utils.core.sanitizer.load_file(filename: str, debug: bool = False) → str[source]

Read a file and return its contents.

encoding is pinned rather than left to the locale: manifests are UTF-8, and the platform default is the ANSI code page on Windows.

devops_utils.core.sanitizer.sanitize(data, debug: bool = False)[source]

Mask data/stringData values of every Kubernetes Secret document.