hub

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCP   string = "gcp"
	AWS   string = "aws"
	AZURE string = "azure"
)

Variables

View Source
var (
	ProjectNamespace     = os.Getenv("HUB_PROJECT_NAMESPACE")
	HubEndpoint          = os.Getenv("HUB_HOST_ENDPOINT")
	ClusterName          = os.Getenv("CLUSTER_NAME")
	HubTokenFile         = utils.GetEnvOrDefault("HUB_TOKEN_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/token")
	HubCAFile            = utils.GetEnvOrDefault("HUB_CA_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/ca.crt")
	KubeSliceDashboardSA = "kubeslice-kubernetes-dashboard"
	HubSecretSuffix      = "-kubernetes-dashboard"
)

Functions

func DeleteNamespaceInfoFromHub

func DeleteNamespaceInfoFromHub(ctx context.Context, hubClient client.Client, onboardNamespace string) error

func UpdateNamespaceInfoToHub

func UpdateNamespaceInfoToHub(ctx context.Context, hubClient client.Client, onboardNamespace, sliceName string) error

Types

type HubClientConfig

type HubClientConfig struct {
	client.Client
	// contains filtered or unexported fields
}

func NewHubClientConfig

func NewHubClientConfig(er *monitoring.EventRecorder) (*HubClientConfig, error)

func (*HubClientConfig) CreateWorkerSliceGwRecycler

func (hubClient *HubClientConfig) CreateWorkerSliceGwRecycler(ctx context.Context, gwRecyclerName, clientID, serverID, sliceGwServer, sliceGwClient, slice string) error

func (*HubClientConfig) DeleteServiceExport

func (hubClient *HubClientConfig) DeleteServiceExport(ctx context.Context, serviceexport *kubeslicev1beta1.ServiceExport) error

func (*HubClientConfig) DeleteWorkerSliceGwRecycler added in v1.1.5

func (hubClient *HubClientConfig) DeleteWorkerSliceGwRecycler(ctx context.Context, gwRecyclerName string) error

func (*HubClientConfig) GetClusterNodeIP

func (hubClient *HubClientConfig) GetClusterNodeIP(ctx context.Context, clusterName, namespace string) ([]string, error)

func (*HubClientConfig) GetVPNKeyRotation

func (hubClient *HubClientConfig) GetVPNKeyRotation(ctx context.Context, rotationName string) (*hubv1alpha1.VpnKeyRotation, error)

func (*HubClientConfig) ListWorkerSliceGwRecycler

func (hubClient *HubClientConfig) ListWorkerSliceGwRecycler(ctx context.Context, sliceGWName string) ([]spokev1alpha1.WorkerSliceGwRecycler, error)

func (*HubClientConfig) UpdateAppNamespaces

func (hubClient *HubClientConfig) UpdateAppNamespaces(ctx context.Context, sliceConfigName string, onboardedNamespaces []string) error

func (*HubClientConfig) UpdateAppPodsList

func (hubClient *HubClientConfig) UpdateAppPodsList(ctx context.Context, sliceConfigName string, appPods []kubeslicev1beta1.AppPod) error

func (*HubClientConfig) UpdateLBIPsForSliceGwServer added in v1.2.0

func (hubClient *HubClientConfig) UpdateLBIPsForSliceGwServer(ctx context.Context, lbIPs []string, sliceGwName string) error

func (*HubClientConfig) UpdateNodePortForSliceGwServer

func (hubClient *HubClientConfig) UpdateNodePortForSliceGwServer(ctx context.Context, sliceGwNodePorts []int, sliceGwName string) error

func (*HubClientConfig) UpdateServiceExport

func (hubClient *HubClientConfig) UpdateServiceExport(ctx context.Context, serviceexport *kubeslicev1beta1.ServiceExport) error

func (*HubClientConfig) UpdateServiceExportEndpointForIngressGw

func (hubClient *HubClientConfig) UpdateServiceExportEndpointForIngressGw(ctx context.Context, serviceexport *kubeslicev1beta1.ServiceExport,
	ep *kubeslicev1beta1.ServicePod) error

type HubClientRpc

type HubClientRpc interface {
	UpdateNodePortForSliceGwServer(ctx context.Context, sliceGwNodePort int32, sliceGwName string) error
	UpdateServiceExport(ctx context.Context, serviceexport *kubeslicev1beta1.ServiceExport) error
	UpdateServiceExportEndpointForIngressGw(ctx context.Context, serviceexport *kubeslicev1beta1.ServiceExport,
		ep *kubeslicev1beta1.ServicePod) error
	UpdateAppNamespaces(ctx context.Context, sliceConfigName string, onboardedNamespaces []string) error
	CreateWorkerSliceGwRecycler(ctx context.Context, gwRecyclerName, clientID, serverID, sliceGwServer, sliceGwClient, slice string) error
	DeleteWorkerSliceGwRecycler(ctx context.Context, gwRecyclerName string) error
	UpdateLBIPsForSliceGwServer(ctx context.Context, lbIP []string, sliceGwName string) error
}

Jump to

Keyboard shortcuts

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