Skip to content

Commit 916fbc4

Browse files
committed
bump op-rs
1 parent eceea4f commit 916fbc4

8 files changed

Lines changed: 673 additions & 1001 deletions

File tree

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/nifi-operator"
1111

1212
[workspace.dependencies]
1313
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", branch = "kube-pre-3.1.0", features = ["telemetry", "versioned", "webhook"] }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", branch = "chore/kube-3.1.0", features = ["webhook"] }
1515

1616
anyhow = "1.0"
1717
built = { version = "0.8", features = ["chrono", "git2"] }
@@ -36,7 +36,7 @@ xml-rs = "1.0"
3636

3737
[patch."https://github.com/stackabletech/operator-rs.git"]
3838
# TODO revert this before merging!
39-
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/gitsync-ca-support" }
39+
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
4040
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
4141

4242
[patch.crates-io]

crate-hashes.json

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

extra/crds.yaml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ spec:
4848
description: This field contains OIDC-specific configuration. It is only required in case OIDC is used.
4949
nullable: true
5050
properties:
51+
clientAuthenticationMethod:
52+
default: client_secret_basic
53+
description: 'The client authentication method used when communicating with the token endpoint. Defaults to `client_secret_basic`. The required contents of `clientCredentialsSecret` depend on the chosen method: secret-based methods (`client_secret_basic`, `client_secret_post`, `client_secret_jwt`) expect a client secret, while `private_key_jwt` expects a private key.'
54+
enum:
55+
- client_secret_basic
56+
- client_secret_post
57+
- client_secret_jwt
58+
- private_key_jwt
59+
- none
60+
type: string
5161
clientCredentialsSecret:
5262
description: |-
5363
A reference to the OIDC client credentials secret. The secret contains
@@ -240,7 +250,12 @@ spec:
240250
format: uri
241251
type: string
242252
tls:
243-
description: Use a TLS connection. If not specified no TLS will be used.
253+
default:
254+
verification:
255+
server:
256+
caCert:
257+
webPki: {}
258+
description: Configure a TLS connection. If not specified it will default to webPki validation.
244259
nullable: true
245260
properties:
246261
verification:
@@ -592,7 +607,7 @@ spec:
592607
type: string
593608
type: object
594609
custom:
595-
description: Custom log configuration provided in a ConfigMap
610+
description: Log configuration provided in a ConfigMap
596611
properties:
597612
configMap:
598613
description: ConfigMap containing the log configuration files
@@ -672,7 +687,7 @@ spec:
672687
type: string
673688
type: object
674689
custom:
675-
description: Custom log configuration provided in a ConfigMap
690+
description: Log configuration provided in a ConfigMap
676691
properties:
677692
configMap:
678693
description: ConfigMap containing the log configuration files
@@ -752,7 +767,7 @@ spec:
752767
type: string
753768
type: object
754769
custom:
755-
description: Custom log configuration provided in a ConfigMap
770+
description: Log configuration provided in a ConfigMap
756771
properties:
757772
configMap:
758773
description: ConfigMap containing the log configuration files
@@ -832,7 +847,7 @@ spec:
832847
type: string
833848
type: object
834849
custom:
835-
description: Custom log configuration provided in a ConfigMap
850+
description: Log configuration provided in a ConfigMap
836851
properties:
837852
configMap:
838853
description: ConfigMap containing the log configuration files
@@ -885,7 +900,7 @@ spec:
885900
type: object
886901
type: object
887902
enableVectorAgent:
888-
description: Wether or not to deploy a container with the Vector log agent.
903+
description: Whether or not to deploy a container with the Vector log agent.
889904
nullable: true
890905
type: boolean
891906
type: object
@@ -1437,7 +1452,7 @@ spec:
14371452
type: string
14381453
type: object
14391454
custom:
1440-
description: Custom log configuration provided in a ConfigMap
1455+
description: Log configuration provided in a ConfigMap
14411456
properties:
14421457
configMap:
14431458
description: ConfigMap containing the log configuration files
@@ -1517,7 +1532,7 @@ spec:
15171532
type: string
15181533
type: object
15191534
custom:
1520-
description: Custom log configuration provided in a ConfigMap
1535+
description: Log configuration provided in a ConfigMap
15211536
properties:
15221537
configMap:
15231538
description: ConfigMap containing the log configuration files
@@ -1597,7 +1612,7 @@ spec:
15971612
type: string
15981613
type: object
15991614
custom:
1600-
description: Custom log configuration provided in a ConfigMap
1615+
description: Log configuration provided in a ConfigMap
16011616
properties:
16021617
configMap:
16031618
description: ConfigMap containing the log configuration files
@@ -1677,7 +1692,7 @@ spec:
16771692
type: string
16781693
type: object
16791694
custom:
1680-
description: Custom log configuration provided in a ConfigMap
1695+
description: Log configuration provided in a ConfigMap
16811696
properties:
16821697
configMap:
16831698
description: ConfigMap containing the log configuration files
@@ -1730,7 +1745,7 @@ spec:
17301745
type: object
17311746
type: object
17321747
enableVectorAgent:
1733-
description: Wether or not to deploy a container with the Vector log agent.
1748+
description: Whether or not to deploy a container with the Vector log agent.
17341749
nullable: true
17351750
type: boolean
17361751
type: object

