v1

package
v0.0.0-...-0744492 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Overview

Package v1 contains API Schema definitions for the ptp v1 API group +kubebuilder:object:generate=true +groupName=ptp.openshift.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ptp.openshift.io", Version: "v1"}

	// SchemeGroupVersion is group version used to register these objects ADDED MANUALLY
	SchemeGroupVersion = schema.GroupVersion{Group: "ptp.openshift.io", 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 GetInterfaces

func GetInterfaces(config PtpConfig, mode PtpRole) (interfaces []string)

Types

type HwConfig

type HwConfig struct {
	// DeviceID is the unique identifier for the hardware device.
	// +optional
	DeviceID string `json:"deviceID,omitempty"`

	// VendorID is the identifier for the vendor of the hardware device.
	// +optional
	VendorID string `json:"vendorID,omitempty"`

	// Failed indicates whether the hardware configuration has failed.
	// A value of true means the configuration has failed.
	// +optional
	Failed bool `json:"failed,omitempty"`

	// Status provides a descriptive status of the hardware device's configuration.
	// +optional
	Status string `json:"status,omitempty"`

	// Config contains the configuration settings for the hardware device.
	// This is a JSON object that holds the device-specific configuration.
	// +optional
	Config *apiextensions.JSON `json:"config,omitempty"`
}

func (*HwConfig) DeepCopy

func (in *HwConfig) DeepCopy() *HwConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HwConfig.

func (*HwConfig) DeepCopyInto

func (in *HwConfig) DeepCopyInto(out *HwConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MatchRule

type MatchRule struct {
	NodeLabel *string `json:"nodeLabel,omitempty"`
	NodeName  *string `json:"nodeName,omitempty"`
}

func (*MatchRule) DeepCopy

func (in *MatchRule) DeepCopy() *MatchRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchRule.

func (*MatchRule) DeepCopyInto

func (in *MatchRule) DeepCopyInto(out *MatchRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMatchList

type NodeMatchList struct {
	NodeName *string `json:"nodeName"`
	Profile  *string `json:"profile"`
}

func (*NodeMatchList) DeepCopy

func (in *NodeMatchList) DeepCopy() *NodeMatchList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMatchList.

func (*NodeMatchList) DeepCopyInto

func (in *NodeMatchList) DeepCopyInto(out *NodeMatchList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePtpDevice

type NodePtpDevice struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodePtpDeviceSpec   `json:"spec,omitempty"`
	Status NodePtpDeviceStatus `json:"status,omitempty"`
}

NodePtpDevice is the Schema for the nodeptpdevices API

func (*NodePtpDevice) DeepCopy

func (in *NodePtpDevice) DeepCopy() *NodePtpDevice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePtpDevice.

func (*NodePtpDevice) DeepCopyInto

func (in *NodePtpDevice) DeepCopyInto(out *NodePtpDevice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodePtpDevice) DeepCopyObject

func (in *NodePtpDevice) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodePtpDeviceList

type NodePtpDeviceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodePtpDevice `json:"items"`
}

NodePtpDeviceList contains a list of NodePtpDevice

func (*NodePtpDeviceList) DeepCopy

func (in *NodePtpDeviceList) DeepCopy() *NodePtpDeviceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePtpDeviceList.

func (*NodePtpDeviceList) DeepCopyInto

func (in *NodePtpDeviceList) DeepCopyInto(out *NodePtpDeviceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodePtpDeviceList) DeepCopyObject

func (in *NodePtpDeviceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodePtpDeviceSpec

type NodePtpDeviceSpec struct {
}

NodePtpDeviceSpec defines the desired state of NodePtpDevice

func (*NodePtpDeviceSpec) DeepCopy

func (in *NodePtpDeviceSpec) DeepCopy() *NodePtpDeviceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePtpDeviceSpec.

func (*NodePtpDeviceSpec) DeepCopyInto

func (in *NodePtpDeviceSpec) DeepCopyInto(out *NodePtpDeviceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePtpDeviceStatus

type NodePtpDeviceStatus struct {

	// PtpDevice represents a PTP device available in the cluster node.
	// This struct contains information about the device, including its name and profile.
	// +optional
	Devices []PtpDevice `json:"devices,omitempty"`

	// HwConfig represents the hardware configuration for a device in the cluster.
	// This struct contains information about the device's identification and status,
	// as well as its specific configuration settings.
	// +optional
	Hwconfig []HwConfig `json:"hwconfig,omitempty"`
}

NodePtpDeviceStatus defines the observed state of NodePtpDevice

func (*NodePtpDeviceStatus) DeepCopy

func (in *NodePtpDeviceStatus) DeepCopy() *NodePtpDeviceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePtpDeviceStatus.

func (*NodePtpDeviceStatus) DeepCopyInto

func (in *NodePtpDeviceStatus) DeepCopyInto(out *NodePtpDeviceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpClockThreshold

type PtpClockThreshold struct {
	// +kubebuilder:default=5
	// clock state to stay in holdover state in secs
	HoldOverTimeout int64 `json:"holdOverTimeout,omitempty"`
	// +kubebuilder:default=100
	// max offset in nano secs
	MaxOffsetThreshold int64 `json:"maxOffsetThreshold,omitempty"`
	// +kubebuilder:default=-100
	// min offset in nano secs
	MinOffsetThreshold int64 `json:"minOffsetThreshold,omitempty"`
}

func (*PtpClockThreshold) DeepCopy

func (in *PtpClockThreshold) DeepCopy() *PtpClockThreshold

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpClockThreshold.

func (*PtpClockThreshold) DeepCopyInto

func (in *PtpClockThreshold) DeepCopyInto(out *PtpClockThreshold)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpConfig

type PtpConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PtpConfigSpec   `json:"spec,omitempty"`
	Status PtpConfigStatus `json:"status,omitempty"`
}

PtpConfig is the Schema for the ptpconfigs API

func (*PtpConfig) DeepCopy

func (in *PtpConfig) DeepCopy() *PtpConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpConfig.

func (*PtpConfig) DeepCopyInto

func (in *PtpConfig) DeepCopyInto(out *PtpConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PtpConfig) DeepCopyObject

func (in *PtpConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PtpConfig) SetupWebhookWithManager

func (r *PtpConfig) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*PtpConfig) ValidateCreate

func (r *PtpConfig) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PtpConfig) ValidateDelete

func (r *PtpConfig) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PtpConfig) ValidateUpdate

func (r *PtpConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PtpConfigList

type PtpConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PtpConfig `json:"items"`
}

PtpConfigList contains a list of PtpConfig

func (*PtpConfigList) DeepCopy

func (in *PtpConfigList) DeepCopy() *PtpConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpConfigList.

func (*PtpConfigList) DeepCopyInto

func (in *PtpConfigList) DeepCopyInto(out *PtpConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PtpConfigList) DeepCopyObject

func (in *PtpConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PtpConfigSpec

type PtpConfigSpec struct {
	Profile   []PtpProfile   `json:"profile"`
	Recommend []PtpRecommend `json:"recommend"`
}

PtpConfigSpec defines the desired state of PtpConfig

func (*PtpConfigSpec) DeepCopy

func (in *PtpConfigSpec) DeepCopy() *PtpConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpConfigSpec.

func (*PtpConfigSpec) DeepCopyInto

func (in *PtpConfigSpec) DeepCopyInto(out *PtpConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpConfigStatus

type PtpConfigStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	MatchList []NodeMatchList `json:"matchList,omitempty"`
}

PtpConfigStatus defines the observed state of PtpConfig

func (*PtpConfigStatus) DeepCopy

func (in *PtpConfigStatus) DeepCopy() *PtpConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpConfigStatus.

func (*PtpConfigStatus) DeepCopyInto

func (in *PtpConfigStatus) DeepCopyInto(out *PtpConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpDevice

type PtpDevice struct {
	// Name is the name of the PTP device.
	// It is a unique identifier for the device.
	// +optional
	Name string `json:"name,omitempty"`

	// Profile is the PTP profile associated with the device.
	// This profile defines the PTP configuration settings for the device.
	// +optional
	Profile string `json:"profile,omitempty"`
}

func (*PtpDevice) DeepCopy

func (in *PtpDevice) DeepCopy() *PtpDevice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpDevice.

func (*PtpDevice) DeepCopyInto

func (in *PtpDevice) DeepCopyInto(out *PtpDevice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpEventConfig

type PtpEventConfig struct {
	// +kubebuilder:default=false
	// EnableEventPublisher will deploy event proxy as a sidecar
	// +optional
	EnableEventPublisher bool `json:"enableEventPublisher,omitempty"`

	// TransportHost format is <protocol>://<transport-service>.<namespace>.svc.cluster.local:<transport-port>
	// Example HTTP transport: "http://ptp-event-publisher-service-NODE_NAME.openshift-ptp.svc.cluster.local:9043"
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Transport Host",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	// +optional
	TransportHost string `json:"transportHost,omitempty"`

	// StorageType is the type of storage to store subscription data
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Storage Type",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	// +optional
	StorageType string `json:"storageType,omitempty"`

	// ApiVersion is used to determine which API is used for the event service
	// 1.0: default version. event service is mapped to internal REST-API.
	// 2.x: event service is mapped to O-RAN v3.0 Compliant O-Cloud Notification REST-API.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="ApiVersion",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	// +optional
	ApiVersion string `json:"apiVersion,omitempty"`
}

PtpEventConfig defines the desired state of event framework

func (*PtpEventConfig) DeepCopy

func (in *PtpEventConfig) DeepCopy() *PtpEventConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpEventConfig.

func (*PtpEventConfig) DeepCopyInto

func (in *PtpEventConfig) DeepCopyInto(out *PtpEventConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpOperatorConfig

type PtpOperatorConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PtpOperatorConfigSpec   `json:"spec,omitempty"`
	Status PtpOperatorConfigStatus `json:"status,omitempty"`
}

PtpOperatorConfig is the Schema for the ptpoperatorconfigs API

func (*PtpOperatorConfig) DeepCopy

func (in *PtpOperatorConfig) DeepCopy() *PtpOperatorConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpOperatorConfig.

func (*PtpOperatorConfig) DeepCopyInto

func (in *PtpOperatorConfig) DeepCopyInto(out *PtpOperatorConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PtpOperatorConfig) DeepCopyObject

func (in *PtpOperatorConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PtpOperatorConfig) SetupWebhookWithManager

func (r *PtpOperatorConfig) SetupWebhookWithManager(mgr ctrl.Manager, client client.Client) error

func (*PtpOperatorConfig) ValidateCreate

func (r *PtpOperatorConfig) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PtpOperatorConfig) ValidateDelete

func (r *PtpOperatorConfig) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PtpOperatorConfig) ValidateUpdate

func (r *PtpOperatorConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PtpOperatorConfigList

type PtpOperatorConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PtpOperatorConfig `json:"items"`
}

PtpOperatorConfigList contains a list of PtpOperatorConfig

func (*PtpOperatorConfigList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpOperatorConfigList.

func (*PtpOperatorConfigList) DeepCopyInto

func (in *PtpOperatorConfigList) DeepCopyInto(out *PtpOperatorConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PtpOperatorConfigList) DeepCopyObject

func (in *PtpOperatorConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PtpOperatorConfigSpec

type PtpOperatorConfigSpec struct {
	// DaemonNodeSelector specifies the node selector for the linuxptp daemon.
	// This is a map of key-value pairs used to select the nodes where the
	// linuxptp daemon will run.
	// If empty {}, the linuxptp daemon will be deployed on each node of the cluster.
	// +required
	DaemonNodeSelector map[string]string `json:"daemonNodeSelector"`

	// EventConfig contains the configuration settings for the PTP event sidecar.
	// This field is optional and can be omitted if event sidecar configuration is not required.
	// +optional
	EventConfig *PtpEventConfig `json:"ptpEventConfig,omitempty"`

	// EnabledPlugins is a map of plugin names to their configuration settings.
	// Each entry in the map specifies the configuration for a specific plugin.
	// This field is optional and can be omitted if no plugins are enabled.
	// +optional
	EnabledPlugins *map[string]*apiextensions.JSON `json:"plugins,omitempty"`
}

PtpOperatorConfigSpec defines the desired state of PtpOperatorConfig.

func (*PtpOperatorConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpOperatorConfigSpec.

func (*PtpOperatorConfigSpec) DeepCopyInto

func (in *PtpOperatorConfigSpec) DeepCopyInto(out *PtpOperatorConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpOperatorConfigStatus

type PtpOperatorConfigStatus struct {
}

PtpOperatorConfigStatus defines the observed state of PtpOperatorConfig

func (*PtpOperatorConfigStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpOperatorConfigStatus.

func (*PtpOperatorConfigStatus) DeepCopyInto

func (in *PtpOperatorConfigStatus) DeepCopyInto(out *PtpOperatorConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpProfile

type PtpProfile struct {
	Name        *string `json:"name"`
	Interface   *string `json:"interface,omitempty"`
	Ptp4lOpts   *string `json:"ptp4lOpts,omitempty"`
	Phc2sysOpts *string `json:"phc2sysOpts,omitempty"`
	Ts2PhcOpts  *string `json:"ts2phcOpts,omitempty"`
	Synce4lOpts *string `json:"synce4lOpts,omitempty"`
	Ptp4lConf   *string `json:"ptp4lConf,omitempty"`
	Phc2sysConf *string `json:"phc2sysConf,omitempty"`
	Ts2PhcConf  *string `json:"ts2phcConf,omitempty"`
	Synce4lConf *string `json:"synce4lConf,omitempty"`
	// +kubebuilder:validation:Enum=SCHED_OTHER;SCHED_FIFO;
	PtpSchedulingPolicy *string `json:"ptpSchedulingPolicy,omitempty"`
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65
	PtpSchedulingPriority *int64                         `json:"ptpSchedulingPriority,omitempty"`
	PtpClockThreshold     *PtpClockThreshold             `json:"ptpClockThreshold,omitempty"`
	PtpSettings           map[string]string              `json:"ptpSettings,omitempty"`
	Plugins               map[string]*apiextensions.JSON `json:"plugins,omitempty"`
}

func (*PtpProfile) DeepCopy

func (in *PtpProfile) DeepCopy() *PtpProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpProfile.

func (*PtpProfile) DeepCopyInto

func (in *PtpProfile) DeepCopyInto(out *PtpProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpRecommend

type PtpRecommend struct {
	Profile  *string     `json:"profile"`
	Priority *int64      `json:"priority"`
	Match    []MatchRule `json:"match,omitempty"`
}

func (*PtpRecommend) DeepCopy

func (in *PtpRecommend) DeepCopy() *PtpRecommend

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PtpRecommend.

func (*PtpRecommend) DeepCopyInto

func (in *PtpRecommend) DeepCopyInto(out *PtpRecommend)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PtpRole

type PtpRole int
const (
	Master PtpRole = 1
	Slave  PtpRole = 0
)

Jump to

Keyboard shortcuts

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