Documentation ¶
Index ¶
- Constants
- Variables
- func A8sDeploymentExamplesPath() string
- func A8sDeploymentLocalPath() string
- func ApplyA8sManifests()
- func BackupConfigAccessKeyIdFilePath() string
- func BackupConfigBasePath() string
- func BackupConfigEncryptionPasswordFilePath() string
- func BackupConfigSecretAccessKeyFilePath() string
- func BuildKubernetesClusterManager() k8s.ClusterManager
- func BuildKubernetesClusterSpec() creator.KubernetesClusterSpec
- func CheckCommandAvailability()
- func CheckIfFileExists(filePath string) bool
- func CheckPrerequisites(createClusterIfNotExists bool)
- func CheckoutDemoAppGitRepository()
- func CheckoutDeploymentGitRepository()
- func CheckoutGitRepository(repositoryURL, localDirectory string, tag string) error
- func CountPodsInDemoNamespace() int
- func CreatePGServiceBinding()
- func CreatePGServiceInstance()
- func CreatePGServiceInstanceBackup()
- func CreatePGServiceInstanceRestore()
- func DeletePGServiceBinding()
- func DeletePGServiceInstance(namespace, serviceInstanceName string)
- func EnsureConfigIsLoaded()
- func EstablishAccessKeyId()
- func EstablishBackupStoreCredentials()
- func EstablishConfig()
- func EstablishConfigFilePath()
- func EstablishEncryptionPasswordFile()
- func EstablishWorkingDir()
- func GetUserManifestPath(filename string) string
- func IsCommandAvailable(cmdName string) bool
- func LoadConfig() bool
- func PrintDemoSummary()
- func ReadStringFromFileOrConsole(filePath, contentType string, showContent bool)
- func RequiredCommands() map[string]map[string]string
- func UserManifestsPath() string
- func WaitForA8sSystemToBecomeReady()
- func WaitForServiceInstanceToBecomeReady(namespace, serviceInstanceName string, nrOfInstances int)
- func WriteYAMLToFile(instanceYAML string, manifestPath string)
- type BlobStore
- type BlobStoreCloudConfiguration
- type BlobStoreConfig
- type Config
Constants ¶
const A8sSystemName = "a8s Postgres Control Plane"
const A8sSystemNamespace = "a8s-system"
Variables ¶
var A8sPGBackup pg.Backup
var A8sPGRestore pg.Restore
var A8sPGServiceBinding pg.ServiceBinding
var A8sPGServiceInstance pg.ServiceInstance
var BackupInfrastructureBucket string // e.g. a8s-backups
var BackupInfrastructureProvider string // e.g. AWS
TODO This is a poor man's struct!
var BackupInfrastructureRegion string // e.g. us-east-1
var ClusterMemory string
var ClusterNrOfNodes string
var DeleteA8sPGInstanceName string
var DemoClusterName string
TODO Why not merge some of these settings into DemoConfig? TODO Maybe DemoConfig or the entire demo package should be renamed a8s-demo or become less a8s specific
var DeploymentVersion string // e.g. v0.3.0
var DoNotApply bool // e.g. yes --> do not execute kubectl apply -f ...
var KubernetesTool string // e.g. "minikube" or "kind"
var NoPreCheck bool // e.g. false -> Perform prechecks
var UnattendedMode bool // Ask yes-no questions or assume "yes"
Functions ¶
func A8sDeploymentExamplesPath ¶
func A8sDeploymentExamplesPath() string
func A8sDeploymentLocalPath ¶
func A8sDeploymentLocalPath() string
func ApplyA8sManifests ¶
func ApplyA8sManifests()
Applies the manifests of the a8s-deployment repository and thus installs a8s PG.
func BackupConfigAccessKeyIdFilePath ¶
func BackupConfigAccessKeyIdFilePath() string
func BackupConfigBasePath ¶
func BackupConfigBasePath() string
func BackupConfigEncryptionPasswordFilePath ¶
func BackupConfigEncryptionPasswordFilePath() string
func BackupConfigSecretAccessKeyFilePath ¶
func BackupConfigSecretAccessKeyFilePath() string
func BuildKubernetesClusterManager ¶
func BuildKubernetesClusterManager() k8s.ClusterManager
Builds a cluster manager without params by using shared package variables.
func BuildKubernetesClusterSpec ¶
func BuildKubernetesClusterSpec() creator.KubernetesClusterSpec
func CheckCommandAvailability ¶
func CheckCommandAvailability()
func CheckIfFileExists ¶
func CheckPrerequisites ¶
func CheckPrerequisites(createClusterIfNotExists bool)
func CheckoutDemoAppGitRepository ¶
func CheckoutDemoAppGitRepository()
func CheckoutDeploymentGitRepository ¶
func CheckoutDeploymentGitRepository()
func CheckoutGitRepository ¶
func CountPodsInDemoNamespace ¶
func CountPodsInDemoNamespace() int
func CreatePGServiceBinding ¶
func CreatePGServiceBinding()
func CreatePGServiceInstanceRestore ¶
func CreatePGServiceInstanceRestore()
TODO Reduce code duplicity with CreatePGServiceInstanceBackup
func DeletePGServiceBinding ¶
func DeletePGServiceBinding()
func DeletePGServiceInstance ¶
func DeletePGServiceInstance(namespace, serviceInstanceName string)
TODO Move to pg package Refactor to DRY with Create ... > CRUDPGServiceInstance
func EnsureConfigIsLoaded ¶
func EnsureConfigIsLoaded()
Execute this at the beginning of every command that requires a config to be present.
func EstablishAccessKeyId ¶
func EstablishAccessKeyId()
Checks if there's an access key id file. If not it prompts to read the access key id from STDIN. Skips if the access key id file is already present
func EstablishBackupStoreCredentials ¶
func EstablishBackupStoreCredentials()
func EstablishConfig ¶
func EstablishConfig()
func EstablishConfigFilePath ¶
func EstablishConfigFilePath()
func EstablishEncryptionPasswordFile ¶
func EstablishEncryptionPasswordFile()
Generates an encryption password file for backups if it doesnt exist. Does nothing if the file already exists.
func EstablishWorkingDir ¶
func EstablishWorkingDir()
func GetUserManifestPath ¶
Returns a filepath located in the user manifests path.
func IsCommandAvailable ¶
func LoadConfig ¶
func LoadConfig() bool
func PrintDemoSummary ¶
func PrintDemoSummary()
func ReadStringFromFileOrConsole ¶
Checks if there's a file. If not it prompts to read the file content from STDIN. Skips if the file is already present
func RequiredCommands ¶
func UserManifestsPath ¶
func UserManifestsPath() string
func WaitForA8sSystemToBecomeReady ¶
func WaitForA8sSystemToBecomeReady()
func WriteYAMLToFile ¶
Writes the provided YAML string to a YAML file at the given path.
Types ¶
type BlobStore ¶
type BlobStore struct {
Config BlobStoreConfig `yaml:"config"`
}
type BlobStoreConfig ¶
type BlobStoreConfig struct {
CloudConfig BlobStoreCloudConfiguration `yaml:"cloud_configuration"`
}