-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sebastian Hoß <[email protected]>
- Loading branch information
Showing
12 changed files
with
346 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/nodeptpdevices.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.9.2" | ||
name: "nodeptpdevices.ptp.openshift.io" | ||
spec: | ||
group: "ptp.openshift.io" | ||
names: | ||
kind: "NodePtpDevice" | ||
listKind: "NodePtpDeviceList" | ||
plural: "nodeptpdevices" | ||
singular: "nodeptpdevice" | ||
scope: "Namespaced" | ||
versions: | ||
- name: "v1" | ||
schema: | ||
openAPIV3Schema: | ||
description: "NodePtpDevice is the Schema for the nodeptpdevices API" | ||
properties: | ||
apiVersion: | ||
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" | ||
type: "string" | ||
kind: | ||
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" | ||
type: "string" | ||
metadata: | ||
type: "object" | ||
spec: | ||
description: "NodePtpDeviceSpec defines the desired state of NodePtpDevice" | ||
type: "object" | ||
status: | ||
description: "NodePtpDeviceStatus defines the observed state of NodePtpDevice" | ||
properties: | ||
devices: | ||
description: "INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run \"make\" to regenerate code after modifying this file" | ||
items: | ||
properties: | ||
name: | ||
type: "string" | ||
profile: | ||
type: "string" | ||
type: "object" | ||
type: "array" | ||
hwconfig: | ||
items: | ||
properties: | ||
config: | ||
x-kubernetes-preserve-unknown-fields: true | ||
deviceID: | ||
type: "string" | ||
failed: | ||
type: "boolean" | ||
status: | ||
type: "string" | ||
vendorID: | ||
type: "string" | ||
type: "object" | ||
type: "array" | ||
type: "object" | ||
type: "object" | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
1 change: 1 addition & 0 deletions
1
crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: unknown empty dict type for plugins |
138 changes: 138 additions & 0 deletions
138
crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.9.2" | ||
name: "ptpconfigs.ptp.openshift.io" | ||
spec: | ||
group: "ptp.openshift.io" | ||
names: | ||
kind: "PtpConfig" | ||
listKind: "PtpConfigList" | ||
plural: "ptpconfigs" | ||
singular: "ptpconfig" | ||
scope: "Namespaced" | ||
versions: | ||
- name: "v1" | ||
schema: | ||
openAPIV3Schema: | ||
description: "PtpConfig is the Schema for the ptpconfigs API" | ||
properties: | ||
apiVersion: | ||
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" | ||
type: "string" | ||
kind: | ||
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" | ||
type: "string" | ||
metadata: | ||
type: "object" | ||
spec: | ||
description: "PtpConfigSpec defines the desired state of PtpConfig" | ||
properties: | ||
profile: | ||
items: | ||
properties: | ||
interface: | ||
type: "string" | ||
name: | ||
type: "string" | ||
phc2sysConf: | ||
type: "string" | ||
phc2sysOpts: | ||
type: "string" | ||
plugins: | ||
additionalProperties: | ||
x-kubernetes-preserve-unknown-fields: true | ||
type: "object" | ||
ptp4lConf: | ||
type: "string" | ||
ptp4lOpts: | ||
type: "string" | ||
ptpClockThreshold: | ||
properties: | ||
holdOverTimeout: | ||
default: 5 | ||
description: "clock state to stay in holdover state in secs" | ||
format: "int64" | ||
type: "integer" | ||
maxOffsetThreshold: | ||
default: 100 | ||
description: "max offset in nano secs" | ||
format: "int64" | ||
type: "integer" | ||
minOffsetThreshold: | ||
default: -100 | ||
description: "min offset in nano secs" | ||
format: "int64" | ||
type: "integer" | ||
type: "object" | ||
ptpSchedulingPolicy: | ||
enum: | ||
- "SCHED_OTHER" | ||
- "SCHED_FIFO" | ||
type: "string" | ||
ptpSchedulingPriority: | ||
format: "int64" | ||
maximum: 65.0 | ||
minimum: 1.0 | ||
type: "integer" | ||
ptpSettings: | ||
additionalProperties: | ||
type: "string" | ||
type: "object" | ||
ts2phcConf: | ||
type: "string" | ||
ts2phcOpts: | ||
type: "string" | ||
required: | ||
- "name" | ||
type: "object" | ||
type: "array" | ||
recommend: | ||
items: | ||
properties: | ||
match: | ||
items: | ||
properties: | ||
nodeLabel: | ||
type: "string" | ||
nodeName: | ||
type: "string" | ||
type: "object" | ||
type: "array" | ||
priority: | ||
format: "int64" | ||
type: "integer" | ||
profile: | ||
type: "string" | ||
required: | ||
- "priority" | ||
- "profile" | ||
type: "object" | ||
type: "array" | ||
required: | ||
- "profile" | ||
- "recommend" | ||
type: "object" | ||
status: | ||
description: "PtpConfigStatus defines the observed state of PtpConfig" | ||
properties: | ||
matchList: | ||
description: "INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run \"make\" to regenerate code after modifying this file" | ||
items: | ||
properties: | ||
nodeName: | ||
type: "string" | ||
profile: | ||
type: "string" | ||
required: | ||
- "nodeName" | ||
- "profile" | ||
type: "object" | ||
type: "array" | ||
type: "object" | ||
type: "object" | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
1 change: 1 addition & 0 deletions
1
crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: unknown empty dict type for plugins |
69 changes: 69 additions & 0 deletions
69
crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.9.2" | ||
name: "ptpoperatorconfigs.ptp.openshift.io" | ||
spec: | ||
group: "ptp.openshift.io" | ||
names: | ||
kind: "PtpOperatorConfig" | ||
listKind: "PtpOperatorConfigList" | ||
plural: "ptpoperatorconfigs" | ||
singular: "ptpoperatorconfig" | ||
scope: "Namespaced" | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: "Event Enabled" | ||
jsonPath: ".spec.ptpEventConfig.enableEventPublisher" | ||
name: "Event Enabled" | ||
type: "boolean" | ||
name: "v1" | ||
schema: | ||
openAPIV3Schema: | ||
description: "PtpOperatorConfig is the Schema for the ptpoperatorconfigs API" | ||
properties: | ||
apiVersion: | ||
description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" | ||
type: "string" | ||
kind: | ||
description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" | ||
type: "string" | ||
metadata: | ||
type: "object" | ||
spec: | ||
description: "PtpOperatorConfigSpec defines the desired state of PtpOperatorConfig" | ||
properties: | ||
daemonNodeSelector: | ||
additionalProperties: | ||
type: "string" | ||
type: "object" | ||
plugins: | ||
additionalProperties: | ||
x-kubernetes-preserve-unknown-fields: true | ||
type: "object" | ||
ptpEventConfig: | ||
description: "EventConfig to configure event sidecar" | ||
properties: | ||
enableEventPublisher: | ||
default: false | ||
description: "EnableEventPublisher will deploy event proxy as a sidecar" | ||
type: "boolean" | ||
storageType: | ||
description: "StorageType is the name of StorageClass providing persist storage used by HTTP transport to store subscription data" | ||
type: "string" | ||
transportHost: | ||
description: "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\" Example AMQP transport: \"amqp://amq-router-service-name.amq-namespace.svc.cluster.local\"" | ||
type: "string" | ||
type: "object" | ||
required: | ||
- "daemonNodeSelector" | ||
type: "object" | ||
status: | ||
description: "PtpOperatorConfigStatus defines the observed state of PtpOperatorConfig" | ||
type: "object" | ||
type: "object" | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod v1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod nodeptpdevices; |
49 changes: 49 additions & 0 deletions
49
kube-custom-resources-rs/src/ptp_openshift_io/v1/nodeptpdevices.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// WARNING: generated by kopium - manual changes will be overwritten | ||
// kopium command: kopium --docs --filename=./crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/nodeptpdevices.yaml --derive=Default --derive=PartialEq | ||
// kopium version: 0.17.2 | ||
|
||
use kube::CustomResource; | ||
use serde::{Serialize, Deserialize}; | ||
use std::collections::HashMap; | ||
|
||
/// NodePtpDeviceSpec defines the desired state of NodePtpDevice | ||
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
#[kube(group = "ptp.openshift.io", version = "v1", kind = "NodePtpDevice", plural = "nodeptpdevices")] | ||
#[kube(namespaced)] | ||
#[kube(status = "NodePtpDeviceStatus")] | ||
#[kube(schema = "disabled")] | ||
pub struct NodePtpDeviceSpec { | ||
} | ||
|
||
/// NodePtpDeviceStatus defines the observed state of NodePtpDevice | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct NodePtpDeviceStatus { | ||
/// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub devices: Option<Vec<NodePtpDeviceStatusDevices>>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub hwconfig: Option<Vec<NodePtpDeviceStatusHwconfig>>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct NodePtpDeviceStatusDevices { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub profile: Option<String>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct NodePtpDeviceStatusHwconfig { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub config: Option<HashMap<String, serde_json::Value>>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "deviceID")] | ||
pub device_id: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub failed: Option<bool>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "vendorID")] | ||
pub vendor_id: Option<String>, | ||
} | ||
|