Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Generate Helm chart and deploy/ CRD(s) using controller-gen #270

Merged
merged 5 commits into from
Mar 2, 2020

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Feb 5, 2020

No description provided.

@hiddeco hiddeco added enhancement New feature or request build About the build or test scaffolding labels Feb 5, 2020
@hiddeco hiddeco force-pushed the enhancement/crd-generation branch 2 times, most recently from 35546ec to 542289b Compare February 5, 2020 15:08
hack/tools/go.mod Outdated Show resolved Hide resolved
# we also need to populate vendor
hack/go_container.sh go mod tidy
hack/go_container.sh go mod vendor
export GO111MODULE="off"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this for Kubernetes > 1.16?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, and worth and investigation, but probably better to do this in a separate PR.

hiddeco added 3 commits March 1, 2020 13:51
This commit prepares the API types for CRD generation using
`controller-gen` (https://github.com/kubernetes-sigs/controller-tools).

Generating the CRDs instead of maintaining them by hand offers us a
list of improvements, and will improve the overall quality of our CRDs
and the documentation that comes with it.

Some of the improvements are:

* Future management and upgrading of the CRD(s) will be easier as
  `controller-gen` is able to generate CRDs for multiple API versions.
  It also ensures we can move to structural schemas without much fuss,
  as they have been marked stable in Kubernetes `1.17.x`. The only
  exception to this is the `.spec.values` field,  that can contain any
  structure, but this is contained by marking the `HelmValues` field
  in the spec as `+kubebuilder:pruning:PreserveUnknownFields`.
* We can manage all our published CRDs from a single definition, this
  is a huge win as this means we no longer have to make duplicate
  changes to both the `deploy/` folder _and_ the chart.
* This clears the path for auto generating our CRD documentation,
  https://github.com/ahmetb/gen-crd-api-reference-docs may be
  interesting option to create this functionality, as it supports
  Markdown rendering.
* It should make the planned 'Helm chart repository management using
  CRDs' feature easier to fabricate.
@hiddeco hiddeco force-pushed the enhancement/crd-generation branch from f9310c1 to 634b0c8 Compare March 1, 2020 12:55
@hiddeco hiddeco marked this pull request as ready for review March 2, 2020 07:22
@hiddeco hiddeco requested a review from stefanprodan March 2, 2020 07:22
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiddeco
Copy link
Member Author

hiddeco commented Mar 2, 2020

@stefanprodan going to merge this and do the renaming of the manifests and stuff in a separate PR, as due to the discussions this is going to be a bit more than just renaming the files.

@hiddeco hiddeco merged commit 8b99349 into master Mar 2, 2020
@hiddeco hiddeco deleted the enhancement/crd-generation branch March 2, 2020 08:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build About the build or test scaffolding enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants