cgu

package
v0.0.0-...-f38bbfb Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CguBuilder

type CguBuilder struct {
	// cgu Definition, used to create the cgu object.
	Definition *v1alpha1.ClusterGroupUpgrade
	// created cgu object.
	Object *v1alpha1.ClusterGroupUpgrade
	// contains filtered or unexported fields
}

CguBuilder provides struct for the cgu object containing connection to the cluster and the cgu definitions.

func ListInAllNamespaces

func ListInAllNamespaces(apiClient *clients.Settings, options ...client.ListOptions) ([]*CguBuilder, error)

ListInAllNamespaces returns a cluster-wide cgu inventory.

func NewCguBuilder

func NewCguBuilder(apiClient *clients.Settings, name, nsname string, maxConcurrency int) *CguBuilder

NewCguBuilder creates a new instance of CguBuilder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*CguBuilder, error)

Pull pulls existing cgu into CguBuilder struct.

func (*CguBuilder) Create

func (builder *CguBuilder) Create() (*CguBuilder, error)

Create makes a cgu in the cluster and stores the created object in struct.

func (*CguBuilder) Delete

func (builder *CguBuilder) Delete() (*CguBuilder, error)

Delete removes a cgu from a cluster.

func (*CguBuilder) DeleteAndWait

func (builder *CguBuilder) DeleteAndWait(timeout time.Duration) (*CguBuilder, error)

DeleteAndWait deletes the cgu object and waits until the cgu is deleted.

func (*CguBuilder) Exists

func (builder *CguBuilder) Exists() bool

Exists checks whether the given cgu exists.

func (*CguBuilder) Get

func (builder *CguBuilder) Get() (*v1alpha1.ClusterGroupUpgrade, error)

Get returns ClusterGroupUpgrade object if found.

func (*CguBuilder) Update

func (builder *CguBuilder) Update(force bool) (*CguBuilder, error)

Update renovates the existing cgu object with the cgu definition in builder.

func (*CguBuilder) WaitForCondition

func (builder *CguBuilder) WaitForCondition(expected metav1.Condition, timeout time.Duration) (*CguBuilder, error)

WaitForCondition waits until the CGU has a condition that matches the expected, checking only the Type, Status, Reason, and Message fields. For the message field, it matches if the message contains the expected. Zero fields in the expected condition are ignored.

func (*CguBuilder) WaitUntilBackupStarts

func (builder *CguBuilder) WaitUntilBackupStarts(timeout time.Duration) (*CguBuilder, error)

WaitUntilBackupStarts waits the specified timeout for the backup to start.

func (*CguBuilder) WaitUntilClusterComplete

func (builder *CguBuilder) WaitUntilClusterComplete(cluster string, timeout time.Duration) (*CguBuilder, error)

WaitUntilClusterComplete waits the specified timeout for a cluster in the CGU to complete remidation.

func (*CguBuilder) WaitUntilClusterInProgress

func (builder *CguBuilder) WaitUntilClusterInProgress(cluster string, timeout time.Duration) (*CguBuilder, error)

WaitUntilClusterInProgress waits the specified timeout for a cluster in the CGU to start remidation.

func (*CguBuilder) WaitUntilClusterInState

func (builder *CguBuilder) WaitUntilClusterInState(cluster, state string, timeout time.Duration) (*CguBuilder, error)

WaitUntilClusterInState waits the specified timeout for a cluster in the CGU to be in the specified state.

func (*CguBuilder) WaitUntilComplete

func (builder *CguBuilder) WaitUntilComplete(timeout time.Duration) (*CguBuilder, error)

WaitUntilComplete waits the specified timeout for the CGU to complete.

func (*CguBuilder) WaitUntilDeleted

func (builder *CguBuilder) WaitUntilDeleted(timeout time.Duration) error

WaitUntilDeleted waits for the duration of the defined timeout or until the cgu is deleted.

func (*CguBuilder) WithCanary

func (builder *CguBuilder) WithCanary(canary string) *CguBuilder

WithCanary appends a canary to the RemediationStrategy canaries list in the CGU definition.

func (*CguBuilder) WithCluster

func (builder *CguBuilder) WithCluster(cluster string) *CguBuilder

WithCluster appends a cluster to the clusters list in the CGU definition.

func (*CguBuilder) WithManagedPolicy

func (builder *CguBuilder) WithManagedPolicy(policy string) *CguBuilder

WithManagedPolicy appends a policies to the managed policies list in the CGU definition.

type PreCachingConfigBuilder

type PreCachingConfigBuilder struct {
	// Definition of the PreCachingConfig used to create the object.
	Definition *v1alpha1.PreCachingConfig
	// Object of the PreCachingConfig as it is on the cluster.
	Object *v1alpha1.PreCachingConfig
	// contains filtered or unexported fields
}

PreCachingConfigBuilder provides a struct for the PreCachingConfig object containing a connection to the cluster and the PreCachingConfig definition.

func NewPreCachingConfigBuilder

func NewPreCachingConfigBuilder(apiClient *clients.Settings, name, nsname string) *PreCachingConfigBuilder

NewPreCachingConfigBuilder creates a new instance of PreCachingConfig.

func PullPreCachingConfig

func PullPreCachingConfig(apiClient *clients.Settings, name, nsname string) (*PreCachingConfigBuilder, error)

PullPreCachingConfig pulls an existing PreCachingConfig into a PreCachingConfigBuilder struct.

func (*PreCachingConfigBuilder) Create

Create makes a PreCachingConfig on the apiClient if it does not already exist.

func (*PreCachingConfigBuilder) Delete

func (builder *PreCachingConfigBuilder) Delete() error

Delete removes a PreCachingConfig from the apiClient if it exists.

func (*PreCachingConfigBuilder) Exists

func (builder *PreCachingConfigBuilder) Exists() bool

Exists checks whether the given PreCachingConfig exists on the apiClient.

func (*PreCachingConfigBuilder) Get

Get pulls the PreCachingConfig from the apiClient into the PreCachingConfigBuilder.

func (*PreCachingConfigBuilder) Update

func (builder *PreCachingConfigBuilder) Update(force bool) (*PreCachingConfigBuilder, error)

Update changes the existing PreCachingConfig object on the apiClient, falling back to deleting and recreating it if force is set.

Jump to

Keyboard shortcuts

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