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

Compatibility attributes and validation #353

Closed
Kshatrix opened this issue Sep 19, 2024 · 0 comments
Closed

Compatibility attributes and validation #353

Kshatrix opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
epic Large body of work, can be broken down into individual issues

Comments

@Kshatrix
Copy link
Collaborator

Kshatrix commented Sep 19, 2024

List of attributes:

  • Each CAPI provider version (e.g CAPI, CAPA, k0smotron) - exposed by ProviderTemplates, consumed by ClusterTemplates
  • K8s version - exposed by ClusterTemplates, consumed by ServiceTemplates

Where to set those attributes:

  • On the Templates side we expect those to be defined either in the Template Spec or Chart annotations (similar to the existing approach with providers)
  • For ProviderTemplates the exact versions of providers should be defined alongside those providers
  • For ProviderTemplates the expected version of CAPI has to be defined
  • For ClusterTemplates the exact version of k8s should be defined
  • For ClusterTemplates supported versions of providers should be defined with semver constraints
  • For ServiceTemplates supported versions of k8s should be defined with semver constraints

How to report those attributes:

  • Provider versions are reported in the Management object status based on versions defined in ProviderTemplates of enabled providers
  • K8s version is reported in the ManagedCluster object status based on k8s version defined in ClusterTemplate

Compatibility enforcement:

  • Semver-based
  • All described attributes are optional: no attributes -> no validation
  • If a ClusterTemplate and HMC are incompatible, ManagedCluster creation/upgrade from/to this template should be forbidden
  • If a ServiceTemplate and ManagedCluster are incompatible, adding this template to the ManagedCluster should be forbidden

Impact on HMC upgrade:
If we have existing ManagedClusters and upgrading HMC would lead to incompatibility with at least one enabled provider, HMC upgrade should be forbidden by admission-controller.

Related issues:

@Kshatrix Kshatrix added the epic Large body of work, can be broken down into individual issues label Sep 19, 2024
@zerospiel zerospiel closed this as completed by moving to Done in Project 2A Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large body of work, can be broken down into individual issues
Projects
Status: Done
Development

No branches or pull requests

2 participants