controllers

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package controllers contains code common for the device plugin controllers.

Index

Constants

This section is empty.

Variables

View Source
var (
	ImageMinVersion = versionutil.MustParseSemantic("0.26.2")
)

Functions

func GetDevicePluginCount

func GetDevicePluginCount(pluginKind string) int

GetDevicePluginCount returns number of device plugin CRs registered.

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager, controller DevicePluginController, apiGVString, pluginKind, ownerKey string) error

SetupWithManager sets up a reconciler for a given device plugin controller.

func UpgradeImages added in v0.24.0

func UpgradeImages(image *string, initimage *string) (upgrade bool)

Types

type DefaultServiceAccountFactory added in v0.22.0

type DefaultServiceAccountFactory struct{}

DefaultServiceAccountFactory is an empty ServiceAccountFactory. "default" will be used for the service account then.

func (*DefaultServiceAccountFactory) NewClusterRoleBinding added in v0.22.0

func (d *DefaultServiceAccountFactory) NewClusterRoleBinding(rawObj client.Object) *rbacv1.ClusterRoleBinding

func (*DefaultServiceAccountFactory) NewServiceAccount added in v0.22.0

func (d *DefaultServiceAccountFactory) NewServiceAccount(rawObj client.Object) *v1.ServiceAccount

type DevicePluginController

type DevicePluginController interface {
	ServiceAccountFactory
	CreateEmptyObject() (devicePlugin client.Object)
	GetTotalObjectCount(ctx context.Context, client client.Client) (count int, err error)
	NewDaemonSet(devicePlugin client.Object) *apps.DaemonSet
	UpdateDaemonSet(client.Object, *apps.DaemonSet) (updated bool)
	UpdateStatus(client.Object, *apps.DaemonSet, []string) (updated bool, err error)
	Upgrade(ctx context.Context, obj client.Object) (upgrade bool)
}

DevicePluginController provides functionality for manipulating actual device plugin CRD objects.

type ServiceAccountFactory added in v0.22.0

type ServiceAccountFactory interface {
	NewServiceAccount(rawObj client.Object) *v1.ServiceAccount
	NewClusterRoleBinding(rawObj client.Object) *rbacv1.ClusterRoleBinding
}

ServiceAccountFactory provides functions for creating a service account and related objects Note that the rbac Role can be generated from kubebuilder:rbac comment (some examples above), which is the reason why this interface does not yet have a NewRole function.

Directories

Path Synopsis
Package dlb contains DLB specific reconciliation logic.
Package dlb contains DLB specific reconciliation logic.
Package dsa contains DSA specific reconciliation logic.
Package dsa contains DSA specific reconciliation logic.
Package fpga contains FPGA specific reconciliation logic.
Package fpga contains FPGA specific reconciliation logic.
Package gpu contains GPU specific reconciliation logic.
Package gpu contains GPU specific reconciliation logic.
Package iaa contains IAA specific reconciliation logic.
Package iaa contains IAA specific reconciliation logic.
Package qat contains QAT specific reconciliation logic.
Package qat contains QAT specific reconciliation logic.
Package sgx contains SGX specific reconciliation logic.
Package sgx contains SGX specific reconciliation logic.

Jump to

Keyboard shortcuts

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