util

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVKToString

func GVKToString(gvk schema.GroupVersionKind) string

func GetExternalAddressOfAPIServer

func GetExternalAddressOfAPIServer(kubeConfig *rest.Config) (string, error)

func GetKubeconfigOverridesForClusterByNetwork

func GetKubeconfigOverridesForClusterByNetwork(cluster *clusterregistryv1alpha1.Cluster, networkName string) (*clientcmd.ConfigOverrides, error)

func GetKubeconfigWithSAToken

func GetKubeconfigWithSAToken(name, username, endpointURL string, caData []byte, saToken string) (string, error)

func GetReaderSecretForCluster

func GetReaderSecretForCluster(ctx context.Context, kubeClient client.Client, kubeConfig *rest.Config, cluster *clusterregistryv1alpha1.Cluster, saRef types.NamespacedName, apiServerEndpointAddress string) (*corev1.Secret, error)

func GetReaderSecretTokenAndCACert added in v0.2.6

func GetReaderSecretTokenAndCACert(ctx context.Context, kubeClient client.Client, saRef types.NamespacedName) ([]byte, []byte, error)

func K8SResourceOverlayPatchExecuteTemplate

func K8SResourceOverlayPatchExecuteTemplate(patch resources.K8SResourceOverlayPatch, data interface{}) (resources.K8SResourceOverlayPatch, error)

func K8SResourceOverlayPatchExecuteTemplates

func K8SResourceOverlayPatchExecuteTemplates(patches []resources.K8SResourceOverlayPatch, data interface{}) ([]resources.K8SResourceOverlayPatch, error)

func NewLocalCluster

func NewLocalCluster(c client.Client, namespace, name, apiServerEndpointAddress string) (*v1alpha1.Cluster, error)

func ParseGVKFromString

func ParseGVKFromString(str string) *schema.GroupVersionKind

func ProvisionLocalClusterObject

func ProvisionLocalClusterObject(c client.Client, log logr.Logger, configuration config.Configuration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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