k8scluster

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateK8sClusterInput

func GenerateCreateK8sClusterInput(cr *v1alpha1.Cluster) *sdkgo.KubernetesClusterForPost

GenerateCreateK8sClusterInput returns sdkgo.KubernetesClusterForPost based on the CR spec

func GenerateUpdateK8sClusterInput

func GenerateUpdateK8sClusterInput(cr *v1alpha1.Cluster) *sdkgo.KubernetesClusterForPut

GenerateUpdateK8sClusterInput returns sdkgo.KubernetesClusterForPut based on the CR spec modifications

func IsK8sClusterUpToDate

func IsK8sClusterUpToDate(cr *v1alpha1.Cluster, cluster sdkgo.KubernetesCluster) bool

IsK8sClusterUpToDate returns true if the K8sCluster is up-to-date or false if it does not

func LateInitializer

func LateInitializer(in *v1alpha1.ClusterParameters, sg *sdkgo.KubernetesCluster)

LateInitializer fills the empty fields in *v1alpha1.ClusterParameters with the values seen in sdkgo.KubernetesCluster.

func LateStatusInitializer

func LateStatusInitializer(in *v1alpha1.ClusterObservation, sg *sdkgo.KubernetesCluster)

LateStatusInitializer fills the empty fields in *v1alpha1.ClusterObservation with the values seen in sdkgo.KubernetesCluster.

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateK8sCluster

func (cp *APIClient) CheckDuplicateK8sCluster(ctx context.Context, clusterName string) (*sdkgo.KubernetesCluster, error)

CheckDuplicateK8sCluster based on clusterName

func (*APIClient) CreateK8sCluster

CreateK8sCluster based on KubernetesClusterForPost

func (*APIClient) DeleteK8sCluster

func (cp *APIClient) DeleteK8sCluster(ctx context.Context, clusterID string) (*sdkgo.APIResponse, error)

DeleteK8sCluster based on clusterID

func (*APIClient) GetAPIClient

func (cp *APIClient) GetAPIClient() *sdkgo.APIClient

GetAPIClient gets the APIClient

func (*APIClient) GetK8sCluster

func (cp *APIClient) GetK8sCluster(ctx context.Context, clusterID string) (sdkgo.KubernetesCluster, *sdkgo.APIResponse, error)

GetK8sCluster based on clusterID

func (*APIClient) GetK8sClusterID

func (cp *APIClient) GetK8sClusterID(cluster *sdkgo.KubernetesCluster) (string, error)

GetK8sClusterID based on cluster

func (*APIClient) GetKubeConfig

func (cp *APIClient) GetKubeConfig(ctx context.Context, clusterID string) (string, *sdkgo.APIResponse, error)

GetKubeConfig based on clusterID

func (*APIClient) HasActiveK8sNodePools

func (cp *APIClient) HasActiveK8sNodePools(ctx context.Context, clusterID string) (bool, error)

HasActiveK8sNodePools based on clusterID

func (*APIClient) UpdateK8sCluster

func (cp *APIClient) UpdateK8sCluster(ctx context.Context, clusterID string, cluster sdkgo.KubernetesClusterForPut) (sdkgo.KubernetesCluster, *sdkgo.APIResponse, error)

UpdateK8sCluster based on clusterID and KubernetesClusterForPut

type Client

type Client interface {
	CheckDuplicateK8sCluster(ctx context.Context, clusterName string) (*sdkgo.KubernetesCluster, error)
	GetK8sClusterID(cluster *sdkgo.KubernetesCluster) (string, error)
	GetK8sCluster(ctx context.Context, clusterID string) (sdkgo.KubernetesCluster, *sdkgo.APIResponse, error)
	GetKubeConfig(ctx context.Context, clusterID string) (string, *sdkgo.APIResponse, error)
	CreateK8sCluster(ctx context.Context, cluster sdkgo.KubernetesClusterForPost) (sdkgo.KubernetesCluster, *sdkgo.APIResponse, error)
	UpdateK8sCluster(ctx context.Context, clusterID string, cluster sdkgo.KubernetesClusterForPut) (sdkgo.KubernetesCluster, *sdkgo.APIResponse, error)
	DeleteK8sCluster(ctx context.Context, clusterID string) (*sdkgo.APIResponse, error)
	HasActiveK8sNodePools(ctx context.Context, clusterID string) (bool, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service K8s Cluster methods

Jump to

Keyboard shortcuts

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