Skip to content

Commit b484273

Browse files
committed
chore: Use delayed controller
1 parent f65032a commit b484273

5 files changed

Lines changed: 30 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
2323
- Also listen on the loopback interface so that k8s port-forwards work ([#870]).
2424
- The operator now utilizes the `.spec.clusterConfig.authorization.opa.package` property instead of hard-coding the package name to `nifi` ([#881]).
2525
- An `initialAdminUser` can now be provided for file-based authorization (e.g. LDAP) ([#884]).
26+
- Fix "404 page not found" error for the initial object list ([#909]).
2627

2728
### Removed
2829

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: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ rules:
9595
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
9696
- create
9797
- patch
98+
# Required for startup condition
99+
- list
100+
- watch
98101
{{- end }}
99102
- apiGroups:
100103
- events.k8s.io

rust/operator-binary/src/main.rs

Lines changed: 8 additions & 3 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-
ResourceExt,
20+
CustomResourceExt as _, ResourceExt,
2121
core::DeserializeGuard,
2222
runtime::{
2323
Controller,
@@ -29,7 +29,7 @@ use stackable_operator::{
2929
logging::controller::report_controller_reconciled,
3030
shared::yaml::SerializeOptions,
3131
telemetry::Tracing,
32-
utils::signal::SignalWatcher,
32+
utils::signal::{self, SignalWatcher},
3333
};
3434

3535
use crate::{
@@ -203,7 +203,12 @@ async fn main() -> anyhow::Result<()> {
203203
)
204204
.map(anyhow::Ok);
205205

206-
futures::try_join!(nifi_controller, eos_checker, webhook_server)?;
206+
let delayed_nifi_controller = async {
207+
signal::crd_established(&client, v1alpha1::NifiCluster::crd_name(), None).await?;
208+
nifi_controller.await
209+
};
210+
211+
futures::try_join!(delayed_nifi_controller, eos_checker, webhook_server)?;
207212
}
208213
}
209214

0 commit comments

Comments
 (0)