Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Create internal API types, and use them #215

Merged
merged 8 commits into from
Jul 18, 2019

Conversation

luxas
Copy link
Contributor

@luxas luxas commented Jul 18, 2019

This PR:

  • copies the existing external v1alpha1 API types into pkg/apis/ignite, where the external types should be
  • creates conversions between v1alpha1 and internal
  • removes some small, old hacks we had to workaround the absence of internal types
  • makes the application use internal types everywhere
  • makes the client and storage always return internal types
  • adds Serializer.DefaultInternal to allow defaulting internal types as before

This allows us to roll out more supported external types, e.g. v1alpha2, without disrupting v1alpha1 support. Also, it will allow us to streamline validation, helper method registration, and defaulting.

For more information about how this works, see my talk from KubeCon Shanghai, along with the minimal sample-config implementation:

Fixes: #183

@luxas luxas added this to the v0.5.0 milestone Jul 18, 2019
@luxas luxas added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/enhancement Categorizes issue or PR as related to improving an existing feature. labels Jul 18, 2019
Copy link
Contributor

@twelho twelho left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Should we also consider creating an internal type for meta?

@luxas
Copy link
Contributor Author

luxas commented Jul 18, 2019

We'll see, not at the moment. We'll for sure make multiple external types as the meta package matures.

@luxas luxas merged commit 666dce6 into weaveworks:master Jul 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an internal API group, use that internally
2 participants