Documentation ¶
Index ¶
- Constants
- func DaemonSet(ctrl ClusterPolicyController) (policyv1.State, error)
- func RuntimeClass(n ClusterPolicyController) (policyv1.State, error)
- func TransformContainerRuntime(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ...) error
- func TransformDevicePlugin(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ...) error
- func TransformHostSetup(obj *appsv1.DaemonSet, config *policyv1.ClusterPolicySpec, ...) error
- type ClusterPolicyController
- type ClusterPolicyReconciler
- type NoSpecError
- type Resources
Constants ¶
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 ¶
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