helpers

package
v0.0.0-...-0176942 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddon

func CreateAddon(server, accessToken string, cluster *clusterv1.ManagedCluster, addon *addonv1alpha1.ManagedClusterAddOn) error

func CreateCluster

func CreateCluster(server, accessToken string, managedCluster *clusterv1.ManagedCluster) error

func New

func New[T primitive](value T) *T

New takes any type of primitive and returns a pointer to a copy that is allocated in the heap. This is needed to allow setting values (hard coded or struct members) by reference to the api structs.

func PostAddonStatus

func PostAddonStatus(server, accessToken string, cluster *clusterv1.ManagedCluster, addonName string, addContidions []metav1.Condition) error

func PostClusterLabels

func PostClusterLabels(server, accessToken string, managedCluster *clusterv1.ManagedCluster, changedLabels map[string]string) error

func PostClusterStatus

func PostClusterStatus(server, accessToken string, managedCluster *clusterv1.ManagedCluster, addContidions []metav1.Condition) error

func RemoveClusterLabels

func RemoveClusterLabels(server, accessToken string, managedCluster *clusterv1.ManagedCluster, removedLabelKeys []string) error

func RetrieveAccessToken

func RetrieveAccessToken(ctx context.Context, kubeClient kubernetes.Interface) (string, error)

retrieve access token from pull secret

func UpdateManagedClusterAddonStatus

func UpdateManagedClusterAddonStatus(
	ctx context.Context,
	client addonclient.Interface,
	clusterName string,
	addonName string,
	updateFuncs ...UpdateManagedClusterAddonStatusFunc) (*addonv1alpha1.ManagedClusterAddOnStatus, bool, error)

func UpdateManagedClusterStatus

func UpdateManagedClusterStatus(
	ctx context.Context,
	client clusterclient.Interface,
	spokeClusterName string,
	updateFuncs ...UpdateManagedClusterStatusFunc) (*clusterv1.ManagedClusterStatus, bool, error)

Types

type AccessTokenCfg

type AccessTokenCfg struct {
	Auths map[string]RegistryAddress `json:"auths"`
}

type RegistryAddress

type RegistryAddress struct {
	Auth  string `json:"auth"`
	Email string `json:"email"`
}

type UpdateManagedClusterAddonStatusFunc

type UpdateManagedClusterAddonStatusFunc func(status *addonv1alpha1.ManagedClusterAddOnStatus) error

func UpdateManagedClusterAddonConditionFn

func UpdateManagedClusterAddonConditionFn(cond metav1.Condition) UpdateManagedClusterAddonStatusFunc

type UpdateManagedClusterStatusFunc

type UpdateManagedClusterStatusFunc func(status *clusterv1.ManagedClusterStatus) error

func UpdateManagedClusterConditionFn

func UpdateManagedClusterConditionFn(cond metav1.Condition) UpdateManagedClusterStatusFunc

Jump to

Keyboard shortcuts

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