controllers

package
v0.0.0-...-aa61b3d Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRuntimeClass     = "xilinx"
	DefaultXCRInstallDir    = "/usr/bin"
	DefaultXCRConfigDir     = "/etc/xilinx-container-runtime"
	DefaultDockerConfig     = "/etc/docker/daemon.json"
	DefaultDockerSocket     = "/var/run/docker.sock"
	DefaultContainerdConfig = "/etc/containerd/config.toml"
	DefaultContainerdSocket = "/var/run/containerd/containerd.sock"
	XilinxAnnotationHashKey = "xilinx.com/last-applied-hash"
)

Variables

This section is empty.

Functions

func DaemonSet

func DaemonSet(ctrl ClusterPolicyController) (policyv1.State, error)

DaemonSet creates DaemonSet resource

func RuntimeClass

func RuntimeClass(n ClusterPolicyController) (policyv1.State, error)

RuntimeClass creates RuntimeClass object

func TransformContainerRuntime

func TransformContainerRuntime(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ctrl ClusterPolicyController) error

TransformContainerRuntime transforms Xilinx container runtime daemonset with required config as per ClusterPolicy

func TransformDevicePlugin

func TransformDevicePlugin(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ctrl ClusterPolicyController) error

func TransformHostSetup

func TransformHostSetup(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ctrl ClusterPolicyController) error

Types

type ClusterPolicyController

type ClusterPolicyController struct {
	// contains filtered or unexported fields
}

ClusterPolicyController represents clusterpolicy controller spec for FPGA operator

type ClusterPolicyReconciler

type ClusterPolicyReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

ClusterPolicyReconciler reconciles a ClusterPolicy object

func (*ClusterPolicyReconciler) Reconcile

func (r *ClusterPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ClusterPolicy object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile

func (*ClusterPolicyReconciler) SetupWithManager

func (r *ClusterPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type NoSpecError

type NoSpecError struct{}

Error to state spec not found for a daemonset

func (*NoSpecError) Error

func (e *NoSpecError) Error() string

type Resources

type Resources struct {
	Daemonsets   []appsv1.DaemonSet
	RuntimeClass nodev1.RuntimeClass
}

Jump to

Keyboard shortcuts

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