forge

package
v1.0.0-rc.3 Latest Latest
Warning

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

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

Documentation

Overview

Package forge contains the logic required to generate the virtual kubelet resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterRoleLabels added in v0.3.0

func ClusterRoleLabels(remoteClusterID liqov1beta1.ClusterID) map[string]string

ClusterRoleLabels returns the labels to be set on a ClusterRoleBinding related to a VirtualKubelet.

func DestringifyArgument

func DestringifyArgument(arg string) (key, value string)

DestringifyArgument returns the key and the value of the string representation of the key-value pair.

func StringifyArgument

func StringifyArgument(key, value string) string

StringifyArgument returns a string representation of the key-value pair.

func VirtualKubeletClusterRoleBinding added in v0.3.0

func VirtualKubeletClusterRoleBinding(kubeletNamespace, kubeletName string,
	remoteCluster liqov1beta1.ClusterID) *rbacv1.ClusterRoleBinding

VirtualKubeletClusterRoleBinding forges a ClusterRoleBinding for a VirtualKubelet.

func VirtualKubeletDeployment added in v0.3.0

func VirtualKubeletDeployment(homeCluster liqov1beta1.ClusterID, localPodCIDR, liqoNamespace string,
	virtualNode *offloadingv1beta1.VirtualNode, opts *offloadingv1beta1.VkOptionsTemplate) *appsv1.Deployment

VirtualKubeletDeployment forges the deployment for a virtual-kubelet.

func VirtualKubeletLabels added in v0.3.0

func VirtualKubeletLabels(virtualNode *offloadingv1beta1.VirtualNode) map[string]string

VirtualKubeletLabels forges the labels for a virtual-kubelet.

func VirtualKubeletName added in v0.9.0

func VirtualKubeletName(virtualNode *offloadingv1beta1.VirtualNode) string

VirtualKubeletName returns the name of the virtual-kubelet.

func VirtualKubeletServiceAccount added in v0.3.0

func VirtualKubeletServiceAccount(namespace, name string) *v1.ServiceAccount

VirtualKubeletServiceAccount forges a ServiceAccount for a VirtualKubelet.

Types

type VirtualKubeletOptsFlag added in v0.9.0

type VirtualKubeletOptsFlag string

VirtualKubeletOptsFlag defines the custom options flags associated with the virtual kubelet deployment forging.

const (
	// ForeignClusterID is the flag used to specify the foreign cluster ID.
	ForeignClusterID VirtualKubeletOptsFlag = "--foreign-cluster-id"
	//nolint:gosec // we are not using this flag to store sensitive data
	// ForeignClusterKubeconfigSecretName is the flag used to specify the foreign cluster kubeconfig secret name.
	ForeignClusterKubeconfigSecretName VirtualKubeletOptsFlag = "--foreign-kubeconfig-secret-name"
	// NodeName is the flag used to specify the node name.
	NodeName VirtualKubeletOptsFlag = "--nodename"
	// NodeIP is the flag used to specify the node IP.
	NodeIP VirtualKubeletOptsFlag = "--node-ip"
	// TenantNamespace is the flag used to specify the tenant namespace.
	TenantNamespace VirtualKubeletOptsFlag = "--tenant-namespace"
	// LiqoNamespace is the flag used to specify the Liqo namespace.
	LiqoNamespace VirtualKubeletOptsFlag = "--liqo-namespace"
	// HomeClusterID is the flag used to specify the home cluster ID.
	HomeClusterID VirtualKubeletOptsFlag = "--home-cluster-id"
	// LocalPodCIDR is the flag used to specify the local pod CIDR.
	LocalPodCIDR VirtualKubeletOptsFlag = "--local-podcidr"
	// EnableStorage is the flag used to enable the storage.
	EnableStorage VirtualKubeletOptsFlag = "--enable-storage"
	// RemoteRealStorageClassName is the flag used to specify the remote real storage class name.
	RemoteRealStorageClassName VirtualKubeletOptsFlag = "--remote-real-storage-class-name"
	// EnableIngress is the flag used to enable the ingress.
	EnableIngress VirtualKubeletOptsFlag = "--enable-ingress"
	// RemoteRealIngressClassName is the flag used to specify the remote real ingress class name.
	RemoteRealIngressClassName VirtualKubeletOptsFlag = "--remote-real-ingress-class-name"
	// EnableLoadBalancer is the flag used to enable the load balancer.
	EnableLoadBalancer VirtualKubeletOptsFlag = "--enable-load-balancer"
	// RemoteRealLoadBalancerClassName is the flag used to specify the remote real load balancer class name.
	RemoteRealLoadBalancerClassName VirtualKubeletOptsFlag = "--remote-real-load-balancer-class-name"
	// NodeExtraAnnotations is the flag used to specify the node extra annotations.
	NodeExtraAnnotations VirtualKubeletOptsFlag = "--node-extra-annotations"
	// NodeExtraLabels is the flag used to specify the node extra labels.
	NodeExtraLabels VirtualKubeletOptsFlag = "--node-extra-labels"
	// MetricsEnabled is the flag used to enable the metrics.
	MetricsEnabled VirtualKubeletOptsFlag = "--metrics-enabled"
	// MetricsAddress is the flag used to specify the metrics address.
	MetricsAddress VirtualKubeletOptsFlag = "--metrics-address"
	// CreateNode is the flag used to specify if the node must be created.
	CreateNode VirtualKubeletOptsFlag = "--create-node"
	// NodeCheckNetwork is the flag used to specify if the network must be checked.
	NodeCheckNetwork VirtualKubeletOptsFlag = "--node-check-network"
)

Jump to

Keyboard shortcuts

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