Documentation
¶
Overview ¶
Package forge contains the logic required to generate the virtual kubelet resources.
Index ¶
- func ClusterRoleLabels(remoteClusterID string) map[string]string
- func VirtualKubeletClusterRoleBinding(kubeletNamespace, kubeletName string, ...) *rbacv1.ClusterRoleBinding
- func VirtualKubeletDeployment(homeCluster *discoveryv1alpha1.ClusterIdentity, ...) *appsv1.Deployment
- func VirtualKubeletLabels(virtualNode *virtualkubeletv1alpha1.VirtualNode, opts *VirtualKubeletOpts) map[string]string
- func VirtualKubeletName(virtualNode *virtualkubeletv1alpha1.VirtualNode) string
- func VirtualKubeletServiceAccount(namespace, name string) *v1.ServiceAccount
- type VirtualKubeletOpts
- type VirtualKubeletOptsFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterRoleLabels ¶ added in v0.3.0
ClusterRoleLabels returns the labels to be set on a ClusterRoleBinding related to a VirtualKubelet.
func VirtualKubeletClusterRoleBinding ¶ added in v0.3.0
func VirtualKubeletClusterRoleBinding(kubeletNamespace, kubeletName string, remoteCluster *discoveryv1alpha1.ClusterIdentity) *rbacv1.ClusterRoleBinding
VirtualKubeletClusterRoleBinding forges a ClusterRoleBinding for a VirtualKubelet.
func VirtualKubeletDeployment ¶ added in v0.3.0
func VirtualKubeletDeployment(homeCluster *discoveryv1alpha1.ClusterIdentity, virtualNode *virtualkubeletv1alpha1.VirtualNode, opts *VirtualKubeletOpts) *appsv1.Deployment
VirtualKubeletDeployment forges the deployment for a virtual-kubelet.
func VirtualKubeletLabels ¶ added in v0.3.0
func VirtualKubeletLabels(virtualNode *virtualkubeletv1alpha1.VirtualNode, opts *VirtualKubeletOpts) map[string]string
VirtualKubeletLabels forges the labels for a virtual-kubelet.
func VirtualKubeletName ¶ added in v0.9.0
func VirtualKubeletName(virtualNode *virtualkubeletv1alpha1.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 VirtualKubeletOpts ¶ added in v0.3.0
type VirtualKubeletOpts struct { // ContainerImage contains the virtual kubelet image name and tag. ContainerImage string ExtraAnnotations map[string]string ExtraLabels map[string]string ExtraArgs []string NodeExtraAnnotations argsutils.StringMap NodeExtraLabels argsutils.StringMap RequestsCPU resource.Quantity LimitsCPU resource.Quantity RequestsRAM resource.Quantity LimitsRAM resource.Quantity IpamEndpoint string MetricsEnabled bool MetricsAddress string ReflectorsWorkers map[string]*uint ReflectorsType map[string]*string }
VirtualKubeletOpts defines the custom options associated with the virtual kubelet deployment forging.
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" // ForeignClusterName is the flag used to specify the foreign cluster name. ForeignClusterName VirtualKubeletOptsFlag = "--foreign-cluster-name" //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" // HomeClusterID is the flag used to specify the home cluster ID. HomeClusterID VirtualKubeletOptsFlag = "--home-cluster-id" // HomeClusterName is the flag used to specify the home cluster name. HomeClusterName VirtualKubeletOptsFlag = "--home-cluster-name" // IpamEndpoint is the flag used to specify the IPAM endpoint. IpamEndpoint VirtualKubeletOptsFlag = "--ipam-server" // 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" )