util

package
v0.0.0-...-48fa3db Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCluster

func CreateCluster(host, token string, httpClient http.Client, cluster *v1alpha1.RKE1Cluster, ctx context.Context) (string, error)

func CreateKubeconfigSecret

func CreateKubeconfigSecret(ctx context.Context, kubeconfig []byte, clusterName string, namespace string, kubeClient client.Client) error

func CreateNodePool

func CreateNodePool(host, token, clusterId string, httpClient http.Client, nodePool v1alpha1.RKENodePool, ctx context.Context) error

func CreateNodeTemplate

func CreateNodeTemplate(host, token string, httpClient http.Client, nodeTemplate v1alpha1.RKE1NodeTemplate, ctx context.Context) (string, error)

func DeleteCluster

func DeleteCluster(host, token, clusterID string, httpClient http.Client, ctx context.Context) error

func DeleteNodeTemplate

func DeleteNodeTemplate(host, token, nodeTemplateID string, httpClient http.Client, ctx context.Context) error

func GenerateKubeconfig

func GenerateKubeconfig(ctx context.Context, host, clusterID, token, crName, crNamespace string, httpClient http.Client, client client.Client) error

func GenerateKubeconfigSecret

func GenerateKubeconfigSecret(kubeconfig []byte, clusterName string, namespace string) corev1.Secret

func GetClusters

func GetClusters(host, token string, httpClient http.Client, ctx context.Context) (v1alpha1.ClusterResponse, error)

func GetNodeTemplateByName

func GetNodeTemplateByName(host, token, name string, httpClient http.Client, ctx context.Context) (string, error)

func GetNodeTemplates

func GetNodeTemplates(host, token string, httpClient http.Client, ctx context.Context) (v1alpha1.ClusterResponse, error)

func GetSubnetIdByTags

func GetSubnetIdByTags(tags map[string]string, region string, credentials *credentials.Credentials) (string, error)

func GetVpcIdByTags

func GetVpcIdByTags(tags map[string]string, region string, credentials *credentials.Credentials) (string, error)

func KubeconfigSecretExist

func KubeconfigSecretExist(ctx context.Context, clusterName string, namespace string, kubeClient client.Client) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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