Skip to content

Contract validation utility #13254

@richardcase

Description

@richardcase

What would you like to be added (User Story)?

As a provider implementor, I want a utility that validates my resource kinds against a contract, so that i know my implementation adheres to the relevant CAPI contract.

Detailed Description

When implementing a provider, it's required that CRD contain certain fields to adhere to the contract for the specific provider type. There are docs that detail the contract fields (like this for InfraCluster) but there is no automated way to determine if the CRD actually adheres to the contract.

Its proposed that we create a utility that does the following:

  • Validates a CRD against a specific contract definition
  • Generates contract documentation for a specific contract definition

This will require that contracts are declared in some way and that this is kept up to date when the contract changes.

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions