RecoveryEnvironmentService#
- class phalanx.services.recovery_environment.RecoveryEnvironmentService(*, config_storage, argocd_storage, kubernetes_storage, helm_storage, vault_storage)#
Bases:
EnvironmentServicePhalanx environment operations only for use during cluster recovery.
- Parameters:
config_storage (
ConfigStorage)argocd_storage (
ArgoCDStorage)kubernetes_storage (
KubernetesStorage)helm_storage (
HelmStorage)vault_storage (
VaultStorage)
Methods Summary
List any ArgoCD applications except nublado-users.
start_recover(environment_name, ...[, ...])Recover a Phalanx environment to another cluster with existing PVs.
Methods Documentation
- list_argocd_apps_except_nublado_users(environment_name, vault_credentials)#
List any ArgoCD applications except nublado-users.
We don’t care about nublado-users because ArgoCD doesn’t provision any resources in it, and most functionality that uses this method expect there to be resources in the app.
- Parameters:
environment_name (
str)vault_credentials (
VaultCredentials)
- Return type:
- start_recover(environment_name, vault_credentials, git_branch=None)#
Recover a Phalanx environment to another cluster with existing PVs.
- Parameters:
environment_name (
str) – Environment to install.vault_credentials (
VaultCredentials) – Credentials to use for Vault access. These will be installed in the cluster as aSecretused by vault-secrets-operator.git_branch (
Optional[str], default:None) – Git branch to point Argo CD at. If not given, defaults to the current branch.
- Raises:
CommandFailedError – Raised if one of the underlying commands fails.
ValueError – Raised if
appOfAppsNameis not set in the environment configuration.VaultNotFoundError – Raised if a necessary secret was not found in Vault.
- Return type: