Skip to content

Commit 5268e8e

Browse files
committed
make field required
1 parent 1438a24 commit 5268e8e

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

Cargo.nix

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crate-hashes.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/helm/superset-operator/crds/crds.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ spec:
8080
properties:
8181
roleMappingFromOpa:
8282
description: Configure the OPA stacklet [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) and the name of the Rego package containing your authorization rules. Consult the [OPA authorization documentation](https://docs.stackable.tech/home/nightly/concepts/opa) to learn how to deploy Rego authorization rules with OPA.
83-
nullable: true
8483
properties:
8584
cache:
8685
description: Configuration for an Superset internal cache for calls to OPA
@@ -107,6 +106,8 @@ spec:
107106
- cache
108107
- configMapName
109108
type: object
109+
required:
110+
- roleMappingFromOpa
110111
type: object
111112
clusterOperation:
112113
default:

rust/crd/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ pub struct SupersetOpaRoleMappingConfig {
282282
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
283283
#[serde(rename_all = "camelCase")]
284284
pub struct SupersetAuthorization {
285-
pub role_mapping_from_opa: Option<SupersetOpaRoleMappingConfig>,
285+
pub role_mapping_from_opa: SupersetOpaRoleMappingConfig,
286286
}
287287

288288
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
@@ -523,7 +523,7 @@ impl SupersetCluster {
523523
.cluster_config
524524
.authorization
525525
.as_ref()
526-
.and_then(|a| a.role_mapping_from_opa.as_ref())
526+
.map(|a| &a.role_mapping_from_opa)
527527
}
528528

529529
/// Retrieve and merge resource configs for role and role groups

0 commit comments

Comments
 (0)