From 781fe3abb218e423085caeaf1512d19eb88775a1 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 2 Jul 2024 16:27:11 +0200 Subject: [PATCH 1/8] feat!: Reduce CRD size by omitting podOverride and affinities schemas --- crates/stackable-operator/CHANGELOG.md | 4 ++ .../src/commons/affinity.rs | 12 ++++ crates/stackable-operator/src/commons/mod.rs | 1 - crates/stackable-operator/src/role_utils.rs | 5 +- .../pod_overrides.rs => utils/crds.rs} | 55 ++++--------------- crates/stackable-operator/src/utils/mod.rs | 1 + 6 files changed, 32 insertions(+), 46 deletions(-) rename crates/stackable-operator/src/{commons/pod_overrides.rs => utils/crds.rs} (57%) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index b17072ed3..0c6b8593d 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -17,6 +17,10 @@ All notable changes to this project will be documented in this file. - [kube#1494](https://github.com/kube-rs/kube/pull/1494) - [kube#1504](https://github.com/kube-rs/kube/pull/1504) - Upgrade opentelemetry crates ([#811]). +- BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary YAML input, rather than using the + underlying schema. This reduces e.g. the Druid CRD size from `2.4MB` to `288K` (which is a 88% reduction). It has the + downside that the users input is not validated to be a valid `PodTemplateSpec`/affinity any more. However, this can + later be re-added by using validation webhooks if needed. This change is a preparation for CRD versioning ([#XXX]). ### Fixed diff --git a/crates/stackable-operator/src/commons/affinity.rs b/crates/stackable-operator/src/commons/affinity.rs index 451173123..1ecfcc059 100644 --- a/crates/stackable-operator/src/commons/affinity.rs +++ b/crates/stackable-operator/src/commons/affinity.rs @@ -13,6 +13,7 @@ use stackable_operator_derive::Fragment; use crate::{ config::merge::{Atomic, Merge}, kvp::consts::{K8S_APP_COMPONENT_KEY, K8S_APP_INSTANCE_KEY, K8S_APP_NAME_KEY}, + utils::crds::raw_object_schema, }; pub const TOPOLOGY_KEY_HOSTNAME: &str = "kubernetes.io/hostname"; @@ -36,9 +37,19 @@ pub const TOPOLOGY_KEY_HOSTNAME: &str = "kubernetes.io/hostname"; serde(rename_all = "camelCase") )] pub struct StackableAffinity { + /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) + #[fragment_attrs(schemars(schema_with = "raw_object_schema"))] pub pod_affinity: Option, + + /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) + #[fragment_attrs(schemars(schema_with = "raw_object_schema"))] pub pod_anti_affinity: Option, + + /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) + #[fragment_attrs(schemars(schema_with = "raw_object_schema"))] pub node_affinity: Option, + + // This schema isn't big, so it can stay pub node_selector: Option, } @@ -51,6 +62,7 @@ pub struct StackableAffinity { // FIXME: The generated JsonSchema will be wrong, so until https://github.com/GREsau/schemars/issues/259 is fixed, we // need to use `#[schemars(deny_unknown_fields)]`. // See https://github.com/stackabletech/operator-rs/pull/752#issuecomment-2017630433 for details. +/// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) #[derive(Clone, Debug, Eq, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] #[schemars(deny_unknown_fields)] diff --git a/crates/stackable-operator/src/commons/mod.rs b/crates/stackable-operator/src/commons/mod.rs index 05b10b207..d85054f4c 100644 --- a/crates/stackable-operator/src/commons/mod.rs +++ b/crates/stackable-operator/src/commons/mod.rs @@ -6,7 +6,6 @@ pub mod cluster_operation; pub mod listener; pub mod opa; pub mod pdb; -pub mod pod_overrides; pub mod product_image_selection; pub mod rbac; pub mod resources; diff --git a/crates/stackable-operator/src/role_utils.rs b/crates/stackable-operator/src/role_utils.rs index 85733ef35..754f9a15e 100644 --- a/crates/stackable-operator/src/role_utils.rs +++ b/crates/stackable-operator/src/role_utils.rs @@ -86,12 +86,13 @@ use std::{ }; use crate::{ - commons::{pdb::PdbConfig, pod_overrides::pod_overrides_schema}, + commons::pdb::PdbConfig, config::{ fragment::{self, FromFragment}, merge::Merge, }, product_config_utils::Configuration, + utils::crds::raw_object_schema, }; use derivative::Derivative; use k8s_openapi::api::core::v1::PodTemplateSpec; @@ -137,7 +138,7 @@ pub struct CommonConfiguration { /// [Pod overrides documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/overrides#pod-overrides) /// for more information. #[serde(default)] - #[schemars(schema_with = "pod_overrides_schema")] + #[schemars(schema_with = "raw_object_schema")] pub pod_overrides: PodTemplateSpec, } diff --git a/crates/stackable-operator/src/commons/pod_overrides.rs b/crates/stackable-operator/src/utils/crds.rs similarity index 57% rename from crates/stackable-operator/src/commons/pod_overrides.rs rename to crates/stackable-operator/src/utils/crds.rs index dc830e6ff..848aa4a2a 100644 --- a/crates/stackable-operator/src/commons/pod_overrides.rs +++ b/crates/stackable-operator/src/utils/crds.rs @@ -1,48 +1,17 @@ -use k8s_openapi::api::core::v1::PodTemplateSpec; -use schemars::{schema::Schema, visit::Visitor, JsonSchema}; - -/// Simplified schema for PodTemplateSpec without mandatory fields (e.g. `containers`) or documentation. -/// -/// The normal PodTemplateSpec requires you to specify `containers` as an `Vec`. -/// Often times the user want's to overwrite/add stuff not related to a container -/// (e.g. tolerations or a ServiceAccount), so it's annoying that he always needs to -/// specify an empty array for `containers`. -/// -/// Additionally all docs are removed, as the resulting Stackable CRD objects where to big for Kubernetes. -/// E.g. the HdfsCluster CRD increased to ~3.2 MB (which is over the limit of 3MB), after stripping -/// the docs it went down to ~1.3 MiB. -pub fn pod_overrides_schema(gen: &mut schemars::gen::SchemaGenerator) -> Schema { - let mut schema = PodTemplateSpec::json_schema(gen); - SimplifyOverrideSchema.visit_schema(&mut schema); - - if let Schema::Object(schema) = &mut schema { - let meta = schema.metadata.get_or_insert_with(Default::default); - meta.description = Some("See PodTemplateSpec (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) for more details".to_string()); - } - - schema -} - -struct SimplifyOverrideSchema; -impl schemars::visit::Visitor for SimplifyOverrideSchema { - fn visit_schema_object(&mut self, schema: &mut schemars::schema::SchemaObject) { - // Strip docs to make the schema more compact - if let Some(meta) = &mut schema.metadata { - meta.description = None; - meta.examples.clear(); - } - - // Make all options optional - if let Some(object) = &mut schema.object { - object.required.clear(); - } - - schemars::visit::visit_schema_object(self, schema); - } +use schemars::schema::Schema; + +pub fn raw_object_schema(_: &mut schemars::gen::SchemaGenerator) -> Schema { + serde_json::from_value(serde_json::json!({ + "type": "object", + "x-kubernetes-preserve-unknown-fields": true, + })) + .expect("Failed to parse JSON of custom raw object schema") } #[cfg(test)] mod tests { + use k8s_openapi::api::core::v1::PodTemplateSpec; + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use super::*; @@ -50,7 +19,7 @@ mod tests { #[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] struct Test { - #[schemars(schema_with = "pod_overrides_schema")] + #[schemars(schema_with = "raw_object_schema")] pub pod_overrides: PodTemplateSpec, } @@ -130,7 +99,7 @@ mod tests { - image: docker.stackable.tech/stackable/nifi:1.23.2-stackable23.11.0 "#; - // FIXME: Ideally we would require the names of the containers to be set. We had users using podOverrides + // FIXME: Ideally we would require the names of the containers to be set. We had users using podOverrides // without setting the name of the container and wondering why it didn't work. serde_yaml::from_str::(input).expect("Failed to parse valid podOverride"); } diff --git a/crates/stackable-operator/src/utils/mod.rs b/crates/stackable-operator/src/utils/mod.rs index 33ced78bb..b9b1e1632 100644 --- a/crates/stackable-operator/src/utils/mod.rs +++ b/crates/stackable-operator/src/utils/mod.rs @@ -1,4 +1,5 @@ pub mod bash; +pub mod crds; pub mod logging; mod option; mod url; From 95b27e0bf1907f77f5d05b84dde09a47f2932468 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 2 Jul 2024 16:28:20 +0200 Subject: [PATCH 2/8] changelog --- crates/stackable-operator/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 0c6b8593d..f5909f646 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -20,7 +20,8 @@ All notable changes to this project will be documented in this file. - BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary YAML input, rather than using the underlying schema. This reduces e.g. the Druid CRD size from `2.4MB` to `288K` (which is a 88% reduction). It has the downside that the users input is not validated to be a valid `PodTemplateSpec`/affinity any more. However, this can - later be re-added by using validation webhooks if needed. This change is a preparation for CRD versioning ([#XXX]). + later be re-added by using validation webhooks if needed. This change should not be breaking for the user and is a + preparation for CRD versioning. ([#XXX]). ### Fixed From 90dc2607f9ddf16d3ed4d9b3a1aace40d76e2df5 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 2 Jul 2024 16:29:19 +0200 Subject: [PATCH 3/8] changelog --- crates/stackable-operator/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index f5909f646..d1c653506 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -21,7 +21,7 @@ All notable changes to this project will be documented in this file. underlying schema. This reduces e.g. the Druid CRD size from `2.4MB` to `288K` (which is a 88% reduction). It has the downside that the users input is not validated to be a valid `PodTemplateSpec`/affinity any more. However, this can later be re-added by using validation webhooks if needed. This change should not be breaking for the user and is a - preparation for CRD versioning. ([#XXX]). + preparation for CRD versioning. ([#821]). ### Fixed @@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file. [#817]: https://github.com/stackabletech/operator-rs/pull/817 [#818]: https://github.com/stackabletech/operator-rs/pull/818 [#819]: https://github.com/stackabletech/operator-rs/pull/819 +[#821]: https://github.com/stackabletech/operator-rs/pull/821 ## [0.69.3] - 2024-06-12 From 864c18065df9316735b1ccce825b7e9eacc564e9 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 2 Jul 2024 16:49:23 +0200 Subject: [PATCH 4/8] Add raw_object_list_schema --- crates/stackable-operator/src/utils/crds.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/stackable-operator/src/utils/crds.rs b/crates/stackable-operator/src/utils/crds.rs index 848aa4a2a..8d74e2786 100644 --- a/crates/stackable-operator/src/utils/crds.rs +++ b/crates/stackable-operator/src/utils/crds.rs @@ -8,6 +8,17 @@ pub fn raw_object_schema(_: &mut schemars::gen::SchemaGenerator) -> Schema { .expect("Failed to parse JSON of custom raw object schema") } +pub fn raw_object_list_schema(_: &mut schemars::gen::SchemaGenerator) -> Schema { + serde_json::from_value(serde_json::json!({ + "type": "array", + "items": { + "type": "object", + "x-kubernetes-preserve-unknown-fields": true, + } + })) + .expect("Failed to parse JSON of custom raw object list schema") +} + #[cfg(test)] mod tests { use k8s_openapi::api::core::v1::PodTemplateSpec; From b44e38c05ce8ad7fe6b11d49918db059bb164979 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 5 Jul 2024 12:17:29 +0200 Subject: [PATCH 5/8] Update crates/stackable-operator/CHANGELOG.md Co-authored-by: Techassi --- crates/stackable-operator/CHANGELOG.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index d1c653506..cb0aa8277 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -17,11 +17,14 @@ All notable changes to this project will be documented in this file. - [kube#1494](https://github.com/kube-rs/kube/pull/1494) - [kube#1504](https://github.com/kube-rs/kube/pull/1504) - Upgrade opentelemetry crates ([#811]). -- BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary YAML input, rather than using the - underlying schema. This reduces e.g. the Druid CRD size from `2.4MB` to `288K` (which is a 88% reduction). It has the - downside that the users input is not validated to be a valid `PodTemplateSpec`/affinity any more. However, this can - later be re-added by using validation webhooks if needed. This change should not be breaking for the user and is a - preparation for CRD versioning. ([#821]). +- BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary + YAML input, rather than using the underlying schema. With this change, one of + the larger CRDs, like the Druid CRD went down in size from `2.4MB` to `288K` + (a 88% reduction). One downside is that user input is not checked to be a + valid `PodTemplateSpec`, `PodAffinity`, `PodAntiAffinity` and `NodeAffinity` + any more. However, checks can be re-added by using validation webhooks if + needed. This change should not be breaking for the user and is a preparation + for CRD versioning. ([#821]). ### Fixed From 7e327c67360e6a9b81c09120afd3b0443e9dea81 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 15 Jul 2024 09:57:28 +0200 Subject: [PATCH 6/8] fix: Add missing full stops in changelogs --- crates/k8s-version/CHANGELOG.md | 2 +- crates/stackable-certs/CHANGELOG.md | 4 ++-- crates/stackable-operator-derive/CHANGELOG.md | 4 ++-- crates/stackable-operator/CHANGELOG.md | 2 +- crates/stackable-telemetry/CHANGELOG.md | 2 +- crates/stackable-versioned/CHANGELOG.md | 2 +- crates/stackable-webhook/CHANGELOG.md | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/k8s-version/CHANGELOG.md b/crates/k8s-version/CHANGELOG.md index 66f1f0d27..339aef913 100644 --- a/crates/k8s-version/CHANGELOG.md +++ b/crates/k8s-version/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). [#822]: https://github.com/stackabletech/operator-rs/pull/822 diff --git a/crates/stackable-certs/CHANGELOG.md b/crates/stackable-certs/CHANGELOG.md index 86d49ff78..0f69fa198 100644 --- a/crates/stackable-certs/CHANGELOG.md +++ b/crates/stackable-certs/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). [#822]: https://github.com/stackabletech/operator-rs/pull/822 @@ -34,7 +34,7 @@ All notable changes to this project will be documented in this file. ### Changed - Implement `PartialEq` for most _Snafu_ Error enums ([#757]). -- Update Rust to 1.77 ([#759]) +- Update Rust to 1.77 ([#759]). [#757]: https://github.com/stackabletech/operator-rs/pull/757 [#759]: https://github.com/stackabletech/operator-rs/pull/759 diff --git a/crates/stackable-operator-derive/CHANGELOG.md b/crates/stackable-operator-derive/CHANGELOG.md index f099a31e5..3b4407967 100644 --- a/crates/stackable-operator-derive/CHANGELOG.md +++ b/crates/stackable-operator-derive/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). [#822]: https://github.com/stackabletech/operator-rs/pull/822 @@ -24,7 +24,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Update Rust to 1.77 ([#759]) +- Update Rust to 1.77 ([#759]). - Bump GitHub workflow actions ([#772]). - Revert `zeroize` version bump ([#772]). diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 1dfb366c9..2958c4c56 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -19,7 +19,7 @@ All notable changes to this project will be documented in this file. - [kube#1494](https://github.com/kube-rs/kube/pull/1494) - [kube#1504](https://github.com/kube-rs/kube/pull/1504) - Upgrade opentelemetry crates ([#811]). -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). - BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary YAML input, rather than using the underlying schema. With this change, one of the larger CRDs, like the Druid CRD went down in size from `2.4MB` to `288K` diff --git a/crates/stackable-telemetry/CHANGELOG.md b/crates/stackable-telemetry/CHANGELOG.md index 132096688..8ba94c69b 100644 --- a/crates/stackable-telemetry/CHANGELOG.md +++ b/crates/stackable-telemetry/CHANGELOG.md @@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file. - Use OpenTelemetry Context in Axum instrumentation layer, adjust log and span level, simplify trace config ([#811]). - tracing: Upgrade opentelemetry crates, simplify trace config, fix shutdown conditions, use new way to shutdown LoggerProvider. - instrumentation/axum: demote event severity for errors easily caused by clients, replace parent span context if given in http header and link to previous trace contexts. -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). [#801]: https://github.com/stackabletech/operator-rs/pull/801 [#811]: https://github.com/stackabletech/operator-rs/pull/811 diff --git a/crates/stackable-versioned/CHANGELOG.md b/crates/stackable-versioned/CHANGELOG.md index fb2ad69e8..08a1bda5b 100644 --- a/crates/stackable-versioned/CHANGELOG.md +++ b/crates/stackable-versioned/CHANGELOG.md @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file. - Change from derive macro to attribute macro to be able to generate code _in place_ instead of _appending_ new code ([#793]). - Improve action chain generation ([#784]). -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). [#784]: https://github.com/stackabletech/operator-rs/pull/784 [#790]: https://github.com/stackabletech/operator-rs/pull/790 diff --git a/crates/stackable-webhook/CHANGELOG.md b/crates/stackable-webhook/CHANGELOG.md index 173150875..d3b39dca0 100644 --- a/crates/stackable-webhook/CHANGELOG.md +++ b/crates/stackable-webhook/CHANGELOG.md @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file. ## Changed - Remove instrumentation of long running functions, add more granular instrumentation of futures. Adjust span and event levels ([#811]). -- Bump rust-toolchain to 1.79.0 ([#822]) +- Bump rust-toolchain to 1.79.0 ([#822]). ### Fixed @@ -58,7 +58,7 @@ All notable changes to this project will be documented in this file. ### Changed - Implement `PartialEq` for most _Snafu_ Error enums ([#757]). -- Update Rust to 1.77 ([#759]) +- Update Rust to 1.77 ([#759]). [#757]: https://github.com/stackabletech/operator-rs/pull/757 [#759]: https://github.com/stackabletech/operator-rs/pull/759 From 581653aab7dcdfd6ad2a7d45b0500dcaf486fdab Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 31 Jul 2024 11:04:03 +0200 Subject: [PATCH 7/8] changelog --- crates/stackable-operator/CHANGELOG.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 9a56d477b..c54858f25 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -7,7 +7,16 @@ All notable changes to this project will be documented in this file. ### Changed - BREAKING: Replace `lazy_static` with `std::cell::LazyCell` ([#827]). +- BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary + YAML input, rather than using the underlying schema. With this change, one of + the larger CRDs, like the Druid CRD went down in size from `2.4MB` to `288K` + (a 88% reduction). One downside is that user input is not checked to be a + valid `PodTemplateSpec`, `PodAffinity`, `PodAntiAffinity` and `NodeAffinity` + any more. However, checks can be re-added by using validation webhooks if + needed. This change should not be breaking for the user and is a preparation + for CRD versioning. ([#821]). +[#821]: https://github.com/stackabletech/operator-rs/pull/821 [#827]: https://github.com/stackabletech/operator-rs/pull/827 ## [0.71.0] - 2024-07-29 @@ -38,14 +47,6 @@ All notable changes to this project will be documented in this file. - [kube#1504](https://github.com/kube-rs/kube/pull/1504) - Upgrade opentelemetry crates ([#811]). - Bump rust-toolchain to 1.79.0 ([#822]). -- BREAKING: Convert `podOverrides` and `affinity` fields to take any arbitrary - YAML input, rather than using the underlying schema. With this change, one of - the larger CRDs, like the Druid CRD went down in size from `2.4MB` to `288K` - (a 88% reduction). One downside is that user input is not checked to be a - valid `PodTemplateSpec`, `PodAffinity`, `PodAntiAffinity` and `NodeAffinity` - any more. However, checks can be re-added by using validation webhooks if - needed. This change should not be breaking for the user and is a preparation - for CRD versioning. ([#821]). ### Fixed @@ -59,7 +60,6 @@ All notable changes to this project will be documented in this file. [#817]: https://github.com/stackabletech/operator-rs/pull/817 [#818]: https://github.com/stackabletech/operator-rs/pull/818 [#819]: https://github.com/stackabletech/operator-rs/pull/819 -[#821]: https://github.com/stackabletech/operator-rs/pull/821 [#822]: https://github.com/stackabletech/operator-rs/pull/822 ## [0.69.3] - 2024-06-12 From 85d06620a0b46c2ea5f1928a6fe3488d7bc59219 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 31 Jul 2024 11:07:56 +0200 Subject: [PATCH 8/8] newlines --- crates/stackable-operator/src/role_utils.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/stackable-operator/src/role_utils.rs b/crates/stackable-operator/src/role_utils.rs index 754f9a15e..35941ea66 100644 --- a/crates/stackable-operator/src/role_utils.rs +++ b/crates/stackable-operator/src/role_utils.rs @@ -112,6 +112,7 @@ pub struct CommonConfiguration { // does not support specifying custom bounds. #[schemars(default = "config_schema_default")] pub config: T, + /// The `configOverrides` can be used to configure properties in product config files /// that are not exposed in the CRD. Read the /// [config overrides documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/overrides#config-overrides) @@ -119,6 +120,7 @@ pub struct CommonConfiguration { /// available config files and settings for the specific product. #[serde(default)] pub config_overrides: HashMap>, + /// `envOverrides` configure environment variables to be set in the Pods. /// It is a map from strings to strings - environment variables and the value to set. /// Read the @@ -127,10 +129,12 @@ pub struct CommonConfiguration { /// the product specific environment variables that are available. #[serde(default)] pub env_overrides: HashMap, + // BTreeMap to keep some order with the cli arguments. // TODO add documentation. #[serde(default)] pub cli_overrides: BTreeMap, + /// In the `podOverrides` property you can define a /// [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) /// to override any property that can be set on a Kubernetes Pod.