Open chess-knight opened 7 months ago
thanks! I will look into this!
Hi @janiskemper, I think faced the same issue.
I build Cluster Stacks for Kubernetes 1.{27..30} in hash mode and got those:
ls -1 .release
openstack-scs-1-27-v0-sha-uaneeqt
openstack-scs-1-28-v0-sha-dowig83
openstack-scs-1-29-v0-sha-n42lfdt
openstack-scs-1-30-v0-sha-kuuaqoz
So the yaml looks as follows:
---
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
name: openstack-scs-1-27
spec:
provider: openstack
name: scs
kubernetesVersion: "1.27"
channel: custom
autoSubscribe: false
providerRef:
apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1
kind: OpenStackClusterStackReleaseTemplate
name: cspotemplate
versions:
- v0-sha.uaneeqt
---
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
name: openstack-scs-1-28
spec:
provider: openstack
name: scs
kubernetesVersion: "1.28"
channel: custom
autoSubscribe: false
providerRef:
apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1
kind: OpenStackClusterStackReleaseTemplate
name: cspotemplate
versions:
- v0-sha.dowig83
---
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
name: openstack-scs-1-29
spec:
provider: openstack
name: scs
kubernetesVersion: "1.29"
channel: custom
autoSubscribe: false
providerRef:
apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1
kind: OpenStackClusterStackReleaseTemplate
name: cspotemplate
versions:
- v0-sha.n42lfdt
---
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
name: openstack-scs-1-30
spec:
provider: openstack
name: scs
kubernetesVersion: "1.30"
channel: custom
autoSubscribe: false
providerRef:
apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1
kind: OpenStackClusterStackReleaseTemplate
name: cspotemplate
versions:
- v0-sha.kuuaqoz
Everything seems to be deployed correctly. ClusterStacksReleases:
kubectl get clusterstackreleases
NAME K8S VERSION READY AGE REASON MESSAGE
openstack-scs-1-27-v0-sha-uaneeqt v1.27.15 true 15h
openstack-scs-1-28-v0-sha-dowig83 v1.28.11 true 15h
openstack-scs-1-29-v0-sha-n42lfdt v1.29.6 true 15h
openstack-scs-1-30-v0-sha-kuuaqoz v1.30.2 true 15h
kubectl get openstacknodeimagereleases
NAME READY AGE REASON MESSAGE
openstack-scs-1-27-ubuntu-capi-image-v1.27.15-v0-sha-uaneeqt true 15h
openstack-scs-1-28-ubuntu-capi-image-v1.28.11-v0-sha-dowig83 true 15h
openstack-scs-1-29-ubuntu-capi-image-v1.29.6-v0-sha-n42lfdt true 15h
openstack-scs-1-30-ubuntu-capi-image-v1.30.2-v0-sha-kuuaqoz true 15h
And ClusterClass:
kubectl get cc
NAME AGE
openstack-scs-1-27-v0-sha.uaneeqt 15h
openstack-scs-1-28-v0-sha.dowig83 15h
openstack-scs-1-29-v0-sha.n42lfdt 15h
openstack-scs-1-30-v0-sha.kuuaqoz 15h
But the ClusterStacks look really weird:
kubectl get clusterstack
NAME PROVIDER CLUSTERSTACK K8S CHANNEL AUTOSUBSCRIBE USABLE LATEST AGE REASON MESSAGE
openstack-scs-1-27 openstack scs 1.27 custom false v0-sha-uaneeqt openstack-scs-1-27-v0-sha-uaneeqt | v1.27.15 16h
openstack-scs-1-28 openstack scs 1.28 custom false v0-sha-uaneeqt openstack-scs-1-27-v0-sha-uaneeqt | v1.27.15 16h
openstack-scs-1-29 openstack scs 1.29 custom false v0-sha-uaneeqt openstack-scs-1-27-v0-sha-uaneeqt | v1.27.15 16h
openstack-scs-1-30 openstack scs 1.30 custom false v0-sha-uaneeqt openstack-scs-1-27-v0-sha-uaneeqt | v1.27.15 16h
Showing one in detail:
kubectl get clusterstack openstack-scs-1-29 -oyaml
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"clusterstack.x-k8s.io/v1alpha1","kind":"ClusterStack","metadata":{"annotations":{},"name":"openstack-scs-1-29","namespace":"cluster"},"spec":{"autoSubscribe":false,"channel":"custom","kubernetesVersion":"1.29","name":"scs","provider":"openstack","providerRef":{"apiVersion":"infrastructure.clusterstack.x-k8s.io/v1alpha1","kind":"OpenStackClusterStackReleaseTemplate","name":"cspotemplate"},"versions":["v0-sha.n42lfdt"]}}
creationTimestamp: "2024-06-24T14:57:28Z"
generation: 1
name: openstack-scs-1-29
namespace: cluster
resourceVersion: "105475"
uid: b6e85127-4155-4202-987b-ef46b01ba189
spec:
autoSubscribe: false
channel: custom
kubernetesVersion: "1.29"
name: scs
noProvider: false
provider: openstack
providerRef:
apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1
kind: OpenStackClusterStackReleaseTemplate
name: cspotemplate
versions:
- v0-sha.n42lfdt
status:
conditions:
- lastTransitionTime: "2024-06-24T14:57:49Z"
status: "True"
type: Ready
- lastTransitionTime: "2024-06-24T15:49:39Z"
status: "True"
type: ClusterStackReleaseAvailable
- lastTransitionTime: "2024-06-24T14:57:49Z"
status: "True"
type: ClusterStackReleasesSynced
- lastTransitionTime: "2024-06-24T14:57:49Z"
status: "True"
type: ProviderClusterStackReleasesSynced
latestRelease: openstack-scs-1-27-v0-sha-uaneeqt | v1.27.15
summary:
- name: v0-sha-uaneeqt
phase: done
ready: true
- name: v0-sha-n42lfdt
phase: ""
ready: false
usableVersions: v0-sha-uaneeqt
You are not allowed to have multiple ClusterStack objects with the same properties in one namespace. Actually we want to introduce a webhook that forbids this.
There is no handling for this. For example the clusterstackreleases get owned by the clusterStack that fits their properties.
/kind bug
What steps did you take and what happened:
Create clusterstack with multiple versions, e.g.:
Wait for clusterstackreleases to be Ready:
Get clusterstack:
I see the wrong USABLE and LATEST columns. It is also changing over time.
What did you expect to happen:
USABLE: v1, v2, v3, v4 LATEST: openstack-ferrol-1-27-v4 | v1.27.8
Environment: