Update metadata:annotations: Too long
error string detection
#6480
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.
Update the regular expression used to match the Kubernetes
metadata.annotations: Too long
API error returned when a resource annotation exceeds a maximum size.The error message changed in Kubernetes
v1.32
: kubernetes/kubernetes#128553The change of error string caused Tilt's logic to fall back to create or replace the resource to fail:
tilt/internal/k8s/client.go
Lines 574 to 583 in 875606f
Updating the regular expression ensures that resources with annotations exceeding the maximum size can still be applied in Kubernetes >=
v1.32
.Verification
Take a large CRD, such as the one in this Gist and save it as
install.yaml
.Create the following
Tiltfile
:Run
tilt up
against a Kubernetesv1.32
cluster, such as one created bykind
v0.26.0
.On
master
tilt up
fails:With the changes from this PR
tilt up
succeeds: