-
Notifications
You must be signed in to change notification settings - Fork 680
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
[v2.5] Re-add support for getambassador.io/v1 #4055
Conversation
0aebc76
to
7b3fad2
Compare
7b3fad2
to
abc842a
Compare
d58f039
to
68a272b
Compare
68a272b
to
6e83a7e
Compare
50978db
to
7ae1939
Compare
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.
Thanks for tracking this down and addressing it so quickly. I will give it a deeper review on Monday, but at first glance it looks good. I left a few questions.
I think it would be good to test out @kflynn reproducer to verify it isn't occurring still and we will want to make sure this gets pulled into Edge Stack right away verify it doesn't have any issues (I don't think there will be)
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.
Overall looks good, a couple of comments and questions.
- @kflynn - it would be good to have you verify it
- Do we need to pull this into Edge Stack and verify all is good before merging? My initial reaction is no because these are isolated to the
apiext
so we shouldn't have any issues.
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.
Looks good from here, and I can verify that it shuts up the logs for me, too. I think that @LanceEa is correct about the mostly-static scaffold file, but I think that's a good topic for further discussion and a future PR, rather than a necessary thing right now.
Anecdotally, I saw timeouts from apiext when testing this, which worries me a bit. Time to look into that, maybe.
6b6a127
to
3e0742d
Compare
2 changes:
|
3e0742d
to
3270cae
Compare
Rebased on to #4685 to resolve linter issues |
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.
lgtm...Looks like this is landing in 2.5 so we will want to get it landed in master too.
[v2.5] Backport more changes associated with the Go 1.19 upgrade While working on #4055 I noticed that there's some wrong gofmt-ing in `crd_devportal.go` related to the Go 1.19 upgrade. So I re-did the upgrade using the following procedure, to see if we missed anything in the backport: My steps: 1. I checked out a branch from before #4612 (2.x's Go 1.19 upgrade), then 2. just cherry-picked #4374 (3.x's Go 1.18 upgrade) and #4438 (3.x's Go 1.19 upgrade), 3. upgraded golangci-lint to match #4612. 4. Finally, I merged the that #4612 commit. 5. (I also merged #4683 to get CI to work, but that's not part of the substance of this PR) This reveals a few things that were missed in #4612: - gofmt-related changes: - 34e1a6e : envoy-control-plane: Don't include the license statement in package docs - 9fa9ef9 : tools: Upgrade protoc (in order to have it comply with gofmt 1.19) - 693eb47 : tools: Upgrade protoc-gen-go (in order to have it comply with gofmt 1.19) - fcc515d : Fuss with godoc formatting that Go 1.19 gofmt would mess up - cfda799 : make generate: Run the envoy protobufs through gofmt - other changes: - a1a295e : generate.mk: We no longer consume k8s.io protobufs - Bumping the `Makefile's` Go-version check from 1.17 to 1.19 (via a30ee4e : Makefile: Don't hard-code the required Go version in the bootstrap test / Detect it, like everything else does.) These are all good things that are worth backporting. Signed-off-by: Luke Shumaker <lukeshu@lukeshu.com>
Fixed the changelog: diff --git a/CHANGELOG.md b/CHANGELOG.md
index 884539fa1..302918068 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -82,8 +82,8 @@ it will be removed; but as it won't be user-visible this isn't considered a brea
## RELEASE NOTES
-## [2.5.0] November 03, 2022
-[2.5.0]: https://github.com/emissary-ingress/emissary/compare/v2.4.0...v2.5.0
+## [2.5.1] TBD
+[2.5.1]: https://github.com/emissary-ingress/emissary/compare/v2.5.0...v2.5.1
### Emissary-ingress and Ambassador Edge Stack
@@ -94,6 +94,11 @@ it will be removed; but as it won't be user-visible this isn't considered a brea
Kubernetes Nodes (regardless of whether the installation was migrated from 1.y or was a fresh 2.y
install); fully supporting `v1` again should resolve these errors.
+## [2.5.0] November 03, 2022
+[2.5.0]: https://github.com/emissary-ingress/emissary/compare/v2.4.0...v2.5.0
+
+### Emissary-ingress and Ambassador Edge Stack
+
- Bugfix: If a `Host` or `TLSContext` contained a hostname with a `:` then when using the
diagnostics endpoints `ambassador/v0/diagd` then an error would be thrown due to the parsing logic
not being able to handle the extra colon. This has been fixed and Emissary-ingress will not throw
diff --git a/docs/releaseNotes.yml b/docs/releaseNotes.yml
index 1c935bd74..a38f8fa9a 100644
--- a/docs/releaseNotes.yml
+++ b/docs/releaseNotes.yml
@@ -32,8 +32,8 @@
changelog: https://github.com/emissary-ingress/emissary/blob/$branch$/CHANGELOG.md
items:
- - version: 2.5.0
- date: '2022-11-03'
+ - version: 2.5.1
+ date: TBD
notes:
- title: Re-add support for getambassador.io/v1
type: feature
@@ -46,6 +46,9 @@ items:
installation was migrated from 1.y or was a fresh 2.y install); fully supporting
<code>v1</code> again should resolve these errors.
+ - version: 2.5.0
+ date: '2022-11-03'
+ notes:
- title: Diagnostics stats properly handles parsing envoy metrics with colons
type: bugfix
body: >- |
3270cae
to
970cbb0
Compare
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.
looks like there still is a merge conflict
This is largely backported from apro.git. However, unlike apro.git, we also have to convert annotations. So instead of just putting `borrowed_webhook.go` next to `conversion_test.go`, put it in pkg/kates, so that other code can use it as well. Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Have it act as an alias of v2. Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Also, add a comment. Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
970cbb0
to
d794452
Compare
Rebased to resolve merge conflict in the changelog. |
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.
This looks ok to me
What is the timetable for a 2.5.x release with this fix? Would love to resolve the constant spewing of this log if possible.
|
Description
There are 3 reasons why this PR is worth-while (ordered most-compelling first):
v3alpha
. I discuss this in more length at https://github.com/emissary-ingress/emissary/wiki/design-doc:-Emissary's-CRD-conversion-logicWhy this fixes #4240
Background: Users coming from Emissary 1.x likely have resources stored as
getambassador.io/v1
. That is, the CRDs'status.storedVersions
will includev1
. In order to be able to even apply the newercrds.yaml
, it must include all of the oldstatus.storedVersions
. So, the 2.1-2.4crds.yaml
includes an "unserved" v1 that is unusable by users, but satisfies Kubernetes' requirement that all versions instatus.storedVersions
be mentioned in the definition. (Thanks to @kflynn for reminding me of this background--I'd totally forgotten it.)Related: https://www.notion.so/datawire/smooth-upgrades-how-v1-is-handled-aae77e4dcb554a6bafcdfc071875b48f
However, it turns out that even though it's unserved, Kube wants to ask apiext about it--even if it's a fresh 2.x/3.x install. That's what #4240. We try to could come up with ways to get Kube to stop asking about v1. But it's fairly easy to just actually add support for v1 so that we don't error when Kube asks about it; plus this has the 2 other benefits that it reduces friction for users and that we'll benefit from the machinery in the future, so even if it were harder than the alternative, it would likely still be worth it.
Related Issues
Testing
I've verified that I don't see the
no kind "XXX" is registered for version "getambassador.io/v1"
errors fromdocker logs
when running in k3d that @kflynn said he sees. But he should verify as well that this resolves things for his set up.Checklist
I made sure to update
CHANGELOG.md
.Remember, the CHANGELOG needs to mention:
This is unlikely to impact how Ambassador performs at scale. - I'd be shocked if any of the places I touch are in the hot-path, but there probably are more allocations now, so IDK
Remember, things that might have an impact at scale include:
My change is adequately tested. - pending feedback from @kflynn
Remember when considering testing:
I updated
DEVELOPING.md
with any any special dev tricks I had to use to work on this code efficiently. - no new tricks