-
Notifications
You must be signed in to change notification settings - Fork 687
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
[WIP] v4alpha1 CRDs #5790
Draft
kflynn
wants to merge
10
commits into
dev/v4
Choose a base branch
from
flynn/add-v4alpha1
base: dev/v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] v4alpha1 CRDs #5790
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…1. Allow make generate-fast to work with it. Signed-off-by: Flynn <[email protected]>
kflynn
force-pushed
the
flynn/add-v4alpha1
branch
from
October 16, 2024 02:31
4e4efe1
to
dc6ddc6
Compare
Turns out that the Go ecosystem doesn't currently offer control over the tag used when serializing or deserializing JSON or YAML. This is pretty appalling. We need control over the tag, and the most sane way I've found to support that is _copying all of encoding/json and sigs.k8s.io/yaml into our tree_ and modifying them. Ugh. Bad ecosystem! Signed-off-by: Flynn <[email protected]>
…e json tag (and, also, it doesn't rely on internal imports) Signed-off-by: Flynn <[email protected]>
… (as needed). Signed-off-by: Flynn <[email protected]>
…t to migrate all the v3alpha1 testdata for emissary-ingress.dev/v4alpha1 over to proper v4 CRDs. Signed-off-by: Flynn <[email protected]>
kflynn
force-pushed
the
flynn/add-v4alpha1
branch
from
October 16, 2024 02:33
dc6ddc6
to
3e925af
Compare
Signed-off-by: Flynn <[email protected]>
…ions don't! Really, standard library authors? Really?? Signed-off-by: Flynn <[email protected]>
Signed-off-by: Flynn <[email protected]>
Signed-off-by: Flynn <[email protected]>
…world. This is the point where we _start_ to have some functionality working. The FakeCollision test passes after this change(!!). Signed-off-by: Flynn <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This has been... ugly.
We're starting from the point of view that the v4alpha1 CRDs should be camelCase internally, but that we'll need to still use snake_case when talking to Python (purely as a practical matter of paranoia). Managing that... wow. The Go ecosystem, you see, does not give you control over the tag used when serializing or deserializing JSON or YAML.
The Right Way to manage this may be a PR into
encoding/json
andsigs.k8s.io/yaml
. The short-term way? I've copied those into Emissary's codebase and hacked them. 😛The end result is:
encoding/json
uses thejson
tag (for camelCase v4alpha1 nativeness)github.com/emissary-ingress/emissary/v3/pkg/json
uses thev3
tag but falls back to thejson
tag (for snake_case v3alpha1 madness)sigs.k8s.io/yaml
uses theyaml
andjson
tags (for camelCase v4alpha1 nativeness)github.com/emissary-ingress/emissary/v3/pkg/yaml
uses thev3
tag but falls back to theyaml
andjson
tags (for snake_case v3alpha1 madness)and
cmd/migrator
has the beginnings of a conversion tool. I say "beginnings" because it currently only does snake_case YAML to camelCase YAML but it's a start... and I used it to convert the testdata manifests for the v4alpha1 CRDs.Signed-off-by: Flynn [email protected]