-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore: generate applyconfigurations for APIs (SSA) #106
Conversation
a2d9cc9
to
d680a31
Compare
@erikgb |
Oh yes, that is my plan in the next PR. |
applyconfiguration-gen: $(APPLYCONFIGURATION_GEN) ## Download applyconfiguration-gen locally if necessary | ||
$(APPLYCONFIGURATION_GEN): | ||
# see https://github.com/kubernetes/code-generator/tree/master/cmd/applyconfiguration-gen | ||
GOBIN=$(shell pwd)/bin go install k8s.io/code-generator/cmd/[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.
We are using aqua
to manage packages for accurate
to automate package updates using renovate
.
We would like to manage applyconfiguration-gen
with aqua
as well.
But that is a bit complicated. I will create a PR for that later.
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.
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
This PR adds generation of applyconfigurations to facilitate type-safe SSA for custom resources. I have made the generated types internal for now, and only for the newer version of our API. The upstream generator is built for Kubernetes, requiring minor tweaks to the project layout.
I plan to migrate the SubNamespace controller to SSA when introducing the new API version (
v2alpha1
).Please take a look and tell me what you think! I'll be happy to reduce the number of changes in this PR.
CC @zoetrope @ymmt2005