Documentation ¶
Overview ¶
Package controllers contains code common for the device plugin controllers.
Index ¶
- Variables
- func HasTolerationsChanged(before, after []v1.Toleration) bool
- func SetupWithManager(mgr ctrl.Manager, controller DevicePluginController, ...) error
- func SuffixedName(base, suffix string) string
- func UpgradeImages(ctx context.Context, image *string, initimage *string) (upgrade bool)
- type DefaultServiceAccountFactory
- func (d *DefaultServiceAccountFactory) NewSharedClusterRoleBinding() *rbacv1.ClusterRoleBinding
- func (d *DefaultServiceAccountFactory) NewSharedServiceAccount() *v1.ServiceAccount
- func (d *DefaultServiceAccountFactory) PluginMayRequireSharedObjects() bool
- func (d *DefaultServiceAccountFactory) PluginRequiresSharedObjects(ctx context.Context, client client.Client) bool
- type DevicePluginController
- type SharedObjectsFactory
Constants ¶
This section is empty.
Variables ¶
var (
ImageMinVersion = versionutil.MustParseSemantic("0.31.1")
)
Functions ¶
func HasTolerationsChanged ¶ added in v0.30.0
func HasTolerationsChanged(before, after []v1.Toleration) bool
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 SuffixedName ¶ added in v0.29.0
Combine base and suffix with a dash.
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) NewSharedClusterRoleBinding ¶ added in v0.29.0
func (d *DefaultServiceAccountFactory) NewSharedClusterRoleBinding() *rbacv1.ClusterRoleBinding
func (*DefaultServiceAccountFactory) NewSharedServiceAccount ¶ added in v0.29.0
func (d *DefaultServiceAccountFactory) NewSharedServiceAccount() *v1.ServiceAccount
func (*DefaultServiceAccountFactory) PluginMayRequireSharedObjects ¶ added in v0.29.0
func (d *DefaultServiceAccountFactory) PluginMayRequireSharedObjects() bool
func (*DefaultServiceAccountFactory) PluginRequiresSharedObjects ¶ added in v0.29.0
type DevicePluginController ¶
type DevicePluginController interface { SharedObjectsFactory CreateEmptyObject() (devicePlugin client.Object) 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 SharedObjectsFactory ¶ added in v0.29.0
type SharedObjectsFactory interface { bool // Indicates if plugin currently require shared objects. }PluginMayRequireSharedObjects()
SharedObjectsFactory provides functions for creating service account and cluster rule binding 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. |