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

make it possible to run kubectl explain crd #524

Merged

Commits on Oct 14, 2020

  1. add components annotations to types

    'operator-sdk generate crds' generates descriptions from the annotations added to 'networkaddonsconfig_types.go'
    This commit adds these annotations.
    
    Signed-off-by: Ram Lavi <[email protected]>
    RamLavi committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    7334594 View commit details
    Browse the repository at this point in the history
  2. fix NetworkAddonsConfig scope to Cluster in api types

    Currently there is a inconsistency between the manifest templator
    outputed crd manifest and the type annotations in scope field.
    Altough the manifests are controlled by the manifest generator
    lets fix the annotation avoid future confusion.
    
    Signed-off-by: Ram Lavi <[email protected]>
    RamLavi committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    953258c View commit details
    Browse the repository at this point in the history
  3. add openAPIV3Schema validation parameters

    Let's add openAPIV3Schema detail for "kubectl explain crd"
    Since operator-sdk crd cannot run. this commit manually creates the openAPIV3Schema
    that should've been generated by operator-sdk crd API.
    
    Signed-off-by: Ram Lavi <[email protected]>
    RamLavi committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    204d607 View commit details
    Browse the repository at this point in the history
  4. adding test to make sure crd is explainable

    Signed-off-by: Ram Lavi <[email protected]>
    RamLavi committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    46f3acf View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. crd, Adding PreserveUnknownFields=false to crd spec to fix upgrade issue

    there is an issue where on upgrade of apiVersion from
    apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1,
    oc explain does not show the CR documentation.
    This is solved in parallel PRs (SSP PR [1], CDI PR [2])
    by adding PreserveUnknownFields=false to the CRD's spec
    
    [1] kubevirt/kubevirt-ssp-operator@7ecd297
    [2] kubevirt/containerized-data-importer#1343
    
    Signed-off-by: Ram Lavi <[email protected]>
    RamLavi committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    dcc4418 View commit details
    Browse the repository at this point in the history