-
Notifications
You must be signed in to change notification settings - Fork 336
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
feat(kuma-cp) add versions endpoint #1602
Conversation
Added `/versions/` API endpoint which will return the object with supported versions of dependencies (currently supported versions of envoy for kumaDPs) Signed-off-by: Bart Smykla <[email protected]>
Signed-off-by: Bart Smykla <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm question would be, how to maintain this json "automagically" at every release?
Expect(data).ToNot(BeNil()) | ||
Expect(data.KumaDp).ToNot(BeNil()) | ||
Expect(data.KumaDp["1.0.8"]).ToNot(BeNil()) | ||
Expect(data.KumaDp["1.0.8"].Envoy).To(Equal("1.16.2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a need to check each and every entry ;) Maybe just first,middle,last?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking it as an additional layer for us to be sure we are presenting expected versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this won't work on prod. You need to embed this JSON into binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's probably better to just embed this into go as a string
As suggested by Jakub in the past form it wouldn't work as it has to be compiled into kuma-cp binary Signed-off-by: Bart Smykla <[email protected]>
@jakubdyszkiewicz as you suggested, embeded it |
Removed unnecessary error from function returning versions endpoint handler Signed-off-by: Bart Smykla <[email protected]>
Summary
Added
/versions
endpointThe versions which are present in a json file, were taken from envoys included in every release starting from
1.0.0
by looking into Dockerfile of our image containing kuma-dp (i.e. https://github.com/kumahq/kuma/blob/1.0.0/tools/releases/dockerfiles/Dockerfile.kuma-dp#L2)ref.
Documentation