Skip to content

Tasks for v1beta2 API #2671

@adilGhaffarDev

Description

@adilGhaffarDev
  • Change unhealthy annotation. It is currently capi.metal3.io/unhealthy (see docs). I don't think capi makes sense here as the annotation is understood by capm3.
  • Remove Metal3DataTemplate ClusterName. This may be too large task to include now but to me this is a strange thing in the API. E.g. Metal3MachineTemplates do not have ClusterName and can be shared between multiple clusters. I suspect it is related to the index based naming though, which make this a huge thing to change.
  • Change name of flag enableBMHNameBasedPreallocation -> enable-bmh-name-based-preallocation. All other flags use this naming convention (kebab-case). See code.
  • Remove NoCloudProvider from v1beta2 and remove related code. Related issue
  • TemplateReference field in Metal3DataTemplate doesn't seem to have any impact on any functionality. This field should be removed in v1beta2. See ⚠️ Remove metal3datatemplate template reference #2265 for more information.
  • Implement CAPI v1beta2 conditions. Guide
  • Implement CAPI v1beta2 contract. Guide
  • Compliance with K8s API guidelines:
    • Adoption of the KAL linter
    • All Duration fields should be represented as *int32 fields with units being part of the field name. e.g, timeout: 3s to timeoutSeconds: 3
    • Remove unnecessary pointers in the API.
    • Change all optional bool to *bool, to preserve user intent.
    • Ensure required and optional is explicitly set in the API, and that both serialization and validation works accordingly:
      • Stop rendering empty structs (review of all occurrences of omitempty and introduction of omitzero)
      • Do not allow "" when it is not semantically different from value not set (either you have to provide a non-empty string value or not set the field at all).
      • Do not allow 0 when it is not semantically different from value not set (either you have to provide a non-0 int value or not set the field at all).
      • Do not allow {} when it is not semantically different from value not set (either you have to set at least one property in the object or not set the field at all).
      • Do not allow [] when it is not semantically different from value not set (either you have to set at least one item in the list or not set the field at all).
      • Ensure validation for all enum types.
  • Change Metal3Datas -> Metal3Data. See this.
    This will in practice mean that existing clusters migrate from one CRD to another (not just a version difference). I'm not sure how hard that is to implement but it is definitely worth considering IMO.
  • We have PHASE in Metal3Machine, but we set it anywhere, either use it or remove it.
  • FailureMessage and FailureReason are removed from capi v1beta2, we should add conditions wherever we are setting them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue is ready to be actively worked on.

    Projects

    Status

    CAPM3 WIP

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions