util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 5

Documentation

Overview

Copyright Contributors to the Open Cluster Management project

Copyright Contributors to the Open Cluster Management project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSelfManagedClusterName

func GenerateSelfManagedClusterName(ctx context.Context, inClusterConfig *rest.Config) (string, error)

GenerateSelfManagedClusterName generates an ID for the self management cluster. If the worker manager addon is enabled, this ID will be same with `id.k8s.io` cluster claim. We get ID by the sequence of: openshiftID, uid of kube-system namespace, random UID.

func GenerateServiceAccountKey

func GenerateServiceAccountKey(file string) error

func GetComponentNamespace

func GetComponentNamespace() string

func GetExternalHost

func GetExternalHost() (string, error)

GetExternalHost get the generated external IP from service

func GoContext

func GoContext(stopCh <-chan struct{}) context.Context

func KubeconfigWriteToFile

func KubeconfigWriteToFile(filename string, clusterURL string, clusterTrustBundle []byte, clientCertPEM []byte, clientKeyPEM []byte) error

KubeConfigWithClientCerts creates a kubeconfig authenticating with client cert/key and write it to `path`

func KubeconfigWroteToSecret

func KubeconfigWroteToSecret(config *rest.Config, secretName, clusterURL string, clusterTrustBundle, clientCertPEM, clientKeyPEM []byte) error

KubeConfigWithClientCerts creates a kubeconfig authenticating with client cert/key and write it to secret "kubeconfig"

func LoadServingSigner

func LoadServingSigner(signerPath string) (bool, error)

func NewLoggingRecorder

func NewLoggingRecorder(componentName string) events.Recorder

Types

This section is empty.

Jump to

Keyboard shortcuts

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