File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ async fn main() -> anyhow::Result<()> {
92
92
product_config : _,
93
93
watch_namespace,
94
94
operator_environment,
95
+ disable_crd_maintenance,
95
96
} ,
96
97
} ) => {
97
98
// NOTE (@NickLarsenNZ): Before stackable-telemetry was used:
@@ -150,10 +151,13 @@ async fn main() -> anyhow::Result<()> {
150
151
let truststore_controller =
151
152
truststore_controller:: start ( & client, & watch_namespace) . map ( anyhow:: Ok ) ;
152
153
153
- let conversion_webhook =
154
- conversion_webhook ( client. as_kube_client ( ) , operator_environment)
155
- . await
156
- . context ( "failed to create conversion webhook" ) ?;
154
+ let conversion_webhook = conversion_webhook (
155
+ client. as_kube_client ( ) ,
156
+ operator_environment,
157
+ disable_crd_maintenance,
158
+ )
159
+ . await
160
+ . context ( "failed to create conversion webhook" ) ?;
157
161
let conversion_webhook = conversion_webhook
158
162
. run ( )
159
163
. map_err ( |err| anyhow ! ( err) . context ( "failed to run conversion webhook" ) ) ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ use crate::{
15
15
pub async fn conversion_webhook (
16
16
client : Client ,
17
17
operator_environment : OperatorEnvironmentOptions ,
18
+ disable_crd_management : bool ,
18
19
) -> anyhow:: Result < ConversionWebhookServer > {
19
20
let crds_and_handlers = [
20
21
(
@@ -34,6 +35,7 @@ pub async fn conversion_webhook(
34
35
field_manager : OPERATOR_NAME . to_owned ( ) ,
35
36
namespace : operator_environment. operator_namespace ,
36
37
service_name : operator_environment. operator_service_name ,
38
+ maintain_crds : !disable_crd_management,
37
39
} ;
38
40
39
41
Ok ( ConversionWebhookServer :: new ( crds_and_handlers, options, client) . await ?)
You can’t perform that action at this time.
0 commit comments