k8sutil

package
v2.17.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResourceRevision added in v2.11.1

func CheckResourceRevision(obj client.Object, revisionConstraint string) (bool, error)

func CreateK8sEndpoints

func CreateK8sEndpoints(name string, namespace string, addresses []corev1.EndpointAddress, ports []corev1.EndpointPort) *corev1.Endpoints

func DetectSupportedJWTPolicy

func DetectSupportedJWTPolicy(k8sConfig *rest.Config) (servicemeshv1alpha1.JWTPolicyType, error)

func GetEndpointForClusterByNetwork added in v2.11.1

func GetEndpointForClusterByNetwork(cluster *clusterregistryv1alpha1.Cluster, networkName string) clusterregistryv1alpha1.KubernetesAPIEndpoint

func GetEndpoints

func GetEndpoints(ctx context.Context, kubeClient client.Client, name string, namespace string) (*corev1.Endpoints, error)

func GetExternalAddressOfAPIServer added in v2.11.1

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

func GetIPsForEndpoints

func GetIPsForEndpoints(endpoints *corev1.Endpoints) []string

func GetIstiodEndpointAddresses added in v2.11.1

func GetIstiodEndpointAddresses(ctx context.Context, kubeClient client.Client, icpName string, icpNetworkName string, namespace string) ([]corev1.EndpointAddress, error)

func GetIstiodEndpointPorts added in v2.11.1

func GetIstiodEndpointPorts(ctx context.Context, kubeClient client.Client, serviceName string, serviceNamespace string) ([]corev1.EndpointPort, error)

func GetKubeconfigWithSAToken added in v2.11.1

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

func GetLocalCluster

func GetLocalCluster(ctx context.Context, kubeClient client.Client) (*clusterregistryv1alpha1.Cluster, error)

func GetManagedByLabel added in v2.11.1

func GetManagedByLabel(obj client.Object) string

func GetReaderSecretForCluster added in v2.11.1

func GetReaderSecretForCluster(ctx context.Context, kubeClient client.Client, kubeConfig *rest.Config, clusterName string, secretRef types.NamespacedName, saRef types.NamespacedName, apiServerEndpointAddress string, clusterRegistryAPIEnabled bool) (*corev1.Secret, error)

func GetResourceRevisionLabel added in v2.11.1

func GetResourceRevisionLabel(obj client.Object) string

func GetService

func GetService(ctx context.Context, kubeClient client.Client, serviceName string, serviceNamespace string) (*corev1.Service, error)

func GetServiceEndpointIPs

func GetServiceEndpointIPs(service corev1.Service) ([]string, bool, error)

func IsReqeueNeededCosNamespaceTermination added in v2.11.2

func IsReqeueNeededCosNamespaceTermination(ctx context.Context, cli client.Client, obj client.Object) (bool, error)

func SetICPMetadataOnObject added in v2.11.1

func SetICPMetadataOnObject(object metav1.Object, icp *v1alpha1.IstioControlPlane)

func SetManagedByLabel added in v2.11.1

func SetManagedByLabel(obj client.Object, owner string)

func SetResourceRevisionLabel added in v2.11.1

func SetResourceRevisionLabel(obj client.Object, revision string)

Types

type IngressSetupPendingError

type IngressSetupPendingError struct{}

func (IngressSetupPendingError) Error

func (e IngressSetupPendingError) Error() string

Jump to

Keyboard shortcuts

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