Environment#
- pydantic model phalanx.models.environments.Environment#
A Phalanx environment and its associated settings.
- Parameters:
data (
Any
) โ
Show JSON schema
{ "title": "Environment", "description": "A Phalanx environment and its associated settings.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "fqdn": { "title": "Fqdn", "type": "string" }, "onepassword": { "$ref": "#/definitions/OnepasswordConfig" }, "vaultUrl": { "title": "Vaulturl", "type": "string" }, "vaultPathPrefix": { "title": "Vaultpathprefix", "type": "string" }, "applications": { "title": "Applications", "type": "object", "additionalProperties": { "$ref": "#/definitions/ApplicationInstance" } } }, "required": [ "name", "fqdn", "vaultUrl", "vaultPathPrefix", "applications" ], "definitions": { "OnepasswordConfig": { "title": "OnepasswordConfig", "description": "Configuration for 1Password static secrets source.", "type": "object", "properties": { "connectUrl": { "title": "Connecturl", "minLength": 1, "maxLength": 65536, "format": "uri", "type": "string" }, "vaultTitle": { "title": "Vaulttitle", "type": "string" } }, "required": [ "connectUrl", "vaultTitle" ] }, "SecretCopyRules": { "title": "SecretCopyRules", "description": "Rules for copying a secret value from another secret.", "type": "object", "properties": { "application": { "title": "Application", "type": "string" }, "key": { "title": "Key", "type": "string" } }, "required": [ "application", "key" ], "additionalProperties": false }, "SimpleSecretGenerateRules": { "title": "SimpleSecretGenerateRules", "description": "Rules for generating a secret value with no source information.", "type": "object", "properties": { "type": { "title": "Type", "enum": [ "password", "gafaelfawr-token", "fernet-key", "rsa-private-key" ], "type": "string" } }, "required": [ "type" ], "additionalProperties": false }, "SourceSecretGenerateRules": { "title": "SourceSecretGenerateRules", "description": "Rules for generating a secret from another secret.", "type": "object", "properties": { "type": { "title": "Type", "enum": [ "bcrypt-password-hash", "mtime" ], "type": "string" }, "source": { "title": "Source", "type": "string" } }, "required": [ "type", "source" ] }, "Secret": { "title": "Secret", "description": "Specification for an application secret for a specific environment.\n\nThe same as `SecretConfig` except augmented with the secret application\nand key for internal convenience.", "type": "object", "properties": { "description": { "title": "Description", "type": "string" }, "copy": { "title": "Copy", "description": "Rules for where the secret should be copied from", "allOf": [ { "$ref": "#/definitions/SecretCopyRules" } ] }, "generate": { "title": "Generate", "anyOf": [ { "$ref": "#/definitions/SimpleSecretGenerateRules" }, { "$ref": "#/definitions/SourceSecretGenerateRules" } ] }, "value": { "title": "Value", "type": "string", "writeOnly": true, "format": "password" }, "key": { "title": "Key", "type": "string" }, "application": { "title": "Application", "type": "string" } }, "required": [ "description", "key", "application" ], "additionalProperties": false }, "ApplicationInstance": { "title": "ApplicationInstance", "description": "A Phalanx application as configured for a specific environment.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "environment": { "title": "Environment", "type": "string" }, "chart": { "title": "Chart", "type": "object" }, "values": { "title": "Values", "type": "object" }, "secrets": { "title": "Secrets", "default": [], "type": "array", "items": { "$ref": "#/definitions/Secret" } } }, "required": [ "name", "environment", "chart", "values" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
_validate_onepassword
ยปonepassword
-
field applications:
dict
[str
,ApplicationInstance
] [Required]# Applications enabled for that environment, by name.
-
field onepassword:
Optional
[OnepasswordConfig
] = None# Configuration for using 1Password as a static secrets source.
- Validated by:
_validate_onepassword
-
field vault_path_prefix:
str
[Required] (alias 'vaultPathPrefix')# Prefix of Vault paths, including the Kv2 mount point.
- all_applications()#
Return all enabled applications in sorted order.
- Return type:
- dict(**kwargs)#
Export the model as a dictionary.
Overridden to change the default of
by_alias
from False to True, so that by default the exported dictionary uses camel-case.
- json(**kwargs)#
Export the model as JSON.
Overridden to change the default of
by_alias
from False to True, so that by default the exported dictionary uses camel-case.