-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Align SDK with Kubebuilder - Project version stable #4402
Align SDK with Kubebuilder - Project version stable #4402
Conversation
7eaff31
to
9fe1d52
Compare
internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go
Outdated
Show resolved
Hide resolved
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.
Personally I think the kubebuilder dep should not be upgraded until v3.0.0 is released and project version 3-alpha is stable, in case other changes are made to the project file spec. That way the migration is guaranteed to be a one time thing.
60f0af8
to
de03ee2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3372450
to
9fe9be7
Compare
This comment has been minimized.
This comment has been minimized.
9fe9be7
to
80812e4
Compare
ccf4ebe
to
de17d18
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.
First pass
internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go
Outdated
Show resolved
Hide resolved
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.
Still quite a bit to fix, and a few changes can be broken out into separate PRs since they aren't dependent on kubebuilder:
kube-rbac-proxy
bump for ansible and helm- Makefile updates
hack/generate/samples/internal/go/v3/memcached_with_webhooks.go
Outdated
Show resolved
Hide resolved
internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go
Outdated
Show resolved
Hide resolved
a214328
to
20be9fd
Compare
Just to clarify, the migration hook he is talking about is to migrate the project configuration ( |
e627b4d
to
f415d00
Compare
f415d00
to
0aa775a
Compare
/lgtm |
/retest |
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.
A bunch of nits and a few questions. Looks good after non-blocking changes are made
s.config.UpdateResources(res.GVK()) | ||
resource := resourceOptions.NewResource(s.config) | ||
|
||
resource.Domain = s.config.GetDomain() |
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.
@Adirio is there a reason this isn't being set by NewResource()
?
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 sets the Domain
in the GVK
of the Options
. Previously, when configs are injected to subcommands, options.Domain = c.GetDomain()
is called. This is, the easliest we have the config we set it in the Options
and that gets transfered to the Resource
.
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.
Ah then this is redundant. @camilamacedo86 the scaffold templates should use Resource.GVK.Domain
.
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.
Just a small comment: Resource.Domain
can also be accessed directly as the GVK
is actually embedded (and inlined for json)
@@ -1,11 +1,15 @@ | |||
domain: example.com | |||
layout: ansible.sdk.operatorframework.io/v1 | |||
plugins: |
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 this field was deliberately marshaled last so it would always be at the bottom. There might be a regression upstream @Adirio.
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 was marshalled separately to do some config/v2 logic and with the config.Config
interface with different implementations for each version that logic is no longer needed so it is now being marshalled at the same time that the rest. I can't find any reason why we should keep this last, but if you have any we can handle this in two steps again.
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.
Mainly because that key contains multiple other configs that could grow very large down the line. Its a cosmetic thing. I guess I'm fine leaving it as-is, but that was the original intent of marshaling it 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.
Okey I see your point. Luckyly, loading doesn't care about the order and each time you call a plugin the file is re-written, so if we decide to go back to keeping plugins as the last key, it will be backwards compatible with every project. That means that we can tackle this issue when we find it.
0aa775a
to
2ab33a6
Compare
2ab33a6
to
5ab84a1
Compare
5ab84a1
to
13b77ce
Compare
Signed-off-by: Camila Macedo <cmacedo@redhat.com>
13b77ce
to
2f1e522
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.
@camilamacedo86 nice work!
/lgtm
Update the kube-rbac-proxy image to use v0.8.0, which runs as nonroot. This change was done in operator-sdk v1.5.0, but was not noted in the migration guide. See operator-framework/operator-sdk#4402
Update the kube-rbac-proxy image to use v0.8.0, which runs as nonroot. This change was done in operator-sdk v1.5.0, but was not noted in the migration guide. See operator-framework/operator-sdk#4402
Description of the change:
v2.3.2-0.20201214213149-0a807f4e9428
tov3.0.0-alpha.0.0.20210203175028-3c8e370d49c5
. See: kubernetes-sigs/kubebuilder@0a807f4...3c8e370 and fix modules to point out v3.Motivation for the change:
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs