File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
crates/stackable-operator Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
6
6
7
7
### Added
8
8
9
+ - Add CLI argument and env var to disable the end-of-support checker: ` EOS_DISABLED ` (` --eos-disabled ` ) ([ #1101 ] ).
9
10
- Add end-of-support checker ([ #1096 ] ).
10
11
- The EoS checker can be constructed using ` EndOfSupportChecker::new() ` .
11
12
- Add new ` MaintenanceOptions ` and ` EndOfSupportOptions ` structs.
@@ -24,6 +25,7 @@ All notable changes to this project will be documented in this file.
24
25
25
26
[ #1096 ] : https://github.com/stackabletech/operator-rs/pull/1096
26
27
[ #1098 ] : https://github.com/stackabletech/operator-rs/pull/1098
28
+ [ #1101 ] : https://github.com/stackabletech/operator-rs/pull/1101
27
29
28
30
## [ 0.98.0] - 2025-09-22
29
31
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ pub struct EndOfSupportOptions {
27
27
) ) ]
28
28
pub interval : Duration ,
29
29
30
+ /// If the end-of-support check should be disabled entirely.
31
+ #[ cfg_attr( feature = "clap" , arg( long = "eos-disabled" , env = "EOS_DISABLED" ) ) ]
32
+ pub disabled : bool ,
33
+
30
34
/// The support duration (how long the operator should be considered supported after
31
35
/// it's built-date).
32
36
///
@@ -65,6 +69,7 @@ pub enum Error {
65
69
pub struct EndOfSupportChecker {
66
70
datetime : DateTime < Utc > ,
67
71
interval : Duration ,
72
+ disabled : bool ,
68
73
}
69
74
70
75
impl EndOfSupportChecker {
@@ -79,6 +84,7 @@ impl EndOfSupportChecker {
79
84
let EndOfSupportOptions {
80
85
interval,
81
86
support_duration,
87
+ disabled,
82
88
..
83
89
} = options;
84
90
@@ -95,14 +101,23 @@ impl EndOfSupportChecker {
95
101
// Add the support duration to the built date. This marks the end-of-support date.
96
102
datetime += * support_duration;
97
103
98
- Ok ( Self { datetime, interval } )
104
+ Ok ( Self {
105
+ datetime,
106
+ interval,
107
+ disabled,
108
+ } )
99
109
}
100
110
101
111
/// Run the end-of-support checker.
102
112
///
103
113
/// It is recommended to run the end-of-support checker via [`futures::try_join!`] or
104
114
/// [`tokio::join`] alongside other futures (eg. for controllers).
105
115
pub async fn run ( self ) {
116
+ // Immediately return if the end-of-support checker is disabled.
117
+ if self . disabled {
118
+ return ;
119
+ }
120
+
106
121
// Construct an interval which can be polled.
107
122
let mut interval = tokio:: time:: interval ( self . interval . into ( ) ) ;
108
123
You can’t perform that action at this time.
0 commit comments