Documentation
¶
Index ¶
- func AnnotateNode(ctx context.Context, nodeName string, key, value string, c client.Client) error
- func AnnotateObject(ctx context.Context, obj client.Object, key, value string, c client.Client) error
- func GetChrootExtension() string
- func GetHostExtension() string
- func GetHostExtensionPath(path string) string
- func IsCommandNotFound(err error) bool
- func IsExternalControlPlaneCluster(c client.Client) (bool, error)
- func IsSingleNodeCluster(c client.Client) (bool, error)
- func LabelNode(ctx context.Context, nodeName string, key, value string, c client.Client) error
- func ObjectHasAnnotation(obj metav1.Object, annoKey string, value string) bool
- func ObjectHasAnnotationKey(obj metav1.Object, annoKey string) bool
- func RemoveLabelFromNode(ctx context.Context, nodeName string, key string, c client.Client) error
- func Shutdown()
- type CmdInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateNode ¶ added in v1.3.0
AnnotateNode add annotation to a node
func AnnotateObject ¶ added in v1.3.0
func AnnotateObject(ctx context.Context, obj client.Object, key, value string, c client.Client) error
AnnotateObject adds annotation to a kubernetes object
func GetChrootExtension ¶ added in v1.3.0
func GetChrootExtension() string
func GetHostExtension ¶ added in v1.3.0
func GetHostExtension() string
func GetHostExtensionPath ¶ added in v1.3.0
func IsCommandNotFound ¶ added in v1.3.0
func IsExternalControlPlaneCluster ¶ added in v1.3.0
IsExternalControlPlaneCluster detects control plane location of the cluster. On OpenShift, the control plane topology is configured in configv1.Infrastucture struct. On kubernetes, it is determined by which node the sriov operator is scheduled on. If operator pod is schedule on worker node, it is considered as external control plane.
func ObjectHasAnnotation ¶ added in v1.3.0
ObjectHasAnnotation checks if a kubernetes object already contains annotation
func ObjectHasAnnotationKey ¶ added in v1.3.0
ObjectHasAnnotationKey checks if a kubernetes object already contains annotation
func RemoveLabelFromNode ¶ added in v1.5.0
Types ¶
Click to show internal directories.
Click to hide internal directories.