installer

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CLI flags
	StackTraceFlag                  = "stack-trace"
	VerboseFlag                     = "verbose"
	SkipNamespaceDeletionFlag       = "skip-namespace-deletion"
	SkipExistingWorkloadCheckFlag   = "skip-existing-workload-check"
	StosVersionFlag                 = "stos-version"
	EtcdOperatorVersionFlag         = "etcd-operator-version"
	K8sVersionFlag                  = "k8s-version"
	WaitFlag                        = "wait"
	DryRunFlag                      = "dry-run"
	StosOperatorYamlFlag            = "stos-operator-yaml"
	StosClusterYamlFlag             = "stos-cluster-yaml"
	StosPortalConfigYamlFlag        = "stos-portal-config-yaml"
	StosPortalClientSecretYamlFlag  = "stos-portal-client-secret-yaml"
	EtcdOperatorYamlFlag            = "etcd-operator-yaml"
	EtcdClusterYamlFlag             = "etcd-cluster-yaml"
	EtcdDockerRepositoryFlag        = "etcd-docker-repository"
	EtcdVersionTag                  = "etcd-version-tag"
	ResourceQuotaYamlFlag           = "resource-quota-yaml"
	IncludeEtcdFlag                 = "include-etcd"
	EtcdEndpointsFlag               = "etcd-endpoints"
	SkipEtcdEndpointsValFlag        = "skip-etcd-endpoints-validation"
	SkipStosClusterFlag             = "skip-stos-cluster"
	EtcdTLSEnabledFlag              = "etcd-tls-enabled"
	EtcdSecretNameFlag              = "etcd-secret-name"
	StosConfigPathFlag              = "stos-config-path"
	EtcdNamespaceFlag               = "etcd-namespace"
	StosOperatorNSFlag              = "stos-operator-namespace"
	StosClusterNSFlag               = "stos-cluster-namespace"
	EtcdStorageClassFlag            = "etcd-storage-class"
	AdminUsernameFlag               = "admin-username"
	AdminPasswordFlag               = "admin-password"
	PortalClientIDFlag              = "portal-client-id"
	PortalSecretFlag                = "portal-secret"
	PortalTenantIDFlag              = "portal-tenant-id"
	PortalAPIURLFlag                = "portal-api-url"
	PortalManagerVersionFlag        = "portal-manager-version"
	PortalHTTPSProxyFlag            = "portal-https-proxy"
	EnablePortalManagerFlag         = "enable-portal-manager"
	IncludeLocalPathProvisionerFlag = "include-local-path-storage-class"
	LocalPathProvisionerYamlFlag    = "local-path-provisioner-yaml"
	EtcdTopologyKeyFlag             = "etcd-topology-key"
	EtcdCPULimitFlag                = "etcd-cpu-limit"
	EtcdMemoryLimitFlag             = "etcd-memory-limit"
	EtcdReplicasFlag                = "etcd-replicas"
	EnableMetricsFlag               = "enable-metrics"
	TestClusterFlag                 = "test-cluster"
	SkipK8sVersionCheckFlag         = "skip-k8s-version-check"
	SerialFlag                      = "serial"
	AirGapFlag                      = "air-gap"
	EnableNodeGuardFlag             = "enable-node-guard"
	NodeGuardEnvFlag                = "node-guard-env"

	// config file fields - contain path delimiters for plugin interpretation of config manifest
	StackTraceConfig                          = "spec.stackTrace"
	VerboseConfig                             = "spec.verbose"
	SkipNamespaceDeletionConfig               = "spec.skipNamespaceDeletion"
	SkipExistingWorkloadCheckConfig           = "spec.skipExistingWorkloadCheck"
	SkipStosClusterConfig                     = "spec.skipStorageOSCluster"
	IncludeEtcdConfig                         = "spec.includeEtcd"
	SerialConfig                              = "spec.serial"
	AirGapConfig                              = "spec.airGap"
	WaitConfig                                = "spec.install.wait"
	DryRunConfig                              = "spec.install.dryRun"
	K8sVersionConfig                          = "spec.install.kubernetesVersion"
	InstallStosVersionConfig                  = "spec.install.storageOSVersion"
	InstallEtcdOperatorVersionConfig          = "spec.install.etcdOperatorVersion"
	InstallEtcdNamespaceConfig                = "spec.install.etcdNamespace"
	InstallStosOperatorNSConfig               = "spec.install.storageOSOperatorNamespace"
	StosClusterNSConfig                       = "spec.install.storageOSClusterNamespace"
	InstallStosOperatorYamlConfig             = "spec.install.storageOSOperatorYaml"
	InstallStosClusterYamlConfig              = "spec.install.storageOSClusterYaml"
	InstallStosPortalConfigYamlConfig         = "spec.install.storageOSPortalConfigYaml"
	InstallStosPortalClientSecretYamlConfig   = "spec.install.storageOSPortalClientSecretYaml"
	InstallEtcdOperatorYamlConfig             = "spec.install.etcdOperatorYaml"
	InstallEtcdClusterYamlConfig              = "spec.install.etcdClusterYaml"
	InstallResourceQuotaYamlConfig            = "spec.install.resourceQuotaYaml"
	EtcdEndpointsConfig                       = "spec.install.etcdEndpoints"
	SkipEtcdEndpointsValConfig                = "spec.install.skipEtcdEndpointsValidation"
	EtcdTLSEnabledConfig                      = "spec.install.etcdTLSEnabled"
	EtcdSecretNameConfig                      = "spec.install.etcdSecretName"
	EtcdStorageClassConfig                    = "spec.install.etcdStorageClassName"
	AdminUsernameConfig                       = "spec.install.adminUsername"
	AdminPasswordConfig                       = "spec.install.adminPassword"
	PortalClientIDConfig                      = "spec.install.portalClientID"
	PortalSecretConfig                        = "spec.install.portalSecret"
	PortalTenantIDConfig                      = "spec.install.portalTenantID"
	PortalAPIURLConfig                        = "spec.install.portalAPIURL"
	InstallPortalManagerVersionConfig         = "spec.install.portalManagerVersion"
	UninstallPortalManagerVersionConfig       = "spec.uninstall.portalManagerVersion"
	EnablePortalManagerConfig                 = "spec.install.enablePortalManager"
	UninstallStosVersionConfig                = "spec.uninstall.storageOSVersion"
	UninstallEtcdOperatorVersionConfig        = "spec.uninstall.etcdOperatorVersion"
	UninstallEtcdNSConfig                     = "spec.uninstall.etcdNamespace"
	UninstallStosOperatorNSConfig             = "spec.uninstall.storageOSOperatorNamespace"
	UninstallStosOperatorYamlConfig           = "spec.uninstall.storageOSOperatorYaml"
	UninstallStosClusterYamlConfig            = "spec.uninstall.storageOSClusterYaml"
	UninstallStosPortalConfigYamlConfig       = "spec.uninstall.storageOSPortalConfigYaml"
	UninstallStosPortalClientSecretYamlConfig = "spec.uninstall.storageOSPortalClientSecretYaml"
	UninstallEtcdOperatorYamlConfig           = "spec.uninstall.etcdOperatorYaml"
	UninstallEtcdClusterYamlConfig            = "spec.uninstall.etcdClusterYaml"
	UninstallResourceQuotaYamlConfig          = "spec.uninstall.resourceQuotaYaml"
	IncludeLocalPathProvisionerConfig         = "spec.includeLocalPathProvisioner"
	InstallLocalPathProvisionerYamlConfig     = "spec.install.localPathProvisionerYamlConfig"
	UninstallLocalPathProvisionerYamlConfig   = "spec.uninstall.localPathProvisionerYamlConfig"
	EtcdVersionTagConfig                      = "spec.install.etcdVersionTag"
	EtcdDockerRepositoryConfig                = "spec.install.etcdDockerRepository"
	EtcdTopologyKeyConfig                     = "spec.install.etcdTopologyKey"
	EtcdCPULimitConfig                        = "spec.install.etcdCPULimit"
	EtcdMemoryLimitConfig                     = "spec.install.etcdMemoryLimit"
	EtcdReplicasConfig                        = "spec.install.etcdReplicas"
	EnableMetricsConfig                       = "spec.install.enableMetrics"
	TestClusterConfig                         = "spec.install.enableTestClusterTaint"
	SkipK8sVersionCheckConfig                 = "spec.install.skipK8sVerisonCheck"
	EnableNodeGuardConfig                     = "spec.install.enableNodeGuard"
	NodeGuardEnvConfig                        = "spec.install.nodeGuardEnv"

	InstallPrefix   = "install-"
	UninstallPrefix = "uninstall-"
)

