Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 20 additions & 14 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/druid-operator"

[workspace.dependencies]
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.1", features = ["crds", "webhook"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.111.0", features = ["crds", "webhook"] }

anyhow = "1.0"
built = { version = "0.8", features = ["chrono", "git2"] }
Expand Down
18 changes: 9 additions & 9 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions extra/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3575,8 +3575,9 @@ spec:
properties:
custom:
description: |-
Overwrite the docker image.
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
Provide a custom container image.

Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
type: string
productVersion:
description: Version of the product, e.g. `1.4.1`.
Expand All @@ -3603,14 +3604,20 @@ spec:
nullable: true
type: array
repo:
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
description: |-
The repository on the container image registry where the container image is located, e.g.
`oci.example.com/namespace`.

If not specified, the operator will use the image registry provided via the operator
environment options.
nullable: true
type: string
stackableVersion:
description: |-
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
If not specified, the operator will use its own version, e.g. `23.4.1`.
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.

If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
operator or a PR version, it will use the nightly `0.0.0-dev` image.
nullable: true
type: string
type: object
Expand Down
89 changes: 80 additions & 9 deletions rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1729,14 +1729,85 @@ where

#[cfg(test)]
mod tests {
pub fn deserialize_yaml_str<'a, T: serde::de::Deserialize<'a>>(value: &'a str) -> T {
let deserializer = serde_yaml::Deserializer::from_str(value);
serde_yaml::with::singleton_map_recursive::deserialize(deserializer).unwrap()
}

pub fn deserialize_yaml_file<'a, T: serde::de::Deserialize<'a>>(path: &'a str) -> T {
let file = std::fs::File::open(path).unwrap();
let deserializer = serde_yaml::Deserializer::from_reader(file);
serde_yaml::with::singleton_map_recursive::deserialize(deserializer).unwrap()
use stackable_operator::versioned::test_utils::RoundtripTestData;

use crate::crd::v1alpha1;

impl RoundtripTestData for v1alpha1::DruidClusterSpec {
fn roundtrip_test_data() -> Vec<Self> {
stackable_operator::utils::yaml_from_str_singleton_map(indoc::indoc! {"
- image:
productVersion: 30.0.0
pullPolicy: IfNotPresent
clusterOperation:
stopped: false
reconciliationPaused: false
clusterConfig:
metadataStorageDatabase:
dbType: postgresql
connString: jdbc:postgresql://druid-postgresql/druid
host: druid-postgresql
port: 5432
credentialsSecret: druid-credentials
# metadataDatabase:
# postgresql:
# host: druid-postgresql
# database: druid
# credentialsSecretName: mySecret
deepStorage:
hdfs:
configMapName: simple-hdfs
directory: /druid
ingestion:
s3connection:
inline:
host: s3-de-central.profitbricks.com
credentials:
secretClass: s3-credentials-class
zookeeperConfigMapName: simple-druid-znode
authorization:
opa:
configMapName: test-opa
package: druid
vectorAggregatorConfigMapName: vector-aggregator-discovery
brokers:
config:
gracefulShutdownTimeout: 1s
logging:
enableVectorAgent: true
containers:
druid:
console:
level: INFO
file:
level: INFO
loggers:
ROOT:
level: INFO
configOverrides:
runtime.properties: &runtime-properties
druid.foo: bar
roleGroups:
default:
replicas: 1
coordinators:
roleGroups:
default:
replicas: 1
historicals:
roleGroups:
default:
replicas: 1
middleManagers:
roleGroups:
default:
replicas: 1
routers:
roleGroups:
default:
replicas: 1
"})
.expect("Failed to parse DruidClusterSpec YAML")
}
}
}
Loading
Loading