RecoveryEnvironmentService#

class phalanx.services.recovery_environment.RecoveryEnvironmentService(*, config_storage, argocd_storage, kubernetes_storage, helm_storage, vault_storage)#

Bases: EnvironmentService

Phalanx environment operations only for use during cluster recovery.

Parameters:

Methods Summary

list_argocd_apps_except_nublado_users(...)

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:
Return type:

ApplicationList

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 a Secret used 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 appOfAppsName is not set in the environment configuration.

  • VaultNotFoundError – Raised if a necessary secret was not found in Vault.

Return type:

None