Variables

View Source
var (
	// SerialInstall allows the installer to install operators serially not parallel.
	// This could be change with build flag:
	// -X github.com/storageos/kubectl-storageos/pkg/installer.SerialInstall=ANY_VALUE
	SerialInstall string
)

Functions

func FlagsAreSet

func FlagsAreSet(flags map[string]string) error

FlagsAreSet takes a map[string]string of flag-name:flag-value and returns an error listing all flag-names in 'flags' map that have not been set along with useful output on versions.

func Upgrade

func Upgrade(uninstallConfig *apiv1.KubectlStorageOSConfig, installConfig *apiv1.KubectlStorageOSConfig, log *logger.Logger) error

Types

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

Installer holds the kubectl client and in-memory fs data used throughout the installation process

func NewDryRunInstaller added in v1.1.0

func NewDryRunInstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)

NewDryRunInstaller returns a lightweight Installer object for '--dry-run' enabled commands

func NewInstaller

func NewInstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)

NewInstaller returns an Installer used for install command

func NewPortalManagerInstaller added in v1.2.0

func NewPortalManagerInstaller(config *apiv1.KubectlStorageOSConfig, manifestsRequired bool, log *logger.Logger) (*Installer, error)

NewPortalManagerInstaller returns an Installer used for all portal manager commands

func NewUninstaller added in v1.2.0

func NewUninstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)

NewUninstaller returns an Installer used for uninstall command

func (*Installer) EnablePortalManager

func (in *Installer) EnablePortalManager(enable bool) error

EnablePortalManager applies the existing storageoscluster with enablePortalManager set to value of 'enable'.

func (*Installer) Install

func (in *Installer) Install(upgrade bool) error

Install performs storageos operator and etcd operator installation for kubectl-storageos

func (*Installer) InstallPortalManager

func (in *Installer) InstallPortalManager() error

InstallPortalManager installs portal manager necessary components.

func (*Installer) Uninstall

func (in *Installer) Uninstall(upgrade bool) error

Uninstall performs storageos and etcd uninstallation for kubectl-storageos. Bool 'upgrade' indicates whether or not this uninstallation is part of an upgrade.

func (*Installer) UninstallPortalManager

func (in *Installer) UninstallPortalManager() error

UninstallPortalManager writes backup-filestem and uninstalls portal manager components.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL