utils

package
v0.0.0-...-5cfbd94 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateManagedServiceAccount

func CreateManagedServiceAccount(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	namePrefix string,
) (*msav1beta1.ManagedServiceAccount, error)

func CreateManagedServiceAccountAddon

func CreateManagedServiceAccountAddon(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) (*addonv1alpha1.ManagedClusterAddOn, error)

func DeleteManagedServiceAccount

func DeleteManagedServiceAccount(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) error

func DeleteManagedServiceAccountAddon

func DeleteManagedServiceAccountAddon(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) error

func DoesManagedServiceAccountAddonExist

func DoesManagedServiceAccountAddonExist(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) bool

func DoesManagedServiceAccountExist

func DoesManagedServiceAccountExist(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) bool

func EnableManagedServiceAccountFeature

func EnableManagedServiceAccountFeature(hubClient dynamic.Interface) error

func GetImportedCluster

func GetImportedCluster(hubClient dynamic.Interface) (*clusterv1.ManagedCluster, error)

func GetManagedCluster

func GetManagedCluster(
	hubClient dynamic.Interface,
	clusterName string,
) (*clusterv1.ManagedCluster, error)

func GetManagedServiceAccount

func GetManagedServiceAccount(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) (*msav1beta1.ManagedServiceAccount, error)

func GetManagedServiceAccountAddon

func GetManagedServiceAccountAddon(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) (*addonv1alpha1.ManagedClusterAddOn, error)

func GetManagedServiceAccountSecret

func GetManagedServiceAccountSecret(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) (*corev1.Secret, error)

func GetManagedServiceAccountToken

func GetManagedServiceAccountToken(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) (string, error)

func GetManagedServiceAccountUserName

func GetManagedServiceAccountUserName(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	managedServiceAccountName string,
) (string, error)

func GetMultiClusterEngine

func GetMultiClusterEngine(
	hubClient dynamic.Interface,
) (*unstructured.Unstructured, error)

GetMultiClusterEngine find first MCE in the cluster, will return error if no MCE can be found

func GetMultiClusterHub

func GetMultiClusterHub(
	hubClient dynamic.Interface,
) (*unstructured.Unstructured, error)

list globally and get first mch, will return no error and no obj if not found

func IsManagedServiceAccountAddonAvailable

func IsManagedServiceAccountAddonAvailable(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) bool

func IsManagedServiceAccountComplete

func IsManagedServiceAccountComplete(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
	name string,
) bool

func ListManagedServiceAccount

func ListManagedServiceAccount(
	hubClient dynamic.Interface,
	managedCluster *clusterv1.ManagedCluster,
) (*msav1beta1.ManagedServiceAccountList, error)

func SetManagedServiceAcccount

func SetManagedServiceAcccount(m *unstructured.Unstructured, state bool) error

func ValidateManagedServiceAccountToken

func ValidateManagedServiceAccountToken(
	mcDynClient dynamic.Interface,
	token string,
	expectedUserName string,
) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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