Skip to content

Improve kubernetes version check #266

@ludusrusso

Description

@ludusrusso

If I try to create or update a TPC with a non existing minor version of kubernetes, the CRD API call succede but the tcp remain in an provisioning state.

How to reproduce:

apiVersion: kamaji.clastix.io/v1alpha1
kind: TenantControlPlane
metadata:
  name: non-existing-version
  namespace: default
spec:
  controlPlane:
    deployment:
      replicas: 1
    service:
      serviceType: ClusterIP
  kubernetes:
    version: "v1.25.90" # <- non existing version
    kubelet:
      cgroupfs: cgroupfs
    admissionControllers:
      - ResourceQuota
      - LimitRanger
  networkProfile:
    port: 6443
  addons:
    coreDNS: {}
    kubeProxy: {}

Expected behavior

Get an error similar to the one obtained with a non existing major version

admission webhook "vtenantcontrolplane.kb.io" denied the request: unable to upgrade to a version greater than the supported one, actually 1.26.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions