k8sclient

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespacedName added in v1.5.0

func GetNamespacedName(o metav1.Object) types.NamespacedName

Types

type Cluster

type Cluster struct {
	Client client.Client
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster(client client.Client, managementCluster types.NamespacedName) *Cluster

NewCluster returns a new Cluster client

func (*Cluster) AddFinalizer

func (g *Cluster) AddFinalizer(ctx context.Context, capiCluster *capi.Cluster, finalizer string) error

AddFinalizer adds the given finalizer to the cluster

func (*Cluster) ContainsFinalizer added in v1.4.0

func (g *Cluster) ContainsFinalizer(capiCluster *capi.Cluster, finalizer string) bool

ContainsFinalizer checks if the given finalizer is present on the Cluster resource

func (*Cluster) Get

func (g *Cluster) Get(ctx context.Context, namespacedName types.NamespacedName) (*capi.Cluster, error)

Get retrieves a Cluster based on the given namespace/name

func (*Cluster) GetAWSCluster

func (g *Cluster) GetAWSCluster(ctx context.Context, namespacedName types.NamespacedName) (*capa.AWSCluster, error)

GetAWSCluster retrieves an AWSCluster based on the provided namespace/name

func (*Cluster) GetAWSClusterRoleIdentity added in v0.1.2

func (g *Cluster) GetAWSClusterRoleIdentity(ctx context.Context, namespacedName types.NamespacedName) (*capa.AWSClusterRoleIdentity, error)

GetAWSCluster retrieves an AWSCluster based on the provided namespace/name

func (*Cluster) GetManagementCluster

func (g *Cluster) GetManagementCluster(ctx context.Context) (*capi.Cluster, error)

GetManagementCluster retrieves the Cluster for the management cluster namespace/name provided at client creation

func (*Cluster) GetManagementClusterNamespacedName added in v1.0.0

func (g *Cluster) GetManagementClusterNamespacedName() types.NamespacedName

func (*Cluster) IsManagementCluster

func (g *Cluster) IsManagementCluster(ctx context.Context, cluster *capi.Cluster) bool

IsManagementCluster checks if the given cluster matches the namespace/name of the management cluster provided on client creation

func (*Cluster) Patch

func (g *Cluster) Patch(ctx context.Context, cluster *capi.Cluster, patch client.Patch) (*capi.Cluster, error)

Patch applies the given patches to the cluster

func (*Cluster) RemoveFinalizer

func (g *Cluster) RemoveFinalizer(ctx context.Context, capiCluster *capi.Cluster, finalizer string) error

RemoveFinalizer removes the given finalizer from the cluster

func (*Cluster) UpdateStatus added in v1.1.4

func (g *Cluster) UpdateStatus(ctx context.Context, cluster *capi.Cluster) error

Jump to

Keyboard shortcuts

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