# Functions
CheckStateAllContainersAreReady checks that all containers found in the state are Ready.
CheckStateAllPodContainersAreReady takes a pod name and asserts that all of its containers are ready.
CheckStateAllPodsHavePhase takes a phase and asserts that all of the pods match the phase.
CheckStateAutopilotHasLeader checks whether or not the cluster has a raft leader.
CheckStateAutopilotIsHealthy checks whether or not the autopilot is in a healthy state.
CheckStateHasEnableUIInConfig checks whether or not the vault cluster has been configured to enable the UI.
CheckStateHasHAActiveNode checks whether or not the vault cluster has an active HA node.
CheckStateHasHealthStatusOf takes one-or-more health statuses and checks whether or not the node has one of the health status.
CheckStateHasMatchingListenerInConfig checks whether or not the vault cluster has been configured with a matching listener.
CheckStateHasMinNAutopilotHealthyNodes checks whether or not the cluster has a minimum of N autopilot healthy nodes.
CheckStateHasMinNAutopilotServers checks whether or not the cluster has a minimum of N autopilot servers.
CheckStateHasMinNAutopilotVoters checks whether or not the cluster has a minimum of N autopilot voters.
CheckStateHasMinNHANodes checks whether or not the cluster has a minimum of N nodes.
CheckStateHasMinNRaftServers checks whether or not the cluster has a minimum of N raft servers.
CheckStateHasMinNRaftVoters checks whether or not the cluster has a minimum of N raft voters.
CheckStateHasRaftLeader checks whether or not the cluster has a raft leader.
CheckStateHasSealType checks whether or not the node has the given seal type.
CheckStateHasStatusCode checks that the vault status code matches the given code.
CheckStateHasStorageType checks whether or not the node has the given storage type.
CheckStateHasSystemdEnabledAndRunningProperties checks that the vault systemd service has all of the properties and values we expect for a service to be running.
CheckStateIsInitialized checks whether or not vault is initialized.
CheckStateIsSealed checks whether or not the Vault node is sealed.
CheckStateIsUnsealed checks whether or not the Vault node is unsealed.
CheckStatePodContainerIsReady takes a pod name, a container name and asserts that the container is ready.
CheckStatePodHasPhase takes a pod name and a phase and asserts that the pod has the expected phase.
CheckStateSealStateIsKnown checks whether or not the Vault node has a valid seal state.
GetConfigStateSanitized returns a sanitized version of the configuration state.
GetHAStatus returns the vault HA status.
GetHealth returns the vault node health.
GetHostInfo returns the vault host info.
GetRaftAutopilotConfiguration returns raft autopilot configuration.
GetRaftAutopilotState returns the raft autopilot state.
GetRaftConfiguration returns the vault raft configuration.
GetReplicationStatus returns the vault node status.
GetSealStatus returns the vault node seal status.
GetState attempts to get the state of the vault cluster and the target node.
GetStatus returns the vault node status.
Init initializes a vault cluster.
NewConfigStateSanitizedResponse returns a new instance of ConfigStateSanitizedResponse.
NewHAStatusResponse returns a new instance of HAStatusResponse.
NewHealthRequest takes functional options and returns a new request.
NewHealthResponse returns a new instance of NewHealthResponse.
NewHostInfoResponse returns a new instance of HostInfoResponse.
NewInitRequest takes functional options and returns a new systemd unit request.
NewRaftAutopilotConfigurationResponse returns a new instance of RaftAutopilotConfigurationResponse.
NewRaftAutopilotStateResponse returns a new instance of RaftAutopilotStateResponse.
NewRaftConfigurationResponse returns a new instance of RaftConfigurationResponse.
NewReplicationDataStatus returns a new instance of ReplicationDataStatus.
NewReplicationRequest takes functional options and returns a new replication request.
NewReplicationResponse returns a new instance of ReplicationResponse.
NewSealStatusRequest takes functional options and returns a new request.
NewSealStatusResponse returns a new instance of SealStatusResponse.
NewSetLegacyLicenseRequest takes functional options and returns a new systemd unit request.
NewState returns a new instance of Vault's state.
NewStateRequest takes functional options and returns a new systemd unit request.
NewStatusResponse returns a new instance of StatusResponse.
NewUnsealRequest takes functional options and returns a new unseal request.
SetLegacyLicense sets the vault license using the /sys/license endpoint.
Unseal checks the current steal status, and if needed unseals the Vault in different ways depending on seal type.
Version takes a context, transport, and path to the vault binary on a remote machine and returns the version.
WaitForState waits until the vault cluster node state satisfies all of the provided checks.
WithHealthFlightControlPath sets the path to flightcontrol.
WithHealthRequestVaultAddr sets vault address.
WithInitRequestConsulAuto enables consul service discovery mode.
WithInitRequestConsulService sets the service name for consul service discovery mode.
WithInitRequestKeyShares sets the init request key shares.
WithInitRequestKeyThreshold sets the init key request threshold.
WithInitRequestPGPKeys sets the init pgp keys.
WithInitRequestRecoveryPGPKeys sets the recovery pgp keys.
WithInitRequestRecoveryShares sets the init recovery shares.
WithInitRequestRecoveryThreshold sets the init recovery threshold.
WithInitRequestRootTokenPGPKey sets the root token pgp key.
WithInitRequestStateRequestOpts sets the options for the state request.
WithInitRequestStoredShares sets the request stored shares.
WithReplicationRequestBinPath sets the vault binary path.
WithReplicationRequestVaultAddr sets the vault address.
WithSealStatusFlightControlPath sets the path to flightcontrol.
WithSealStatusRequestVaultAddr sets vault address.
WithSetLegacyLicenseRequestBinPath sets the vault binary path.
WithSetLegacyLicenseRequestLicenseContent sets the vault license content.
WithSetLegacyLicenseRequestLicensePath sets the vault license path.
WithSetLegacyLicenseRequestToken sets the vault license token.
WithSetLegacyLicenseRequestVaultAddr sets the vault address.
WithStateRequestBinPath sets the vault binary path.
WithStateRequestFlightControlPath sets the enos-flight-control binary path.
WithStateRequestFlightControlUseHomeDir configures the state request to install enos-flight-control into the $HOME directory.
WithStateRequestListPodsRequestOpts configures the ListPodsRequest with ListPodsRequestOpts.
WithStateRequestSystemdUnitName sets the vault systemd unit name.
WithStateRequestVaultAddr sets the vault address.
WithStateRequestVaultToken sets the vault token.
WithUnsealRequestSealType sets the Vault seal type.
WithUnsealRequestUnsealKeys sets the Vault unseal keys.
WithUnsealStateRequestOpts sets the state request options.
# Constants
No description provided by the author
These health status codes differ from the defaults as outlined here: https://developer.hashicorp.com/vault/api-docs/system/health
When we get the health status of a node/cluster the /v1/sys/health endpoint behaves differently depending the node role (active, standby, perf standby, DR active secondary) and the cluster state (initialized and unsealed).
No description provided by the author
No description provided by the author
No description provided by the author
Unknown is our default state and is defined outside of LSB range.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
SealTypes are the possible Vault seal types.
No description provided by the author
The exit code of "vault status" reflects our seal status https://developer.hashicorp.com/vault/docs/commands/status.
No description provided by the author
Unknown is our default state and is defined outside of LSB range.
# Structs
CLIRequest are common things that we need when making a CLI request.
ConfigListener is the listeners stanza of the configuration.
ConfigListenerConfig is the config section of the listeners configuration.
ConfigSeals is the seals stanza of the configuration.
ConfigStateSanitizedResponse is the sanitized config returned from vault.
ConfigStateSanitizedResponse is the data section of the sanitized config.
ConfigStorage is the storage stanza of the configuration.
HAStatusData is the data section of the ha-status result.
HAStatusNode is a node in the ha-status result.
HAStatusResponse is the JSON stdout result of /v1/sys/ha-status.
HealthRequest is a vault /v1/sys/health request.
HealthResponse is the JSON stdout result of /v1/sys/health.
HealthResponseDataLicense is the data body of the license for /v1/sys/health.
HostInfoData is the data section of the host-info response.
HostInfoHost is the host section of the host-info response.
HostInfoResponse is the JSON stdout result of /v1/sys/host-info.
InitArguments are the possible arguments to pass to the init command.
InitRequest is the init request.
InitResponse is the init response.
RaftAutopilotConfigurationData is the data stanza of the config response.
RaftAutopilotConfigurationResponse is the response of /v1/sys/raft/autopilot/configuration.
RaftAutopilotStateRedundancyZone is vault enterprise raft redundancy zone config.
RaftAutopilotStateResponse is the raft autopilot state.
RaftAutopilotStateResponseData is the raft autopilot state data.
RaftAutopilotStateServer is the raft autopilot state server.
RaftAutopilotStateServer is the raft autopilot state upgrade info.
RaftAutopilotStateServer is the raft autopilot state upgrade info redundancy zone.
RaftConfigurationData is the data stanza of the raft response.
RaftConfigurationData is the config stanza of the raft response.
RaftConfigurationResponse is the response of /v1/sys/raft/configuration.
RaftConfigurationServer is one of the raft servers that have been configured.
ReplicationData is the replication response data.
ReplicationDataStatus is the replication status information.
ReplicationRequest is a replication request.
ReplicationStatusResponse is the JSON stdout result /v1/sys/replication/status.
ReplicationSecondary is the replication secondary data.
SealStatusRequest is a vault /v1/sys/seal-status request.
SealStatusResponse is the JSON stdout result of "vault status".
SealStatusResponseData is the seal data in the seal response.
SetLegacyLicenseRequest is the legacy license set request.
State represents the state of a node in a vault cluster.
StateRequest is a vault state request.
StatusResponse is the JSON stdout result of "vault status".
No description provided by the author
UnsealRequest is a Vault unseal request.
UnsealResponse is a Vault unseal response.
# Type aliases
CheckStater is a validate function that takes a state and validates that it has expected values.
HealthRequestOpt is a functional option for health requests.
HealthStatus is the response code to requests to /v1/sys/health.
InitRequestOpt is a functional option for a config create request.
ReplicationRequestOpt is a replication request function option.
SealStatusRequestOpt is a functional option for seal-status requests.
SealType is the Vault seal type.
SetLegacyLicenseRequestOpt is a functional option for a legacy license request.
StateRequestOpt is a functional option for a config create request.
StatusCode is the exit code of "vault status".
UnsealRequestOpt is a functional option for a unseal request.