Commit 12716c9
authored
Handle istio-cni cleanup on node restart (#57456)
* Handle istio-cni on node cleanup
Currently on cleanup if safe upgrades are enable we check if the
cni daemonset has a deletion time stamp. If it didn't have a
stamp then we are in the process of upgrade or rebooting the node.
Otherwise we should cleanup. This didn't handle failures on the
get request for the DS (other than not found) which could indicate
the node is in an unhealthy state / restarting. Previously an err
would mean we would cleanup. Now we will retry the get, and assume
we shouldn't cleanup by default.
Signed-off-by: Jackie Elliott <[email protected]>
* fix lint
Signed-off-by: Jackie Elliott <[email protected]>
* Add release note
Signed-off-by: Jackie Elliott <[email protected]>
* Cleanup root
Signed-off-by: Jackie Elliott <[email protected]>
* Refactor StopCleanup to only default to true when using istio
owned cni config. Also, check for cni pod in plugin prior to
getting k8s client.
Signed-off-by: Jackie Elliott <[email protected]>
* Handle unauthorized get error on cleanup
Signed-off-by: Jackie Elliott <[email protected]>
* Fix releasenotes and string format
Signed-off-by: Jackie Elliott <[email protected]>
* Fix nits
Signed-off-by: Jackie Elliott <[email protected]>
---------
Signed-off-by: Jackie Elliott <[email protected]>1 parent 724e236 commit 12716c9
File tree
4 files changed
+81
-32
lines changed- cni/pkg
- cmd
- nodeagent
- plugin
- releasenotes/notes
4 files changed
+81
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | | - | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
| 127 | + | |
| 128 | + | |
123 | 129 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
134 | 168 | | |
135 | 169 | | |
136 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
167 | 184 | | |
168 | 185 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 186 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| |||
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
407 | | - | |
| 410 | + | |
408 | 411 | | |
409 | 412 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments