Commit d360c47
authored
fix(operator/crd): Skip serializing traffic policy field if None (#1152)
We skip serialization if this is None to ensure that forwarding the
selection of the policy to Kubernetes works as expected. We stumbled
over the following unexpected behaviour:
- If ListenerClass manifests (which don't set this field) are applied
by a client (like kubectl or helm), they are applied as expected -
no errors.
- If the same manifests are applied by Rust code, it fails. This field
cannot be set to "null". Serde by default serializes None to "null".
We expected there to be a null variant in the schema, which would allow
setting this field to null, but the schema only lists the two available
variants. Additionally, ad-hoc testing showed that manifests would still
be rejected after manually adjusting the schema in the CRD. This is
something which should be investigated further.1 parent 73ed8c5 commit d360c47
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
| |||
0 commit comments