Skip to content

Commit be348d3

Browse files
authored
fix: Bump stackable-operator for delayed controller functionality (#812)
* fix: Bump stackable-operator for delayed controller functionality * chore: Update changelog * chore: Use delayed controller
1 parent 87180d3 commit be348d3

7 files changed

Lines changed: 71 additions & 62 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.
1515

1616
### Changed
1717

18-
- Bump stackable-operator to 0.106.2 and strum to 0.28 ([#810]).
18+
- Bump stackable-operator to 0.108.0 and strum to 0.28 ([#810], [#812]).
1919
- Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#804]).
2020
- Introduce `v1alpha2` OpaCluster and mark UIF Entra backend as non-experimental ([#801]).
2121
- Deprecate OPA 1.8.0 ([#797]).
@@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
2424
### Fixed
2525

2626
- Prevent unnecessary warning messages in the OPA logs caused by setting a service for the Prometheus status ([#799]).
27+
- Fix "404 page not found" error for the initial object list ([#812]).
2728

2829
### Removed
2930

@@ -40,6 +41,7 @@ All notable changes to this project will be documented in this file.
4041
[#804]: https://github.com/stackabletech/opa-operator/pull/804
4142
[#805]: https://github.com/stackabletech/opa-operator/pull/805
4243
[#810]: https://github.com/stackabletech/opa-operator/pull/810
44+
[#812]: https://github.com/stackabletech/opa-operator/pull/812
4345

4446
## [25.11.0] - 2025-11-07
4547

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ repository = "https://github.com/stackabletech/opa-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", tag = "stackable-operator-0.106.2", features = [
15-
"telemetry",
16-
"versioned",
17-
"webhook",
18-
] }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = ["webhook"] }
1915
krb5 = { git = "https://github.com/stackabletech/krb5-rs.git", tag = "v0.1.0" }
2016

2117
anyhow = "1.0"

crate-hashes.json

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

deploy/helm/opa-operator/templates/roles.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ rules:
8383
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
8484
- create
8585
- patch
86+
# Required for startup condition
87+
- list
88+
- watch
8689
{{- end }}
8790
- apiGroups:
8891
- events.k8s.io

rust/operator-binary/src/main.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use stackable_operator::{
1717
core::v1::{ConfigMap, Service},
1818
},
1919
kube::{
20-
Api,
20+
Api, CustomResourceExt as _,
2121
core::DeserializeGuard,
2222
runtime::{
2323
Controller,
@@ -29,7 +29,10 @@ use stackable_operator::{
2929
namespace::WatchNamespace,
3030
shared::yaml::SerializeOptions,
3131
telemetry::Tracing,
32-
utils::{cluster_info::KubernetesClusterInfo, signal::SignalWatcher},
32+
utils::{
33+
cluster_info::KubernetesClusterInfo,
34+
signal::{self, SignalWatcher},
35+
},
3336
};
3437

3538
use crate::{
@@ -142,7 +145,7 @@ async fn main() -> anyhow::Result<()> {
142145
.map_err(|err| anyhow!(err).context("failed to run webhook server"));
143146

144147
let controller = create_controller(
145-
client,
148+
client.clone(),
146149
product_config,
147150
watch_namespace,
148151
operator_image.clone(),
@@ -152,7 +155,12 @@ async fn main() -> anyhow::Result<()> {
152155
)
153156
.map(anyhow::Ok);
154157

155-
futures::try_join!(controller, webhook_server, eos_checker)?;
158+
let delayed_controller = async {
159+
signal::crd_established(&client, v1alpha2::OpaCluster::crd_name(), None).await?;
160+
controller.await
161+
};
162+
163+
futures::try_join!(delayed_controller, webhook_server, eos_checker)?;
156164
}
157165
};
158166

0 commit comments

Comments
 (0)