fix: only render set PDB field to fix schema validation#4511
fix: only render set PDB field to fix schema validation#4511markmandel merged 4 commits intoagones-dev:mainfrom
Conversation
The PDB templates unconditionally rendered both minAvailable and maxUnavailable fields, even when one was empty. This violates the PDB schema which requires exactly one of the two fields. Wrap each field in a conditional so only the field with a value is rendered. Fixes agones-dev#4507 Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
|
Hi, the Also, I'd like to join the agones-discuss mailing list to access build logs - is https://groups.google.com/forum/#!forum/agones-discuss still the right link? |
|
/gcbrun |
|
Build Failed 😭 Build Id: 1505a049-137c-4587-8ffc-8f8b1047a0ab Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Remove empty maxUnavailable fields from the generated install.yaml to match the corrected Helm templates. Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
|
/gcbrun |
|
Build Failed 😭 Build Id: 05912e0e-70d4-4e0b-9d51-a8552f79be7e Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Is the link failing for you? Works fine for me. |
|
You'll need to run |
Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
|
/gcbrun |
|
Build Succeeded 🥳 Build Id: 934e0363-9492-4021-9bb7-b0e9bd2eba5a The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
/gcbrun |
|
Build Succeeded 🥳 Build Id: 2debae6d-8163-453a-a546-bb7753b4983a The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
What type of PR is this?
/kind bug
What this PR does / Why we need it:
The PDB templates in
controller.yaml,extensions-deployment.yaml,ping.yaml, andservice/allocation.yamlunconditionally render bothminAvailableandmaxUnavailablefields. When only one is configured (the default setsminAvailable: 1), the other renders as an empty/null value, violating the PDBoneOfschema constraint.This wraps each field in a conditional so only the field with a value is included in the rendered manifest.
Which issue(s) this PR fixes:
Fixes #4507
Special notes for your reviewer:
Verified with
helm template:minAvailable: 1rendered (no emptymaxUnavailable)maxUnavailableset andminAvailableunset: onlymaxUnavailablerendered