Documentation ¶
Index ¶
- Constants
- Variables
- func FlagsAreSet(flags map[string]string) error
- func Upgrade(uninstallConfig *apiv1.KubectlStorageOSConfig, ...) error
- type Installer
- func NewDryRunInstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)
- func NewInstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)
- func NewPortalManagerInstaller(config *apiv1.KubectlStorageOSConfig, manifestsRequired bool, ...) (*Installer, error)
- func NewUninstaller(config *apiv1.KubectlStorageOSConfig, log *logger.Logger) (*Installer, error)
Constants ¶
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 ¶
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 ¶
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 ¶
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
NewUninstaller returns an Installer used for uninstall command
func (*Installer) EnablePortalManager ¶
EnablePortalManager applies the existing storageoscluster with enablePortalManager set to value of 'enable'.
func (*Installer) Install ¶
Install performs storageos operator and etcd operator installation for kubectl-storageos
func (*Installer) InstallPortalManager ¶
InstallPortalManager installs portal manager necessary components.
func (*Installer) Uninstall ¶
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 ¶
UninstallPortalManager writes backup-filestem and uninstalls portal manager components.