Skip to content

Commit e0aecb6

Browse files
committed
Added backend_config to backend class
1 parent ad6882a commit e0aecb6

File tree

1 file changed

+6
-2
lines changed
  • helm_values_manager/backends

1 file changed

+6
-2
lines changed

helm_values_manager/backends/base.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class ValueBackend(ABC):
2020
- Values are strings that may be encrypted depending on the backend
2121
"""
2222

23-
def __init__(self, auth_config: Dict[str, str]) -> None:
24-
"""Initialize the backend with authentication configuration.
23+
def __init__(self, auth_config: Dict[str, str], backend_config: Dict[str, str] = None) -> None:
24+
"""Initialize the backend with authentication and backend configuration.
2525
2626
Args:
2727
auth_config: Authentication configuration for the backend.
@@ -30,12 +30,16 @@ def __init__(self, auth_config: Dict[str, str]) -> None:
3030
- 'file': Use configuration file
3131
- 'direct': Use direct credentials
3232
- 'managed_identity': Use cloud managed identity
33+
backend_config: Optional backend-specific configuration.
34+
This can contain additional settings specific to the backend implementation.
35+
Defaults to None, which will be treated as an empty dict.
3336
3437
Raises:
3538
ValueError: If the auth_config is invalid
3639
"""
3740
self._validate_auth_config(auth_config)
3841
self.backend_type = self.__class__.__name__.lower().replace("backend", "")
42+
self._backend_config = backend_config or {}
3943

4044
def _validate_auth_config(self, auth_config: Dict[str, str]) -> None:
4145
"""Validate the authentication configuration.

0 commit comments

Comments
 (0)