Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the policy v1 API group +kubebuilder:object:generate=true +groupName=policy.xilinx.com
Index ¶
- Variables
- func ImagePath(repo string, image string, tag string) string
- func ImagePullPolicy(pullPolicy string) corev1.PullPolicy
- type ClusterPolicy
- type ClusterPolicyList
- type ClusterPolicySpec
- type ClusterPolicyStatus
- type ContainerRuntimeSpec
- type DevicePluginSpec
- type HostSetupSpec
- type OperatorSpec
- type OsDistSetupSpec
- type Runtime
- type State
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "policy.xilinx.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func ImagePullPolicy ¶
func ImagePullPolicy(pullPolicy string) corev1.PullPolicy
ImagePullPolicy sets image pull policy
Types ¶
type ClusterPolicy ¶
type ClusterPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterPolicySpec `json:"spec,omitempty"` Status ClusterPolicyStatus `json:"status,omitempty"` }
ClusterPolicy is the Schema for the clusterpolicies API
func (*ClusterPolicy) DeepCopy ¶
func (in *ClusterPolicy) DeepCopy() *ClusterPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicy.
func (*ClusterPolicy) DeepCopyInto ¶
func (in *ClusterPolicy) DeepCopyInto(out *ClusterPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicy) DeepCopyObject ¶
func (in *ClusterPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterPolicy) SetStatus ¶
func (p *ClusterPolicy) SetStatus(s State, ns string)
SetStatus sets state and namespace of ClusterPolicy instance
type ClusterPolicyList ¶
type ClusterPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterPolicy `json:"items"` }
ClusterPolicyList contains a list of ClusterPolicy
func (*ClusterPolicyList) DeepCopy ¶
func (in *ClusterPolicyList) DeepCopy() *ClusterPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyList.
func (*ClusterPolicyList) DeepCopyInto ¶
func (in *ClusterPolicyList) DeepCopyInto(out *ClusterPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPolicyList) DeepCopyObject ¶
func (in *ClusterPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPolicySpec ¶
type ClusterPolicySpec struct { // Operator component spec Operator OperatorSpec `json:"operator"` // ContainerRuntime component spec ContainerRuntime ContainerRuntimeSpec `json:"containerRuntime"` // DevicePlugin component spec DevicePlugin DevicePluginSpec `json:"devicePlugin"` // HostSetup component spec HostSetup HostSetupSpec `json:"hostSetup"` }
ClusterPolicySpec defines the desired state of ClusterPolicy
func (*ClusterPolicySpec) DeepCopy ¶
func (in *ClusterPolicySpec) DeepCopy() *ClusterPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicySpec.
func (*ClusterPolicySpec) DeepCopyInto ¶
func (in *ClusterPolicySpec) DeepCopyInto(out *ClusterPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPolicyStatus ¶
type ClusterPolicyStatus struct { // +kubebuilder:validation:Enum=ignored;ready;notReady;disabled // State indicates status of ClusterPolicy State State `json:"state"` // Namespace indicates a namespace in which the operator is installed Namespace string `json:"namespace,omitempty"` }
ClusterPolicyStatus defines the observed state of ClusterPolicy
func (*ClusterPolicyStatus) DeepCopy ¶
func (in *ClusterPolicyStatus) DeepCopy() *ClusterPolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPolicyStatus.
func (*ClusterPolicyStatus) DeepCopyInto ¶
func (in *ClusterPolicyStatus) DeepCopyInto(out *ClusterPolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerRuntimeSpec ¶
type ContainerRuntimeSpec struct { // Enabled indicates if deployment of Xilinx Container Toolkit through operator is enabled Enabled *bool `json:"enabled,omitempty"` // +kubebuilder:default=xilinx RuntimeClass string `json:"runtimeClass,omitempty"` // set as default SetAsDefault *bool `json:"setAsDefault,omitempty"` // Xilinx Container Toolkit image repo // +kubebuilder:validation:Optional Repository string `json:"repository,omitempty"` // Xilinx Container Toolkit image name // +kubebuilder:validation:Pattern=[a-zA-Z0-9\-]+ Image string `json:"image,omitempty"` // Xilinx Container toolkit image tag // +kubebuilder:validation:Optional Tag string `json:"tag,omitempty"` // Image pull policy // +kubebuilder:validation:Optional ImagePullPolicy string `json:"imagePullPolicy,omitempty"` // Image pull secrets // +kubebuilder:validation:Optional ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` // Optional: List of arguments Args []string `json:"args,omitempty"` // Optional: List of environment variables Env []corev1.EnvVar `json:"env,omitempty"` // XCR install directory on the host // +kubebuilder:validation:Optional // +kubebuilder:default=/usr/bin InstallDir string `json:"installDir,omitempty"` }
func (*ContainerRuntimeSpec) DeepCopy ¶
func (in *ContainerRuntimeSpec) DeepCopy() *ContainerRuntimeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerRuntimeSpec.
func (*ContainerRuntimeSpec) DeepCopyInto ¶
func (in *ContainerRuntimeSpec) DeepCopyInto(out *ContainerRuntimeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ContainerRuntimeSpec) IsEnabled ¶
func (crs *ContainerRuntimeSpec) IsEnabled() bool
type DevicePluginSpec ¶
type DevicePluginSpec struct { // Enabled indicates if deployment of Xilinx Container Toolkit through operator is enabled Enabled *bool `json:"enabled,omitempty"` // device-plugin image repo // +kubebuilder:validation:Optional Repository string `json:"repository,omitempty"` // device-plugin image name // +kubebuilder:validation:Pattern=[a-zA-Z0-9\-]+ Image string `json:"image,omitempty"` // device-plugin image tag // +kubebuilder:validation:Optional Tag string `json:"tag,omitempty"` // Image pull policy // +kubebuilder:validation:Optional ImagePullPolicy string `json:"imagePullPolicy,omitempty"` // Image pull secrets // +kubebuilder:validation:Optional ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` // Optional: List of environment variables Env []corev1.EnvVar `json:"env,omitempty"` }
func (*DevicePluginSpec) DeepCopy ¶
func (in *DevicePluginSpec) DeepCopy() *DevicePluginSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePluginSpec.
func (*DevicePluginSpec) DeepCopyInto ¶
func (in *DevicePluginSpec) DeepCopyInto(out *DevicePluginSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DevicePluginSpec) IsEnabled ¶
func (dps *DevicePluginSpec) IsEnabled() bool
type HostSetupSpec ¶
type HostSetupSpec struct { // Enabled indicates if deployment of Xilinx Container Toolkit through operator is enabled Enabled *bool `json:"enabled,omitempty"` // Setup per os distributions, eg. ubuntu18, ubuntu20 OsDists []OsDistSetupSpec `json:"osDists"` }
func (*HostSetupSpec) DeepCopy ¶
func (in *HostSetupSpec) DeepCopy() *HostSetupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSetupSpec.
func (*HostSetupSpec) DeepCopyInto ¶
func (in *HostSetupSpec) DeepCopyInto(out *HostSetupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HostSetupSpec) IsEnabled ¶
func (hss *HostSetupSpec) IsEnabled() bool
type OperatorSpec ¶
type OperatorSpec struct { // +kubebuilder:validation:Enum=docker;containerd // +kubebuilder:default=containerd DefaultRuntime Runtime `json:"defaultRuntime"` }
func (*OperatorSpec) DeepCopy ¶
func (in *OperatorSpec) DeepCopy() *OperatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorSpec.
func (*OperatorSpec) DeepCopyInto ¶
func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OsDistSetupSpec ¶
type OsDistSetupSpec struct { // OS distribution, eg. ubuntu, centos // +kubebuilder:validation:Enum=ubuntu;centos;amzn;rhel OsId string `json:"osId"` // OS major version, eg. 18, 20 OsMajorVersion string `json:"osMajorVersion"` // The version to be setup Version string `json:"version,omitempty"` // XRM installation enabled XrmInstallation *bool `json:"xrmInstallation,omitempty"` // shell flash enabled ShellFlashEnabled *bool `json:"shellFlashEnabled,omitempty"` // Cards on the host, empty to perform setup for all cards // +kubebuilder:validation:Optional Cards []string `json:"cards"` // host-setup image repo // +kubebuilder:validation:Optional Repository string `json:"repository,omitempty"` // host-setup image name // +kubebuilder:validation:Pattern=[a-zA-Z0-9\-]+ Image string `json:"image,omitempty"` // host-setup image tag // +kubebuilder:validation:Optional Tag string `json:"tag,omitempty"` // Image pull policy // +kubebuilder:validation:Optional ImagePullPolicy string `json:"imagePullPolicy,omitempty"` // Image pull secrets // +kubebuilder:validation:Optional ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` }
func (*OsDistSetupSpec) DeepCopy ¶
func (in *OsDistSetupSpec) DeepCopy() *OsDistSetupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OsDistSetupSpec.
func (*OsDistSetupSpec) DeepCopyInto ¶
func (in *OsDistSetupSpec) DeepCopyInto(out *OsDistSetupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type State ¶
type State string
State indicates state of GPU operator components
const ( // Ignored indicates duplicate ClusterPolicy instances and rest are ignored. Ignored State = "ignored" // Ready indicates all components of ClusterPolicy are ready Ready State = "ready" // NotReady indicates some/all components of ClusterPolicy are not ready NotReady State = "notReady" // Disabled indicates if the state is disabled Disabled State = "disabled" )