Skip to content

Add credentials to PR 250 (older that a week)#268

Closed
Robert-Stam wants to merge 3 commits into
mainfrom
fix/roberts/pr250
Closed

Add credentials to PR 250 (older that a week)#268
Robert-Stam wants to merge 3 commits into
mainfrom
fix/roberts/pr250

Conversation

@Robert-Stam

Copy link
Copy Markdown
Contributor

No description provided.

mouchar and others added 3 commits June 26, 2026 15:22
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>
@Robert-Stam Robert-Stam self-assigned this Jul 15, 2026
@Robert-Stam

Copy link
Copy Markdown
Contributor Author

not needed anymore, PR 250 is injected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants