File tree Expand file tree Collapse file tree
deploy/helm/zookeeper-operator/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,8 +103,11 @@ rules:
103103 {{- if .Values.maintenance.customResourceDefinitions.maintain }}
104104 - create
105105 - patch
106- {{- end }}
107106 - get
107+ # Required for startup condition
108+ - list
109+ - watch
110+ {{- end }}
108111 - apiGroups :
109112 - authentication.stackable.tech
110113 resources :
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use stackable_operator::{
1919 core:: v1:: { ConfigMap , Service } ,
2020 } ,
2121 kube:: {
22- Resource ,
22+ CustomResourceExt as _ , Resource ,
2323 core:: DeserializeGuard ,
2424 runtime:: {
2525 Controller ,
@@ -31,7 +31,7 @@ use stackable_operator::{
3131 logging:: controller:: report_controller_reconciled,
3232 shared:: yaml:: SerializeOptions ,
3333 telemetry:: Tracing ,
34- utils:: signal:: SignalWatcher ,
34+ utils:: signal:: { self , SignalWatcher } ,
3535} ;
3636
3737use crate :: {
@@ -245,8 +245,19 @@ async fn main() -> anyhow::Result<()> {
245245 )
246246 . map ( anyhow:: Ok ) ;
247247
248+ let delayed_zk_controller = async {
249+ signal:: crd_established ( & client, v1alpha1:: ZookeeperCluster :: crd_name ( ) , None )
250+ . await ?;
251+ zk_controller. await
252+ } ;
253+
248254 // kube-runtime's Controller will tokio::spawn each reconciliation, so this only concerns the internal watch machinery
249- futures:: try_join!( zk_controller, znode_controller, eos_checker, webhook_server) ?;
255+ futures:: try_join!(
256+ delayed_zk_controller,
257+ znode_controller,
258+ eos_checker,
259+ webhook_server
260+ ) ?;
250261 }
251262 }
252263
You can’t perform that action at this time.
0 commit comments