-
Notifications
You must be signed in to change notification settings - Fork 258
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
Multi-Version CRs support #835
Comments
Would you mind clarifying what the Kubernetes definition of "support for" means in this context? Is it simply that we are able to convert to/from them, or are there stronger definitions about their usage?
Is this related to versioning, or just an aside?
What purpose does a CA serve for CRDs? Is there also some way we can ensure we do not modify a previous version of a released CRD? That is, if we've released |
Yes, simply that we will be able to convert to/from them, by always regenerating conversion functions whenever there is a CR version bump (latest version is always the "Hub" version)
Not directly related to versioning. It's gonna simplify the way we load AWS API Specifications from
The CA will issue certificates to ensure secure communication between the
We can do that by saving an output file containing the files checksum whenever we regenerate an API version. However conversion functions will always change whenever we update/create a new API version - so maybe we can just exclude the conversion functions when computing the checksum ? |
) Part of aws-controllers-k8s/community#835 Introduces two new controller flags: - `--enable-webhook-server` a boolean flag instructing whether to spin a webhook server or not. Default is `false` - `--webhook-server-addr` a string flag used to configure the webhook serving address. Default is `0.0.0.0:443` This patch also run golint against `pkg/config/config.go` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Part of aws-controllers-k8s/community#835 Adding some logic to create copies of the `generator.yaml` within the apis versions directories. These generator.yaml files we be reused by the conversion webhook generator to understand the difference between each two different API versions. This patch Also adds a new utility function to copy files from a source to a destination path. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Part of aws-controllers-k8s/community#835 This patch updates all the helper functions to use `go-git` library instead of having to call `os/exec.Command`/`os/exec.CombinedOutput` in order to clone repository, fetch tags... These changes brings more dependencies to our `go.mod` but in exchange it simplifies the way we interact with git repositories and improves errors handling and readability. Future changes will also benefit from this patch, especially conversation webhook generator that will need to checkout multiple version tags. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
# This is the 1st commit message: add new field to pkg/generate/config.go so user can implement custom requiredFieldMissingFromReadOneInput # This is the commit message aws-controllers-k8s#2: Use `go-git` functionalities for common git operations (aws-controllers-k8s#108) Part of aws-controllers-k8s/community#835 This patch updates all the helper functions to use `go-git` library instead of having to call `os/exec.Command`/`os/exec.CombinedOutput` in order to clone repository, fetch tags... These changes brings more dependencies to our `go.mod` but in exchange it simplifies the way we interact with git repositories and improves errors handling and readability. Future changes will also benefit from this patch, especially conversation webhook generator that will need to checkout multiple version tags. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…rs-k8s#108) Part of aws-controllers-k8s/community#835 This patch updates all the helper functions to use `go-git` library instead of having to call `os/exec.Command`/`os/exec.CombinedOutput` in order to clone repository, fetch tags... These changes brings more dependencies to our `go.mod` but in exchange it simplifies the way we interact with git repositories and improves errors handling and readability. Future changes will also benefit from this patch, especially conversation webhook generator that will need to checkout multiple version tags. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
/remove-lifecycle stale |
@a-hilaly If I understand correctly, the apiVersion is specified per-group, right? Not per-CRD? In Crossplane, we go for per-CRD to comply with Kubernetes and also CRDs in the same group usually don't have the same maturity level. Do you see that case arising in ACK as well or do you consider the whole group as a unit that will be versioned together? |
Issues go stale after 90d of inactivity. |
/lifecycle frozen |
/remove-lifecycle stale |
Context
All ACK controllers start out with an Alpha API version (
v1alpha1
) that evolves from release to release, most likely due to updates inaws/aws-sdk-go
OpenAPI Schemas or because of changes in thegenerator.yaml
(ignored fields, renamed fields, field made secrets etc...)Eventually most of these APIs will need to move to a more stable API (
v1beta1
,v1beta2
...v1
...) and restricted from making breaking changes to it.However to simplify ACK users experience when dealing with controllers/CRDs upgrades we need to keep support for multiple API versions (if not all of them) and gradually deprecate old versions when needed (see kubernetes deprecation policy)
Implementation details:
Changes to ack/code-generator
ack-generate
should be able to generate API definitions for different ApiVersions (currently supported with--api-version
flag)ack-generate apis
should save a copy ofgenerator.yaml
within the ApiVersions directory (apis/v*/
)ack-generate
should save the parameters used to generate a specific ApiVersion (aws-sdk-go
,ack--generate
versions, ENV Vars, etc ...) see Proposal: code generation output metadata #809controller
flags should allow to enable webhook server and set it's host and portruntime
should contain a package to systematize webhook registration and listingack-generate controller
should generate code that registers conversionwebhooks
on controller startup (probably done inmain.go
) Setup webhooks on controller startup code-generator#111ack-generate
should start usinggogit
to load/checkoutaws-sdk-go
specific versions Usego-git
functionalities for common git operations code-generator#108ack-generate controller
should generate conversion functions by loading allaws-sdk-go
version schemas and their relatedgenerator.yaml
and computing the CRD "type diffs"scripts/build-controller.sh
to callcontroller-gen
with specific arguments when dealing with multiple versionsscripts/release-controller.sh
to include the new CRD Schemas and optionally create a CA (Certificate Authority) serviceDocumentation:
/cc @aws-controllers-k8s/code-generator-maintainer @aws-controllers-k8s/runtime-maintainer @aws-controllers-k8s/community-maintainers
The text was updated successfully, but these errors were encountered: