Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using strategy.spinnaker.io/replace along with strategy.spinnaker.io/max-version-history makes replace not work #168

Closed
billiford opened this issue Aug 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@billiford
Copy link
Collaborator

Deploy two config maps, one with just the strategy.spinnaker.io/replace annotation and another with both annotations strategy.spinnaker.io/replace and strategy.spinnaker.io/max-version-history. Note that only the first removes the annotation kubectl.kubernetes.io/last-applied-configuration generated by kubectl on replace. The second config map still has this annotation, which for large config maps results in this error on replace:

error applying manifest (kind: ConfigMap, apiVersion: v1, name: test-v000): ConfigMap "test-v000" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

image

@billiford billiford added the bug Something isn't working label Aug 11, 2023
@alice485
Copy link
Contributor

alice485 commented Jan 9, 2024

it looks like when the max-version-history annotation (or really any numerical annotation) is added without explicit quotes on the value it gets parsed as an int when converted to JSON. So when the request makes it to go-clouddriver, any time Unstructured.GetAnnotations() is called, the below error occurs internally but gets ignored because that func doesn't examine the return values of NestedStringMap(). This causes the annotations to be reset to empty when go-clouddriver begins adding Spinnaker's reserved annotations.

.metadata.annotations accessor error: contains non-string key in the map: 10 is of the type int64, expected string

@billiford
Copy link
Collaborator Author

Excellent find, thank you!

@billiford
Copy link
Collaborator Author

@abe21412, @guido9j, shouldn't we close this issue since #175 fixed it?

@billimek
Copy link
Member

Fixed by #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants