Factory#

class phalanx.factory.Factory(path)#

Bases: object

Factory to create Phalanx components.

Parameters:

path (Path) – Path to the root of the Phalanx configuration tree.

Methods Summary

create_application_service()

Create service for manipulating Phalanx applications.

create_config_storage()

Create storage layer for the Phalanx configuration.

create_environment_service()

Create service for manipulating Phalanx environments.

create_kubernetes_storage([context])

Create storage object for interacting with Kubernetes.

create_onepassword_storage()

Create storage object for interacting with 1Password.

create_phalanx_cluster_service(context)

Create a service for manipulating Kubernetes clusters directly.

create_secrets_service()

Create service for manipulating Phalanx secrets.

create_vault_service()

Create service for managing Vault tokens and policies.

Methods Documentation

create_application_service()#

Create service for manipulating Phalanx applications.

Returns:

Service for manipulating applications.

Return type:

ApplicationService

create_config_storage()#

Create storage layer for the Phalanx configuration.

Returns:

Storage service for loading the Phalanx configuration.

Return type:

ConfigStorage

create_environment_service()#

Create service for manipulating Phalanx environments.

Returns:

Service for manipulating environments.

Return type:

EnvironmentService

create_kubernetes_storage(context=None)#

Create storage object for interacting with Kubernetes.

Parameters:

context (Optional[str], default: None) – The Kubernetes context to pass to all kubectl commands. If this is None, then commands will be run against the current context in the kube config file.

Returns:

Storage object for interacting with Kubernetes.

Return type:

KubernetesStorage

create_onepassword_storage()#

Create storage object for interacting with 1Password.

Returns:

Storage object for interacting with 1Password.

Return type:

OnepasswordStorage

create_phalanx_cluster_service(context)#

Create a service for manipulating Kubernetes clusters directly.

Parameters:

context (str) – The Kubernetes context to pass to all kubectl commands.

Returns:

A service object for manipulating resources in a Phalanx cluster.

Return type:

PhalanxClusterService

create_secrets_service()#

Create service for manipulating Phalanx secrets.

Returns:

Service for manipulating secrets.

Return type:

SecretsService

create_vault_service()#

Create service for managing Vault tokens and policies.

Returns:

Service for managing Vault tokens and policies.

Return type:

VaultService