Skip to content

Commit

Permalink
Fix wrong k8s version referenced in helm values and generator script …
Browse files Browse the repository at this point in the history
…ignoring this file. (#136)

* fixed: script update cluster-class values

Signed-off-by: Danny Eiselt <[email protected]>

* updated: k8s version in cluster-class values

Signed-off-by: Danny Eiselt <[email protected]>

---------

Signed-off-by: Danny Eiselt <[email protected]>
  • Loading branch information
DEiselt authored Jul 10, 2024
1 parent def1048 commit 96e00ed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions hack/generate_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,25 @@ def update_cluster_class(target: PosixPath, **kwargs):
Returns:
None
"""
logger.info("Updating %s", target)
content = readfile(target)
chart_file = target.joinpath("Chart.yaml")
values_file = target.joinpath("values.yaml")

logger.info("Updating %s", chart_file)
content = readfile(chart_file)
version = get_dash_version(kwargs["kubernetes"])
content["name"] = f"openstack-scs-{version}-cluster-class"

writefile(target, content)
writefile(chart_file, content)

logger.info("Updating %s", values_file)
content = readfile(values_file)

content["images"]["controlPlane"][
"name"
] = f"ubuntu-capi-image-v{kwargs["kubernetes"]}"
content["images"]["worker"]["name"] = f"ubuntu-capi-image-v{kwargs["kubernetes"]}"

writefile(values_file, content)


def update_node_images(target: PosixPath, **kwargs):
Expand Down Expand Up @@ -280,5 +293,5 @@ def update_node_images(target: PosixPath, **kwargs):
**tv,
)
update_csctl_conf(output_dir.joinpath("csctl.yaml"), **tv)
update_cluster_class(output_dir.joinpath("cluster-class", "Chart.yaml"), **tv)
update_cluster_class(output_dir.joinpath("cluster-class"), **tv)
update_node_images(output_dir.joinpath("node-images", "config.yaml"), **tv)
4 changes: 2 additions & 2 deletions providers/openstack/scs/cluster-class/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ openstack_loadbalancer_apiserver: true
# TBD, currently needed:
images:
controlPlane:
name: ubuntu-capi-image-v1.27.14
name: ubuntu-capi-image-v1.28.11
worker:
name: ubuntu-capi-image-v1.27.14
name: ubuntu-capi-image-v1.28.11
identityRef:
name: openstack
cloudName: openstack

0 comments on commit 96e00ed

Please sign in to comment.