Secret
Secrets are used to inject sensitive information into tasks or image build context. Secrets can be mounted as environment variables or files.
Attributes
| Attribute | Type | Description |
|---|---|---|
| key | str | The name of the secret in the secret store. |
| group | Optional[str] = null | The group of the secret in the secret store. |
| mount | `pathlib.Path | None` = null |
| as_env_var | Optional[str] = null | The name of the environment variable that the secret should be mounted as. |
Constructor
Signature
def Secret(
key: str,
group: Optional[str] = None,
mount: pathlib.Path | None = None,
as_env_var: Optional[str] = None
)
Parameters
| Name | Type | Description |
|---|---|---|
| key | str | The name of the secret in the secret store. |
| group | Optional[str] = None | The group of the secret in the secret store. |
| mount | `pathlib.Path | None` = None |
| as_env_var | Optional[str] = None | The name of the environment variable that the secret should be mounted as. |
Methods
stable_hash()
@classmethod
def stable_hash() - > string
Deterministic, process-independent hash (as hex string).
Returns
| Type | Description |
|---|---|
string | A SHA-256 hex string representing the unique identity of the secret based on its key, group, mount, and environment variable name. |