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

Improve kubernetes version check #266

Open
ludusrusso opened this issue Feb 20, 2023 · 1 comment
Open

Improve kubernetes version check #266

ludusrusso opened this issue Feb 20, 2023 · 1 comment
Assignees

Comments

@ludusrusso
Copy link

ludusrusso commented Feb 20, 2023

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

@prometherion
Copy link
Member

Unfortunately, the single way to address this is to hard-code all the available versions of Kubernetes.

This would require more maintenance toil, and it could a technical debt in the future where we could specify a different image repository mirror or any different Kubernetes distribution (although not yet supported).

I summon @bsctl to have his insights about UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants