-
Notifications
You must be signed in to change notification settings - Fork 391
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
✨ client: Generate apply configurations #2583
✨ client: Generate apply configurations #2583
Conversation
3dd0fec
to
4c70a6d
Compare
4c70a6d
to
45f0bc1
Compare
--output-base "${SCRIPT_ROOT}" \ | ||
--trim-path-prefix github.com/kcp-dev/kcp | ||
|
||
"$GOPATH"/bin/client-gen \ |
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.
What does this call to client-gen
do?
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.
The upstream generate-groups.sh
script does not support passing the apply-configuration-package
option to client-gen
, so this call does what generate-groups.sh "client"
would do, but with the extra apply-configuration-package
passed to client-gen
. Upstream code-generator
scripts completely lack support for applyconfiguration-gen
, so I went for the path of least resistance, and have code-generator
improved asynchronously.
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, right, of course - I chatted with upstream about this and they are 100% on getting generate-groups.sh
to support it - is that something you'd be up for doing?
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.
Great! Sure, I'll do it ASAP 👍🏼.
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.
Upstream PR: kubernetes/kubernetes#114987
hack/update-codegen-clients.sh
Outdated
@@ -36,7 +71,7 @@ bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client" \ | |||
|
|||
pushd ./pkg/apis | |||
${CODE_GENERATOR} \ | |||
"client:outputPackagePath=github.com/kcp-dev/kcp/pkg/client,apiPackagePath=github.com/kcp-dev/kcp/pkg/apis,singleClusterClientPackagePath=github.com/kcp-dev/kcp/pkg/client/clientset/versioned,headerFile=${BOILERPLATE_HEADER}" \ | |||
"client:outputPackagePath=github.com/kcp-dev/kcp/pkg/client,apiPackagePath=github.com/kcp-dev/kcp/pkg/apis,singleClusterClientPackagePath=github.com/kcp-dev/kcp/pkg/client/clientset/versioned,singleClusterApplyConfigurationsPackagePath=github.com/kcp-dev/kcp/pkg/client/applyconfiguration,headerFile=${BOILERPLATE_HEADER}" \ |
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.
If we want to test SSA in e2e, we should also add apply-configurations to wildwest
group
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.
Right. Let me do it 👍🏼.
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.
Updated. PTAL 🙏🏼.
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 awesome!
9e2b0bc
to
c050fb3
Compare
c050fb3
to
2214b2b
Compare
2214b2b
to
73965d6
Compare
73965d6
to
ecdb5d0
Compare
0b9e622
to
64efa80
Compare
64efa80
to
72c7367
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: stevekuznetsov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
This PR enables the generation of apply configurations for kcp APIs, so they can be used for server-side apply requests.
Requires kubernetes/kubernetes#114920.