Commit 89e339b
committed
deploy: fix CSIStorageCapacity version check
Checking via "kubectl get" and parsing its output was broken in
combination with "-o pipefail" because then the overall result of the
pipe was false even when the expected error occurred. Checking the
output of "kubectl api-resources" and failing the install when that
command fails (i.e. not using it inside an if) is better.
The check also failed on clusters that had the v1beta1 API but not the
v1alpha1. We need to be very careful about which version we need for
the external-provisioner that is going to be installed. Unfortunately
some heuristics are needed to determine that.1 parent 4e95588 commit 89e339b
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
142 | 149 | | |
| 150 | + | |
| 151 | + | |
143 | 152 | | |
| 153 | + | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
| |||
0 commit comments