Skip to content

Commit 9013a30

Browse files
authored
chore: Update to stackable-operator 0.95.0 (#332)
1 parent 031c99b commit 9013a30

File tree

11 files changed

+1212
-571
lines changed

11 files changed

+1212
-571
lines changed

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2021"
1010
repository = "https://github.com/stackabletech/listener-operator"
1111

1212
[workspace.dependencies]
13-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.94.0" }
13+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.95.0" }
1414

1515
anyhow = "1.0"
1616
built = { version = "0.8", features = ["chrono", "git2"] }
@@ -20,8 +20,8 @@ futures = { version = "0.3" }
2020
h2 = "0.4"
2121
libc = "0.2"
2222
pin-project = "1.1"
23-
prost = "0.13"
24-
prost-types = "0.13"
23+
prost = "0.14"
24+
prost-types = "0.14"
2525
serde = "1.0"
2626
serde_json = "1.0"
2727
serde_yaml = "0.9"
@@ -30,9 +30,10 @@ strum = { version = "0.27", features = ["derive"] }
3030
socket2 = { version = "0.6", features = ["all"] }
3131
tokio = { version = "1.40", features = ["full"] }
3232
tokio-stream = { version = "0.1", features = ["net"] }
33-
tonic = "0.13"
34-
tonic-build = "0.13"
35-
tonic-reflection = "0.13"
33+
tonic = "0.14"
34+
tonic-prost = "0.14"
35+
tonic-prost-build = "0.14"
36+
tonic-reflection = "0.14"
3637
tracing = "0.1.40"
3738
walkdir = "2.5.0"
3839

crate-hashes.json

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

deploy/helm/listener-operator/templates/controller-deployment.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,34 @@ spec:
4040
- run
4141
- controller
4242
env:
43+
# The following env vars are passed as clap (think CLI) arguments to the operator.
44+
# They are picked up by clap using the structs defied in the operator.
45+
# (which is turn pulls in https://github.com/stackabletech/operator-rs/blob/main/crates/stackable-operator/src/cli.rs)
46+
# You can read there about the expected values and purposes.
47+
4348
- name: CSI_ENDPOINT
4449
value: /csi/csi.sock
4550

51+
# Sometimes products need to know the operator image, e.g. the opa-bundle-builder OPA
52+
# sidecar uses the operator image.
53+
- name: OPERATOR_IMAGE
54+
# Tilt can use annotations as image paths, but not env variables
55+
valueFrom:
56+
fieldRef:
57+
fieldPath: metadata.annotations['internal.stackable.tech/image']
58+
59+
# Namespace the operator Pod is running in, e.g. used to construct the conversion
60+
# webhook endpoint.
61+
- name: OPERATOR_NAMESPACE
62+
valueFrom:
63+
fieldRef:
64+
fieldPath: metadata.namespace
65+
66+
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
67+
# construct the conversion webhook endpoint.
68+
- name: OPERATOR_SERVICE_NAME
69+
value: {{ include "operator.fullname" . }}
70+
4671
# Operators need to know the node name they are running on, to e.g. discover the
4772
# Kubernetes domain name from the kubelet API.
4873
- name: KUBERNETES_NODE_NAME

deploy/helm/listener-operator/templates/node-daemonset.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,34 @@ spec:
3939
- run
4040
- node
4141
env:
42+
# The following env vars are passed as clap (think CLI) arguments to the operator.
43+
# They are picked up by clap using the structs defied in the operator.
44+
# (which is turn pulls in https://github.com/stackabletech/operator-rs/blob/main/crates/stackable-operator/src/cli.rs)
45+
# You can read there about the expected values and purposes.
46+
4247
- name: CSI_ENDPOINT
4348
value: /csi/csi.sock
4449

50+
# Sometimes products need to know the operator image, e.g. the opa-bundle-builder OPA
51+
# sidecar uses the operator image.
52+
- name: OPERATOR_IMAGE
53+
# Tilt can use annotations as image paths, but not env variables
54+
valueFrom:
55+
fieldRef:
56+
fieldPath: metadata.annotations['internal.stackable.tech/image']
57+
58+
# Namespace the operator Pod is running in, e.g. used to construct the conversion
59+
# webhook endpoint.
60+
- name: OPERATOR_NAMESPACE
61+
valueFrom:
62+
fieldRef:
63+
fieldPath: metadata.namespace
64+
65+
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
66+
# construct the conversion webhook endpoint.
67+
- name: OPERATOR_SERVICE_NAME
68+
value: {{ include "operator.fullname" . }}
69+
4570
# Operators need to know the node name they are running on, to e.g. discover the
4671
# Kubernetes domain name from the kubelet API.
4772
- name: KUBERNETES_NODE_NAME

rust/csi-grpc/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ publish = false
1010

1111
[dependencies]
1212
prost.workspace = true
13-
prost-types.workspace = true
1413
tonic.workspace = true
14+
tonic-prost.workspace = true
15+
prost-types.workspace = true
1516

1617
[build-dependencies]
17-
tonic-build.workspace = true
18+
tonic-prost-build.workspace = true

rust/csi-grpc/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::path::PathBuf;
44

55
fn main() {
66
let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is required"));
7-
tonic_build::configure()
7+
tonic_prost_build::configure()
88
.file_descriptor_set_path(out_dir.join("file_descriptor_set.bin"))
99
.compile_protos(&["csi.proto"], &["vendor/csi"])
1010
.unwrap();

rust/olm-deployer/src/main.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use stackable_operator::{
3030
discovery::{ApiResource, Discovery, Scope},
3131
},
3232
telemetry::{Tracing, tracing::TelemetryOptions},
33-
utils::cluster_info::KubernetesClusterInfoOpts,
33+
utils::cluster_info::KubernetesClusterInfoOptions,
3434
};
3535

3636
pub const APP_NAME: &str = "stkbl-listener-olm-deployer";
@@ -73,10 +73,10 @@ struct OlmDeployerRun {
7373
dir: std::path::PathBuf,
7474

7575
#[command(flatten)]
76-
pub telemetry_arguments: TelemetryOptions,
76+
pub telemetry: TelemetryOptions,
7777

7878
#[command(flatten)]
79-
pub cluster_info_opts: KubernetesClusterInfoOpts,
79+
pub cluster_info: KubernetesClusterInfoOptions,
8080
}
8181

8282
#[tokio::main]
@@ -88,16 +88,15 @@ async fn main() -> Result<()> {
8888
deployer,
8989
namespace,
9090
dir,
91-
telemetry_arguments,
92-
cluster_info_opts,
91+
telemetry,
92+
cluster_info,
9393
}) = opts.cmd
9494
{
9595
// NOTE (@NickLarsenNZ): Before stackable-telemetry was used:
9696
// - The console log level was set by `STKBL_LISTENER_OLM_DEPLOYER_LOG`, and is now `CONSOLE_LOG` (when using Tracing::pre_configured).
9797
// - The file log level was (maybe?) set by `STKBL_LISTENER_OLM_DEPLOYER_LOG`, and is now set via `FILE_LOG` (when using Tracing::pre_configured).
9898
// - The file log directory was set by `STKBL_LISTENER_OLM_DEPLOYER_LOG_DIRECTORY`, and is now set by `ROLLING_LOGS_DIR` (or via `--rolling-logs <DIRECTORY>`).
99-
let _tracing_guard =
100-
Tracing::pre_configured(built_info::PKG_NAME, telemetry_arguments).init()?;
99+
let _tracing_guard = Tracing::pre_configured(built_info::PKG_NAME, telemetry).init()?;
101100

102101
tracing::info!(
103102
built_info.pkg_version = built_info::PKG_VERSION,
@@ -109,8 +108,7 @@ async fn main() -> Result<()> {
109108
description = built_info::PKG_DESCRIPTION
110109
);
111110

112-
let client =
113-
client::initialize_operator(Some(APP_NAME.to_string()), &cluster_info_opts).await?;
111+
let client = client::initialize_operator(Some(APP_NAME.to_string()), &cluster_info).await?;
114112

115113
let deployment = get_deployment(&csv, &deployer, &namespace, &client).await?;
116114
let cluster_role = get_cluster_role(&csv, &client).await?;

rust/operator-binary/src/listener_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use stackable_operator::{
3333
},
3434
kvp::{Annotations, Labels},
3535
logging::controller::{ReconcilerError, report_controller_reconciled},
36-
time::Duration,
36+
shared::time::Duration,
3737
};
3838
use strum::IntoStaticStr;
3939

0 commit comments

Comments
 (0)