Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

### Fixed

- BREAKING: Fixed various issues in the CRD structure. `clusterConfig.credentialsSecret` is now mandatory ([#429]).

[#429]: https://github.com/stackabletech/superset-operator/pull/429

## [23.11.0] - 2023-11-24

### Added
Expand Down
8 changes: 1 addition & 7 deletions deploy/helm/superset-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ spec:
spec:
properties:
clusterConfig:
default:
authentication: []
credentialsSecret: ''
clusterOperation:
stopped: false
reconciliationPaused: false
listenerClass: cluster-internal
description: Superset cluster configuration options.
properties:
authentication:
Expand Down Expand Up @@ -7072,6 +7065,7 @@ spec:
- roleGroups
type: object
required:
- clusterConfig
- image
type: object
status:
Expand Down
6 changes: 4 additions & 2 deletions rust/crd/src/affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ mod tests {
spec:
image:
productVersion: 3.0.1
credentialsSecret: simple-superset-credentials
clusterConfig:
credentialsSecret: superset-credentials
nodes:
roleGroups:
default:
Expand Down Expand Up @@ -108,7 +109,8 @@ mod tests {
spec:
image:
productVersion: 3.0.1
credentialsSecret: simple-superset-credentials
clusterConfig:
credentialsSecret: superset-credentials
nodes:
roleGroups:
default:
Expand Down
18 changes: 13 additions & 5 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,26 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
pub struct SupersetClusterSpec {
/// The Superset image to use
pub image: ProductImage,

/// Superset cluster configuration options.
#[serde(default)]
pub cluster_config: SupersetClusterConfig,

#[serde(default, skip_serializing_if = "Option::is_none")]
pub nodes: Option<Role<SupersetConfigFragment>>,
}

#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize)]
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SupersetClusterConfig {
#[serde(flatten)]
#[serde(default, flatten)]
pub authentication: SupersetAuthentication,

pub credentials_secret: String,

/// Cluster operations like pause reconciliation or cluster stop.
#[serde(default)]
pub cluster_operation: ClusterOperation,

/// This field controls which type of Service the Operator creates for this SupersetCluster:
///
/// * cluster-internal: Use a ClusterIP service
Expand All @@ -181,11 +185,13 @@ pub struct SupersetClusterConfig {
/// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
#[serde(default)]
pub listener_class: CurrentlySupportedListenerClasses,
#[serde(skip_serializing_if = "Option::is_none")]

#[serde(default, skip_serializing_if = "Option::is_none")]
pub mapbox_secret: Option<String>,

/// Name of the Vector aggregator discovery ConfigMap.
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub vector_aggregator_config_map_name: Option<String>,
}

Expand All @@ -196,8 +202,10 @@ pub enum CurrentlySupportedListenerClasses {
#[default]
#[serde(rename = "cluster-internal")]
ClusterInternal,

#[serde(rename = "external-unstable")]
ExternalUnstable,

#[serde(rename = "external-stable")]
ExternalStable,
}
Expand Down