diff --git a/.reuse/dep5 b/.reuse/dep5 index 1ee203c45..0f7dc50e9 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -963,6 +963,10 @@ Files: crd-catalog/openshift/managed-upgrade-operator/* Copyright: The openshift/managed-upgrade-operator Authors License: Apache-2.0 +Files: crd-catalog/openshift/ptp-operator/* +Copyright: The openshift/ptp-operator Authors +License: Apache-2.0 + Files: crd-catalog/otterize/helm-charts/* Copyright: The otterize/helm-charts Authors License: Apache-2.0 diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index 8f84a0a60..428e92b08 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -2447,6 +2447,15 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/openshift/managed-upgrade-operator/blob/master/deploy/crds/upgrade.managed.openshift.io_upgradeconfigs.yaml", ], }, + UpstreamSource { + project_name: "openshift/ptp-operator", + license: APACHE_V2, + urls: &[ + "https://github.com/openshift/ptp-operator/blob/master/config/crd/bases/ptp.openshift.io_nodeptpdevices.yaml", + "https://github.com/openshift/ptp-operator/blob/master/config/crd/bases/ptp.openshift.io_ptpconfigs.yaml", + "https://github.com/openshift/ptp-operator/blob/master/config/crd/bases/ptp.openshift.io_ptpoperatorconfigs.yaml", + ], + }, UpstreamSource { project_name: "otterize/helm-charts", license: APACHE_V2, diff --git a/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/nodeptpdevices.yaml b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/nodeptpdevices.yaml new file mode 100644 index 000000000..b55aacde9 --- /dev/null +++ b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/nodeptpdevices.yaml @@ -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: {} diff --git a/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.ignore b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.ignore new file mode 100644 index 000000000..1dd9080aa --- /dev/null +++ b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.ignore @@ -0,0 +1 @@ +Error: unknown empty dict type for plugins diff --git a/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.yaml b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.yaml new file mode 100644 index 000000000..99df2ee37 --- /dev/null +++ b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpconfigs.yaml @@ -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: {} diff --git a/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.ignore b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.ignore new file mode 100644 index 000000000..1dd9080aa --- /dev/null +++ b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.ignore @@ -0,0 +1 @@ +Error: unknown empty dict type for plugins diff --git a/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.yaml b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.yaml new file mode 100644 index 000000000..c61868271 --- /dev/null +++ b/crd-catalog/openshift/ptp-operator/ptp.openshift.io/v1/ptpoperatorconfigs.yaml @@ -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 ://..svc.cluster.local: 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: {} diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index d8aaf7f00..149ebd133 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -308,6 +308,7 @@ projectcontour_io = [] prometheusservice_services_k8s_aws = [] ps_percona_com = [] psmdb_percona_com = [] +ptp_openshift_io = [] pxc_percona_com = [] quay_redhat_com = [] quota_codeflare_dev = [] diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index 322b5946c..1bec5d7d7 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -2454,6 +2454,11 @@ apiVersion `psmdb.percona.com/v1`: - `PerconaServerMongoDBBackup` - `PerconaServerMongoDBRestore` +## ptp_openshift_io + +apiVersion `ptp.openshift.io/v1`: +- `NodePtpDevice` + ## pxc_percona_com apiVersion `pxc.percona.com/v1`: @@ -3681,6 +3686,8 @@ pub mod prometheusservice_services_k8s_aws; pub mod ps_percona_com; #[cfg(feature = "psmdb_percona_com")] pub mod psmdb_percona_com; +#[cfg(feature = "ptp_openshift_io")] +pub mod ptp_openshift_io; #[cfg(feature = "pxc_percona_com")] pub mod pxc_percona_com; #[cfg(feature = "quay_redhat_com")] diff --git a/kube-custom-resources-rs/src/ptp_openshift_io/mod.rs b/kube-custom-resources-rs/src/ptp_openshift_io/mod.rs new file mode 100644 index 000000000..a3a6d96c3 --- /dev/null +++ b/kube-custom-resources-rs/src/ptp_openshift_io/mod.rs @@ -0,0 +1 @@ +pub mod v1; diff --git a/kube-custom-resources-rs/src/ptp_openshift_io/v1/mod.rs b/kube-custom-resources-rs/src/ptp_openshift_io/v1/mod.rs new file mode 100644 index 000000000..8a1941943 --- /dev/null +++ b/kube-custom-resources-rs/src/ptp_openshift_io/v1/mod.rs @@ -0,0 +1 @@ +pub mod nodeptpdevices; diff --git a/kube-custom-resources-rs/src/ptp_openshift_io/v1/nodeptpdevices.rs b/kube-custom-resources-rs/src/ptp_openshift_io/v1/nodeptpdevices.rs new file mode 100644 index 000000000..5fa980473 --- /dev/null +++ b/kube-custom-resources-rs/src/ptp_openshift_io/v1/nodeptpdevices.rs @@ -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>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hwconfig: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct NodePtpDeviceStatusDevices { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub profile: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct NodePtpDeviceStatusHwconfig { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub config: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "deviceID")] + pub device_id: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub failed: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "vendorID")] + pub vendor_id: Option, +} +