Skip to content
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

⚠ Generate Embedded ObjectMeta in the CRDs, plus addressed comments #557

Commits on Apr 20, 2021

  1. Generate embedded objectmeta in CRDs

    make it so embedded ObjectMeta in the CRD get's properly generated if the
    generator option generateEmbeddedObjectMeta=true is passed, this is needed because if a
    CRD has embedded ObjectMeta in any field and preserveUnknowFields is set to false, all
    the metadata will be lost when doing conversion between versions.
    
    By default any embedded ObjectMeta is not generated in the resulting CRD, however the
    top level ObjectMeta belonging to the CRD itself is never generated as the kubernetes API
    disallows changes to the CRD metadata between conversions.
    
    The generated ObjectMeta is also only a subset of the original set of fields inside
    ObjectMeta this is due to the fact that other runtime fields are problematic if they are
    being traded with the kubernetes API, such as creationTimeStamp so this only generates
    name, namespace, labels, annotations and finalizers which from a design perspective
    should be enough.
    
    An example of why this is useful is if a CRD had a volumeClaimTemplate (for an underlying
    statefulset) which include ObjectMeta such as Labels, Annotations and/or name which are
    meant to be passed to the PVC.
    
    Also addresses the type of FieldsV1 being typed as "Any" and instead types it as "object"
    dvaldivia authored and BlaineEXE committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    adfbf77 View commit details
    Browse the repository at this point in the history
  2. link to embedded ObjectMeta discussion

    Signed-off-by: Blaine Gardner <[email protected]>
    BlaineEXE committed Apr 20, 2021
    Configuration menu
    Copy the full SHA
    1d66658 View commit details
    Browse the repository at this point in the history