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

Remove Kubernetes version from directory structure #101

Closed
3 tasks
Tracked by #56
jschoone opened this issue Jun 3, 2024 · 0 comments · Fixed by #115
Closed
3 tasks
Tracked by #56

Remove Kubernetes version from directory structure #101

jschoone opened this issue Jun 3, 2024 · 0 comments · Fixed by #115
Assignees
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling

Comments

@jschoone
Copy link
Contributor

jschoone commented Jun 3, 2024

As an SCS Developer, I want to have a generic Cluster Stacks definition, so I can use it for various Kubernetes versions.
Since the ClusterClass has no dependency to the Kubernetes version, we should reuse this to prevent repeating ourselves.
With this approach we save a lot of work and still follow value proposition we deliver with Cluster Stacks, as the target release assets are still always the same.

  • Create a script to fill a source Cluster Stack directory with specific versions
    • Can probably be done using Helm templating
  • Let Renovate have a look on the versions file
  • The source Cluster Stack directory should still be usable using e.g. helm install or helm template

Some ClusterAddons have specific versions per Kubernetes version. For example the applications of the cloud-provider-openstack have the same major and minor version as the Kubernetes version, but the Helm chart versions differ again, those can be found out with e.g. helm search repo:

helm search repo cinder-csi -l
NAME                    	CHART VERSION	APP VERSION	DESCRIPTION
cpo/openstack-cinder-csi	2.30.0       	v1.30.0    	Cinder CSI Chart for OpenStack
cpo/openstack-cinder-csi	2.29.0       	v1.29.0    	Cinder CSI Chart for OpenStack
cpo/openstack-cinder-csi	2.28.2       	v1.28.2    	Cinder CSI Chart for OpenStack
cpo/openstack-cinder-csi	2.28.1       	v1.28.1    	Cinder CSI Chart for OpenStack
cpo/openstack-cinder-csi	2.28.0       	v1.28.0    	Cinder CSI Chart for OpenStack
cpo/openstack-cinder-csi	2.27.3       	v1.27.3    	Cinder CSI Chart for OpenStack

The versions can be managed e.g. in a yaml file like this:

We want to have a Cluster Stack directory in the same format, but without the version in it, so the path providers/openstack/scs/<version>/<helm charts> becomes providers/openstack/scs/<helm charts>.
To still make it possible to create release assets for Cluster Stacks using csctl, the script should take the directory, loop over a versions file and create multiple directories in the old structure.

A versions file could look like this:

- kubernetes: 1.27.14
  cinder-csi: 2.27.3
  occm: 2.27.6
- kubernetes: 1.28.10
  cinder-csi: 2.28.2
  occm: 2.28.4

Currently the tree for alpha/1-27 looks like this

├── 1-27
│   ├── cluster-addon
│   │   ├── Chart.lock
│   │   ├── charts
│   │   │   ├── cilium-1.15.2.tgz
│   │   │   ├── metrics-server-3.12.0.tgz
│   │   │   ├── openstack-cinder-csi-2.27.3.tgz
│   │   │   └── openstack-cloud-controller-manager-2.27.6.tgz
│   │   ├── Chart.yaml
│   │   └── values.yaml
│   ├── cluster-addon-values.yaml
│   ├── cluster-class
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   ├── cluster-class.yaml
│   │   │   ├── _helpers.tpl
│   │   │   ├── kubeadm-config-template-worker-openstack.yaml
│   │   │   ├── kubeadm-control-plane-template.yaml
│   │   │   ├── openstack-cluster-template.yaml
│   │   │   ├── openstack-machine-template-control-plane.yaml
│   │   │   └── openstack-machine-template-worker.yaml
│   │   └── values.yaml
│   ├── csctl.yaml
│   └── node-images
│       └── config.yaml

Based on this, following files and values need to be touched:

  • cluster-addon/Chart.yaml
    • name
      • kubernetes version in format <major>-<minor>
    • occm
      • occm helm chart version
    • cinder-csi
      • cinder-csi helm chart version
  • cluster-class/Chart.yaml
    • name
      • kubernetes version in format <major>-<minor>
  • csctl.yaml
    • kubernetes version in vSemVer, e.g. v1.27.14
  • node-version/config.yaml
    • for images from OSISM we need kubernetes versionm in format like v1.27 AND v1.27.14
flowchart
ClusterClass --> ClusterStack
ClusterAddon --> ClusterStack
NodeImages --> ClusterStack
KubeVersion --> Versions
CSI-Version --> Versions
OCCM-Version --> Versions
Versions --> Parser
ClusterStack --> Parser
Parser --> csctl
csctl --> Release
Loading
@jschoone jschoone added the Container Issues or pull requests relevant for Team 2: Container Infra and Tooling label Jun 3, 2024
@DEiselt DEiselt linked a pull request Jun 20, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Container Issues or pull requests relevant for Team 2: Container Infra and Tooling
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants