Add credentials to PR 250 (older that a week)#268
Closed
Robert-Stam wants to merge 3 commits into
Closed
Conversation
expandTolerations maps the operator/effect strings onto the protobuf
enum value maps and silently ignores values that are not found. Supplying
the Kubernetes short forms ("Exists"/"NoSchedule") instead of the proto
enum names (TOLERATION_OPERATOR_EXISTS / TOLERATION_EFFECT_NO_SCHEDULE)
therefore produced a successful plan but a cluster whose pods had the
operator/effect unset (operator defaulting to Equal, no effect).
Add a ValidateFunc (StringInSlice of the enum names, excluding the
*_UNSPECIFIED sentinel) to the operator and effect fields in resource
mode, mirroring the existing storage-tier validation, so an invalid
value fails at plan time. Includes a unit test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
For a TypeSet element the SDK materializes every schema field, so an unset `key`/`value` is read as "" with ok=true. expandTolerations then set Value/Key to a pointer to an empty string, i.e. "value is set to empty". The API rejects this for Exists tolerations with "value must not be set when operator is Exists [toleration.value_for_exists]". Only set the Key/Value pointers when the string is non-empty, matching the existing guards on operator/effect/toleration_seconds. Includes a unit test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The operator/effect field descriptions added in the schema now surface the accepted protobuf enum names (e.g. TOLERATION_OPERATOR_EXISTS) in the generated documentation, where previously the fields were undocumented. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
not needed anymore, PR 250 is injected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.