Skip to content

Conversation

@kranurag7
Copy link
Contributor

this commit adds a feature in csctl where one doesn't require templating and Chart.yaml and csctl will override the version field in Chart.yaml

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squash commits
  • include documentation
  • add unit tests

@janiskemper
Copy link
Member

@jschoone you can check this out!

@kranurag7 kranurag7 force-pushed the syself/csctl-chart-templating branch from 8cc300a to 0a80b2c Compare April 30, 2024 15:51
@jschoone jschoone self-requested a review May 3, 2024 14:15
@jschoone jschoone linked an issue May 3, 2024 that may be closed by this pull request
3 tasks
@jschoone
Copy link
Contributor

jschoone commented May 7, 2024

Hi @kranurag7,
sorry for the late response.
For me it seems it still doesn't work for the cluster-addon

What I tried:

$ git clone -b syself/csctl-chart-templating https://github.com/SovereignCloudStack/csctl
$ cd csctl
$ make build
$ ./csctl version
csctl version: v0.0.2-12-g0a80b2c
commit: 0a80b2ccfdf934f9e3c67fe1240a592e980b7e92
$ ./csctl create -m hash tests/cluster-stacks/docker/ferrol -o .release
$ basename $(ls .release/*/*cluster-addon*.tgz)
docker-ferrol-1-27-cluster-addon-v0.tgz

When I change the value back to << .ClusterAddonVersion >> I get what I expect:

$ yq -i '.version = "<< .ClusterAddonVersion >>"' tests/cluster-stacks/docker/ferrol/cluster-addon/Chart.yaml
$ ./csctl create -m hash tests/cluster-stacks/docker/ferrol -o .release
$ basename $(ls .release/*/*cluster-addon*.tgz)
docker-ferrol-1-27-cluster-addon-v0-sha.0a80b2c.tgz

@aniruddha2000
Copy link
Member

❯ ./bin/csctl create tests/cluster-stacks/docker/ferrol -m hash -o .test-releases
Creating output in .test-releases/docker-ferrol-1-27-v0-sha-a2b3cbb
.tmp/cluster-addon/Chart.yaml updating version from v0 to v0-sha.a2b3cbb
.tmp/cluster-class/Chart.yaml updating version from v0 to v0-sha.a2b3cbb
No provider specifig configuration in csctl.yaml. No need to call a plugin for provider "docker"
Created .test-releases/docker-ferrol-1-27-v0-sha-a2b3cbb

☸️  kind-cso 📁 csctl on  syself/csctl-chart-templating [!?] via  v1.21.6 
❯ ls .test-releases/docker-ferrol-1-27-v0-sha-a2b3cbb 
cluster-addon-values.yaml  docker-ferrol-1-27-cluster-addon-v0-sha.a2b3cbb.tgz  docker-ferrol-1-27-cluster-class-v0-sha.a2b3cbb.tgz  hashes.json  metadata.yaml

this looks good I guess

Copy link
Contributor

@jschoone jschoone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aniruddha2000, can confirm it works now.

this commit adds a feature in csctl where one doesn't require
templating and Chart.yaml and csctl will override the version
field in Chart.yaml

Signed-off-by: Anurag <anurag.kumar@syself.com>
@aniruddha2000 aniruddha2000 force-pushed the syself/csctl-chart-templating branch from a2b3cbb to fe2655a Compare May 8, 2024 09:18
@aniruddha2000
Copy link
Member

Squashed

@jschoone jschoone merged commit 7496484 into main May 9, 2024
@jschoone jschoone deleted the syself/csctl-chart-templating branch May 9, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template Helm chart version even without << >> notation

4 participants