rust/operator-binary/src/security/authorization.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use snafu::{ResultExt, Snafu};
33
use stackable_operator::{
44
builder::pod::volume::{SecretOperatorVolumeSourceBuilder, VolumeBuilder},
55
client::Client,
6-
commons::opa::OpaConfig,
6+
commons::{opa::OpaConfig, secret_class::SecretClassVolumeProvisionParts},
77
k8s_openapi::api::core::v1::{
88
ConfigMap, ConfigMapKeySelector, EnvVar, EnvVarSource, Volume, VolumeMount,
99
},
@@ -240,9 +240,12 @@ impl ResolvedNifiAuthorizationConfig {
240240
volumes.push(
241241
VolumeBuilder::new(OPA_TLS_VOLUME_NAME)
242242
.ephemeral(
243-
SecretOperatorVolumeSourceBuilder::new(secret_class)
244-
.build()
245-
.context(OpaTlsCertSecretClassVolumeBuildSnafu)?,
243+
SecretOperatorVolumeSourceBuilder::new(
244+
secret_class,
245+
SecretClassVolumeProvisionParts::PublicPrivate,
246+
)
247+
.build()
248+
.context(OpaTlsCertSecretClassVolumeBuildSnafu)?,
246249
)
247250
.build(),
248251
)

rust/operator-binary/src/security/oidc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ mod tests {
188188
client_credentials_secret_ref: "nifi-keycloak-client".to_owned(),
189189
extra_scopes: vec![],
190190
product_specific_fields: (),
191+
client_authentication_method: Default::default(),
191192
};
192193

193194
add_oidc_config_to_properties(&provider, &oidc, &mut properties)

rust/operator-binary/src/security/tls.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use snafu::{ResultExt, Snafu};
22
use stackable_operator::{
33
builder::pod::volume::{SecretFormat, SecretOperatorVolumeSourceBuilder, VolumeBuilder},
4+
commons::secret_class::SecretClassVolumeProvisionParts,
45
k8s_openapi::api::core::v1::Volume,
56
shared::time::Duration,
67
};
@@ -29,8 +30,10 @@ pub(crate) fn build_tls_volume(
2930
requested_secret_lifetime: &Duration,
3031
listener_scope: Option<&str>,
3132
) -> Result<Volume> {
32-
let mut secret_volume_source_builder =
33-
SecretOperatorVolumeSourceBuilder::new(nifi.server_tls_secret_class());
33+
let mut secret_volume_source_builder = SecretOperatorVolumeSourceBuilder::new(
34+
nifi.server_tls_secret_class(),
35+
SecretClassVolumeProvisionParts::PublicPrivate,
36+
);
3437

3538
if secret_format == SecretFormat::TlsPkcs12 {
3639
secret_volume_source_builder.with_tls_pkcs12_password(STACKABLE_TLS_STORE_PASSWORD);

0 commit comments

Comments
 (0)