From 48b4df8e6f3a662cd5ea1e6c9db9a40c13dd7ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Fri, 10 Nov 2023 18:31:58 +0100 Subject: [PATCH] ignore redhatcop_redhat_io_v1alpha1 resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- .../v1alpha1/groupconfigs.ignore | 1 + .../v1alpha1/namespaceconfigs.ignore | 1 + .../v1alpha1/userconfigs.ignore | 1 + kube-custom-resources-rs/Cargo.toml | 1 - kube-custom-resources-rs/src/lib.rs | 11 - .../groupconfigs.rs | 160 --------------- .../src/redhatcop_redhat_io_v1alpha1/mod.rs | 3 - .../namespaceconfigs.rs | 160 --------------- .../userconfigs.rs | 189 ------------------ 9 files changed, 3 insertions(+), 524 deletions(-) create mode 100644 crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/groupconfigs.ignore create mode 100644 crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/namespaceconfigs.ignore create mode 100644 crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/userconfigs.ignore delete mode 100644 kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/groupconfigs.rs delete mode 100644 kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/mod.rs delete mode 100644 kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/namespaceconfigs.rs delete mode 100644 kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/userconfigs.rs diff --git a/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/groupconfigs.ignore b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/groupconfigs.ignore new file mode 100644 index 000000000..a7e3600b0 --- /dev/null +++ b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/groupconfigs.ignore @@ -0,0 +1 @@ +cannot find type `GroupConfigStatusLockedPatchStatuses` in this scope diff --git a/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/namespaceconfigs.ignore b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/namespaceconfigs.ignore new file mode 100644 index 000000000..c56b6f566 --- /dev/null +++ b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/namespaceconfigs.ignore @@ -0,0 +1 @@ +cannot find type `NamespaceConfigStatusLockedPatchStatuses` in this scope diff --git a/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/userconfigs.ignore b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/userconfigs.ignore new file mode 100644 index 000000000..956e9f17c --- /dev/null +++ b/crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/userconfigs.ignore @@ -0,0 +1 @@ +cannot find type `UserConfigStatusLockedPatchStatuses` in this scope diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index 8288dd72f..352c21c56 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -244,7 +244,6 @@ quay_redhat_com_v1 = [] ray_io_v1 = [] ray_io_v1alpha1 = [] rds_services_k8s_aws_v1alpha1 = [] -redhatcop_redhat_io_v1alpha1 = [] registry_apicur_io_v1 = [] registry_devfile_io_v1alpha1 = [] reliablesyncs_kubeedge_io_v1alpha1 = [] diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index 0df2bf04a..2538e4a69 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -2057,15 +2057,6 @@ kinds: - `DBSubnetGroup` - `GlobalCluster` -## redhatcop_redhat_io_v1alpha1 - -apiVersion: `redhatcop.redhat.io/v1alpha1` - -kinds: -- `GroupConfig` -- `NamespaceConfig` -- `UserConfig` - ## registry_apicur_io_v1 apiVersion: `registry.apicur.io/v1` @@ -2966,8 +2957,6 @@ pub mod ray_io_v1; pub mod ray_io_v1alpha1; #[cfg(feature = "rds_services_k8s_aws_v1alpha1")] pub mod rds_services_k8s_aws_v1alpha1; -#[cfg(feature = "redhatcop_redhat_io_v1alpha1")] -pub mod redhatcop_redhat_io_v1alpha1; #[cfg(feature = "registry_apicur_io_v1")] pub mod registry_apicur_io_v1; #[cfg(feature = "registry_devfile_io_v1alpha1")] diff --git a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/groupconfigs.rs b/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/groupconfigs.rs deleted file mode 100644 index f37fb3886..000000000 --- a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/groupconfigs.rs +++ /dev/null @@ -1,160 +0,0 @@ -// WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --docs --filename=./crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/groupconfigs.yaml --derive=PartialEq -// kopium version: 0.16.2 - -use kube::CustomResource; -use serde::{Serialize, Deserialize}; -use std::collections::BTreeMap; - -/// GroupConfigSpec defines the desired state of GroupConfig There are two selectors: "labelSelector", "annotationSelector". Selectors are considered in AND, so if multiple are defined they must all be true for a Group to be selected. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] -#[kube(group = "redhatcop.redhat.io", version = "v1alpha1", kind = "GroupConfig", plural = "groupconfigs")] -#[kube(status = "GroupConfigStatus")] -#[kube(schema = "disabled")] -pub struct GroupConfigSpec { - /// AnnotationSelector selects Groups by annotation. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "annotationSelector")] - pub annotation_selector: Option, - /// LabelSelector selects Groups by label. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")] - pub label_selector: Option, - /// Templates these are the templates of the resources to be created when a selected groups is created/updated - #[serde(default, skip_serializing_if = "Option::is_none")] - pub templates: Option>, -} - -/// AnnotationSelector selects Groups by annotation. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigAnnotationSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigAnnotationSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LabelSelector selects Groups by label. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigLabelSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigLabelSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LockedResourceTemplate represents a resource template in go language to be enforced in a LockedResourceController and can be used in a API specification -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigTemplates { - /// ExludedPaths are a set of json paths that need not be considered by the LockedResourceReconciler - #[serde(default, skip_serializing_if = "Option::is_none", rename = "excludedPaths")] - pub excluded_paths: Option>, - /// ObjectTemplate is a goland template. Whne processed, it must resolve to a yaml representation of an API resource - #[serde(rename = "objectTemplate")] - pub object_template: String, -} - -/// GroupConfigStatus defines the observed state of GroupConfig -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigStatus { - /// ReconcileStatus this is the general status of the main reconciler - #[serde(default, skip_serializing_if = "Option::is_none")] - pub conditions: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedPatchStatuses")] - pub locked_patch_statuses: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedResourceStatuses")] - pub locked_resource_statuses: Option>, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigStatusConditions { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: GroupConfigStatusConditionsStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum GroupConfigStatusConditionsStatus { - True, - False, - Unknown, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct GroupConfigStatusLockedResourceStatuses { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: GroupConfigStatusLockedResourceStatusesStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum GroupConfigStatusLockedResourceStatusesStatus { - True, - False, - Unknown, -} - diff --git a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/mod.rs b/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/mod.rs deleted file mode 100644 index bee6413f0..000000000 --- a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod groupconfigs; -pub mod namespaceconfigs; -pub mod userconfigs; diff --git a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/namespaceconfigs.rs b/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/namespaceconfigs.rs deleted file mode 100644 index 3f937c446..000000000 --- a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/namespaceconfigs.rs +++ /dev/null @@ -1,160 +0,0 @@ -// WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --docs --filename=./crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/namespaceconfigs.yaml --derive=PartialEq -// kopium version: 0.16.2 - -use kube::CustomResource; -use serde::{Serialize, Deserialize}; -use std::collections::BTreeMap; - -/// NamespaceConfigSpec defines the desired state of NamespaceConfig There are two selectors: "labelSelector", "annotationSelector". Selectors are considered in AND, so if multiple are defined they must all be true for a Namespace to be selected. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] -#[kube(group = "redhatcop.redhat.io", version = "v1alpha1", kind = "NamespaceConfig", plural = "namespaceconfigs")] -#[kube(status = "NamespaceConfigStatus")] -#[kube(schema = "disabled")] -pub struct NamespaceConfigSpec { - /// AnnotationSelector selects Namespaces by annotation. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "annotationSelector")] - pub annotation_selector: Option, - /// LabelSelector selects Namespaces by label. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")] - pub label_selector: Option, - /// Templates these are the templates of the resources to be created when a selected namespace is created/updated - #[serde(default, skip_serializing_if = "Option::is_none")] - pub templates: Option>, -} - -/// AnnotationSelector selects Namespaces by annotation. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigAnnotationSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigAnnotationSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LabelSelector selects Namespaces by label. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigLabelSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigLabelSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LockedResourceTemplate represents a resource template in go language to be enforced in a LockedResourceController and can be used in a API specification -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigTemplates { - /// ExludedPaths are a set of json paths that need not be considered by the LockedResourceReconciler - #[serde(default, skip_serializing_if = "Option::is_none", rename = "excludedPaths")] - pub excluded_paths: Option>, - /// ObjectTemplate is a goland template. Whne processed, it must resolve to a yaml representation of an API resource - #[serde(rename = "objectTemplate")] - pub object_template: String, -} - -/// NamespaceConfigStatus defines the observed state of NamespaceSConfig -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigStatus { - /// ReconcileStatus this is the general status of the main reconciler - #[serde(default, skip_serializing_if = "Option::is_none")] - pub conditions: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedPatchStatuses")] - pub locked_patch_statuses: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedResourceStatuses")] - pub locked_resource_statuses: Option>, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigStatusConditions { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: NamespaceConfigStatusConditionsStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum NamespaceConfigStatusConditionsStatus { - True, - False, - Unknown, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct NamespaceConfigStatusLockedResourceStatuses { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: NamespaceConfigStatusLockedResourceStatusesStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum NamespaceConfigStatusLockedResourceStatusesStatus { - True, - False, - Unknown, -} - diff --git a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/userconfigs.rs b/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/userconfigs.rs deleted file mode 100644 index bc5418949..000000000 --- a/kube-custom-resources-rs/src/redhatcop_redhat_io_v1alpha1/userconfigs.rs +++ /dev/null @@ -1,189 +0,0 @@ -// WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --docs --filename=./crd-catalog/redhat-cop/namespace-configuration-operator/redhatcop.redhat.io/v1alpha1/userconfigs.yaml --derive=PartialEq -// kopium version: 0.16.2 - -use kube::CustomResource; -use serde::{Serialize, Deserialize}; -use std::collections::BTreeMap; - -/// UserConfigSpec defines the desired state of UserConfig There are four selectors: "labelSelector", "annotationSelector", "identityExtraFieldSelector" and "providerName". labelSelector and annoationSelector are matches against the User object identityExtraFieldSelector and providerName are matched against any of the Identities associated with User Selectors are considered in AND, so if multiple are defined tthey must all be true for a User to be selected. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] -#[kube(group = "redhatcop.redhat.io", version = "v1alpha1", kind = "UserConfig", plural = "userconfigs")] -#[kube(status = "UserConfigStatus")] -#[kube(schema = "disabled")] -pub struct UserConfigSpec { - /// AnnotationSelector selects Users by annotation. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "annotationSelector")] - pub annotation_selector: Option, - /// IdentityExtraSelector allows you to specify a selector for the extra fields of the User's identities. If one of the user identities matches the selector the User is selected This condition is in OR with ProviderName - #[serde(default, skip_serializing_if = "Option::is_none", rename = "identityExtraFieldSelector")] - pub identity_extra_field_selector: Option, - /// LabelSelector selects Users by label. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")] - pub label_selector: Option, - /// ProviderName allows you to specify an identity provider. If a user logged in with that provider it is selected. This condition is in OR with IdentityExtraSelector - #[serde(default, skip_serializing_if = "Option::is_none", rename = "providerName")] - pub provider_name: Option, - /// Templates these are the templates of the resources to be created when a selected user is created/updated - #[serde(default, skip_serializing_if = "Option::is_none")] - pub templates: Option>, -} - -/// AnnotationSelector selects Users by annotation. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigAnnotationSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigAnnotationSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// IdentityExtraSelector allows you to specify a selector for the extra fields of the User's identities. If one of the user identities matches the selector the User is selected This condition is in OR with ProviderName -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigIdentityExtraFieldSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigIdentityExtraFieldSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LabelSelector selects Users by label. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigLabelSelector { - /// matchExpressions is a list of label selector requirements. The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] - pub match_expressions: Option>, - /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] - pub match_labels: Option>, -} - -/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigLabelSelectorMatchExpressions { - /// key is the label key that the selector applies to. - pub key: String, - /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - pub operator: String, - /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub values: Option>, -} - -/// LockedResourceTemplate represents a resource template in go language to be enforced in a LockedResourceController and can be used in a API specification -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigTemplates { - /// ExludedPaths are a set of json paths that need not be considered by the LockedResourceReconciler - #[serde(default, skip_serializing_if = "Option::is_none", rename = "excludedPaths")] - pub excluded_paths: Option>, - /// ObjectTemplate is a goland template. Whne processed, it must resolve to a yaml representation of an API resource - #[serde(rename = "objectTemplate")] - pub object_template: String, -} - -/// UserConfigStatus defines the observed state of UserConfig -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigStatus { - /// ReconcileStatus this is the general status of the main reconciler - #[serde(default, skip_serializing_if = "Option::is_none")] - pub conditions: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedPatchStatuses")] - pub locked_patch_statuses: Option>, - /// LockedResourceStatuses contains the reconcile status for each of the managed resources - #[serde(default, skip_serializing_if = "Option::is_none", rename = "lockedResourceStatuses")] - pub locked_resource_statuses: Option>, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigStatusConditions { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: UserConfigStatusConditionsStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum UserConfigStatusConditionsStatus { - True, - False, - Unknown, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct UserConfigStatusLockedResourceStatuses { - /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - #[serde(rename = "lastTransitionTime")] - pub last_transition_time: String, - /// message is a human readable message indicating details about the transition. This may be an empty string. - pub message: String, - /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] - pub observed_generation: Option, - /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - pub reason: String, - /// status of the condition, one of True, False, Unknown. - pub status: UserConfigStatusLockedResourceStatusesStatus, - /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - #[serde(rename = "type")] - pub r#type: String, -} - -/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, -/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -/// // other fields } -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum UserConfigStatusLockedResourceStatusesStatus { - True, - False, - Unknown, -} -