diff --git a/fireconfig/env.py b/fireconfig/env.py index 9d20d80..16125ac 100644 --- a/fireconfig/env.py +++ b/fireconfig/env.py @@ -17,6 +17,10 @@ def with_field_ref(self, name: str, field: DownwardAPIField, key: T.Optional[str self._env[name] = ("valueFrom", {"fieldRef": {"fieldPath": field_str}}) return self + def with_secret(self, name: str, secret_name: str, secret_key_name: str) -> T.Self: + self._env[name] = ("valueFrom", {"secretKeyRef": {"name": secret_name, "key": secret_key_name}}) + return self + def build(self, names: T.Optional[T.Union[T.Sequence[str], T.KeysView[str]]] = None) -> T.Sequence[T.Mapping]: if names is None: names = self._env.keys() diff --git a/pyproject.toml b/pyproject.toml index 39bec30..f25b6a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireconfig" -version = "0.5.0" +version = "0.5.1" description = "Configuration language for Kubernetes manifests" authors = ["David Morrison "] license = "MIT"