Commit c092761
authored
cli: align on apigroup for backendtlspolicy (#1500)
**Description**
Fixes a small issue that happened in standalone mode and the discovery
of BackendTLS policies for the MCPRoute security configuration.
In the controller code we're using `gwapiv1` in all reconcilers and the
controller-runtime Client. That client is typed and works with the
specific version. The fakeClient used in standalone mode, populated the
BackendTLSPolicy as `gwapiv1alpha3`, causing the controller code to not
find it.
We could change the controller code and make sure all operations that
use the `client.Client` from teh controller runtime account for all
versions, but that would be a lot of repeated code, and the controller
consistently uses `gwapiv1` everywhere, so I think it is OK to jsut fix
the standalone mode to initialize its fakeClient with the right version
(note that we can still "read any version from the YAML file", as we
generically unmarshal to `Unstructured`; it's just a matter of how we
populate the data in the fakeClient)..
**Related Issues/PRs (if applicable)**
N/A
**Special notes for reviewers (if applicable)**
N/A
Signed-off-by: Ignasi Barrera <[email protected]>1 parent bfb8b54 commit c092761
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| |||
0 commit comments