Author: Nick Santos
Helper functions for creating Kubernetes configmaps.
configmap_yaml(name: str, namespace: str = "", from_file: Union[str, List[str]] = None, watch: bool = True, from_env_file: str = None): Blob
Returns YAML for a config map generated from a file.
from_file
( str ) – equivalent tokubectl create configmap --from-file
from_env_file
(str) - equivalent tokubectl create configmap --from-env-file
watch
( bool ) - auto-reload if the files change
configmap_create(name: str, namespace: str = "", from_file: Union[str, List[str]] = None, watch: bool = True, from_env_file: str = None)
Deploys a config map. Equivalent to
k8s_yaml(configmap_yaml('name', from_file=[...]))
configmap_from_dict(name: str, namespace: str = "", inputs: Dict[str, str]] = None): Blob
Returns YAML for a config map generated from a given dictionary. Nested dictionaries are not supported
inputs
( dict ) – equivalent tokubectl create configmap --from-literal
for each key and value
load('ext://configmap', 'configmap_create')
configmap_create('grafana-config', from_file=['grafana.ini=./grafana.ini'])
- This extension doesn't do any validation to confirm that names or namespaces are valid.