Documentation ¶
Index ¶
- Constants
- func Backup(config *rest.Config, mode int) error
- func CRDCRD(config *rest.Config) error
- func CheckRequirements(config *rest.Config) error
- func DeleteBackup(config *rest.Config) error
- func Do(ctx context.Context, config *rest.Config, options ...InstallerOption) error
- func DryRun(config *rest.Config) (map[string]error, error)
- func HasBackupCRD(config *rest.Config) (bool, error)
- func IsErrImagePull(reason string) bool
- func IsRunning(config *rest.Config) (bool, error)
- func Restore(baseConfig *rest.Config, impersonate bool) (map[string]error, error)
- func Safe(ctx context.Context, config *rest.Config, options SafeOptions) error
- func Uninstall(config *rest.Config, namespace string, keepCRD bool) error
- func UninstallCRD(config *rest.Config) error
- func UninstallComposeAPIServer(config *rest.Config, namespace string) error
- func UninstallComposeCRD(config *rest.Config, namespace string) error
- func Unsafe(ctx context.Context, config *rest.Config, options UnsafeOptions) error
- func Update(config *rest.Config, namespace, tag string, abortOnError bool) (map[string]error, error)
- func WaitForUninstallCompletion(ctx context.Context, config *rest.Config, namespace string, skipCRD bool) error
- func WaitNPods(config *rest.Config, namespace string, count int, timeout time.Duration) error
- type EtcdOptions
- type InstallerOption
- func WithAPIServerImage(image string) InstallerOption
- func WithControllerImage(image string) InstallerOption
- func WithControllerOnly() InstallerOption
- func WithCustomStatusMatch(match func(Status) bool) InstallerOption
- func WithExpiresOffset(d time.Duration) InstallerOption
- func WithObjectFilter(filter RuntimeObjectFilter) InstallerOption
- func WithSafe(o SafeOptions) InstallerOption
- func WithUnsafe(o UnsafeOptions) InstallerOption
- func WithoutController() InstallerOption
- type NetworkOptions
- type OptionsCommon
- type RuntimeObjectFilter
- type SafeOptions
- type Status
- type TLSBundle
- type UnsafeOptions
Constants ¶
const ( // BackupPreviousErase erases previous backup BackupPreviousErase = iota // BackupPreviousMerge adds/merges new data to previous backup BackupPreviousMerge // BackupPreviousFail fails if a previous backup exists BackupPreviousFail )
const ( // TimeoutDefault is the default install timeout. TimeoutDefault = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CheckRequirements ¶
CheckRequirements fetches the server version and checks it is above the minimum required version.
func DeleteBackup ¶
DeleteBackup deletes the backup CRD
func HasBackupCRD ¶
HasBackupCRD indicates if the backup crd is there
func IsErrImagePull ¶
IsErrImagePull checks if an error is an errImagePull
func UninstallCRD ¶
UninstallCRD uninstalls the CustomResourceDefinition and preserves running stacks
func UninstallComposeAPIServer ¶
UninstallComposeAPIServer uninstalls compose in API server mode, preserving running stacks
func UninstallComposeCRD ¶
UninstallComposeCRD uninstalls compose in CRD mode, preserving running stacks
func Unsafe ¶
Unsafe installs the Compose features without High availability, and with insecure ETCD.
func Update ¶
func Update(config *rest.Config, namespace, tag string, abortOnError bool) (map[string]error, error)
Update perform a full update operation, restoring the stacks
Types ¶
type EtcdOptions ¶
EtcdOptions holds install options related to ETCD
type InstallerOption ¶
type InstallerOption func(*installer)
InstallerOption defines modifies the installer
func WithAPIServerImage ¶
func WithAPIServerImage(image string) InstallerOption
WithAPIServerImage overrides API server image selection
func WithControllerImage ¶
func WithControllerImage(image string) InstallerOption
WithControllerImage overrides controller image selection
func WithControllerOnly ¶
func WithControllerOnly() InstallerOption
WithControllerOnly installs only the controller
func WithCustomStatusMatch ¶
func WithCustomStatusMatch(match func(Status) bool) InstallerOption
WithCustomStatusMatch allows to provide additional predicates to check if the current install status matches the desired state
func WithExpiresOffset ¶
func WithExpiresOffset(d time.Duration) InstallerOption
WithExpiresOffset specifies the duration offset to apply when checking if generated tls bundle has expired
func WithObjectFilter ¶
func WithObjectFilter(filter RuntimeObjectFilter) InstallerOption
WithObjectFilter applies a RuntimeObjectFilter
func WithSafe ¶
func WithSafe(o SafeOptions) InstallerOption
WithSafe initializes the installer with Safe options
func WithUnsafe ¶
func WithUnsafe(o UnsafeOptions) InstallerOption
WithUnsafe initializes the installer with unsafe options
func WithoutController ¶
func WithoutController() InstallerOption
WithoutController install components without the controller
type NetworkOptions ¶
NetworkOptions holds install options related to networking
type OptionsCommon ¶
type OptionsCommon struct { Namespace string Tag string PullSecret string ReconciliationInterval time.Duration DefaultServiceType string APIServerAffinity *corev1types.Affinity ControllerAffinity *corev1types.Affinity HealthzCheckPort int PullPolicy corev1types.PullPolicy }
OptionsCommon holds install options for the api extension
type RuntimeObjectFilter ¶
RuntimeObjectFilter allows to modify or bypass completely a k8s object
type SafeOptions ¶
type SafeOptions struct { OptionsCommon Etcd EtcdOptions Network NetworkOptions }
SafeOptions holds install options for the api extension
type Status ¶
type Status struct { // True if there is a deployment with compose labels in the cluster IsInstalled bool // Tag of the installed components Tag string // Indicates if there is a legacy compose CRD in the system IsCrdPresent bool // Namespace in which components are deployed Namespace string // Image of the controller ControllerImage string // Image of the API service APIServiceImage string // Default service type for published services DefaultServiceType string // ControllerLabels contains all labels from Controller deployment ControllerLabels map[string]string // APIServiceLabels contains all labels from API service deployment APIServiceLabels map[string]string // APIServiceAnnotations contains annotations from the API service deployment APIServiceAnnotations map[string]string }
Status reports current installation status details
type TLSBundle ¶
type TLSBundle struct {
// contains filtered or unexported fields
}
TLSBundle is a bundle containing a CA, a public cert and private key, PEM encoded
func NewTLSBundle ¶
NewTLSBundle creates a TLS bundle
type UnsafeOptions ¶
type UnsafeOptions struct { OptionsCommon Coverage bool Debug bool }
UnsafeOptions holds install options for the api extension