Skip to content

Commit

Permalink
🐛 Add correct K8s version in metadata.yaml (#141)
Browse files Browse the repository at this point in the history
We have overwritten the K8s version of the new cluster stack release by
the one in the old release. This commit makes sure that we don't
overwrite it.

Signed-off-by: janiskemper <[email protected]>
  • Loading branch information
janiskemper authored Jul 4, 2024
1 parent ff77a29 commit 783b8ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
return nil, fmt.Errorf("failed to create new github client: %w", err)
}

// update the metadata kubernetes version with the csctl.yaml config
createOption.Metadata.Versions.Kubernetes = config.Config.KubernetesVersion

latestRepoRelease, err := github.GetLatestReleaseFromRemoteRepository(ctx, mode, config, gc)
if err != nil {
return nil, fmt.Errorf("failed to get latest release form remote repository: %w", err)
Expand All @@ -159,6 +156,9 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
if err != nil {
return nil, fmt.Errorf("failed to handle stable mode: %w", err)
}

// update the metadata kubernetes version with the csctl.yaml config
createOption.Metadata.Versions.Kubernetes = config.Config.KubernetesVersion
}
case customMode:
if clusterStackVersion == "" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
values: |
metrics-server:
commonLabels:
domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}"
clusterAddonVersion: "v2"
metrics-server:
commonLabels:
domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}"
clusterAddonVersion: "v2"
4 changes: 2 additions & 2 deletions tests/cluster-stacks/docker/valencia/cluster-class/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v2
description: |
This chart installs and configures:
* Docker Ferrol Cluster Class
* Docker Valencia Cluster Class
maintainers:
- name: Syself
email: [email protected]
url: https://github.com/syself
name: docker-ferrol-1-27-cluster-class
name: docker-valencia-1-27-cluster-class
type: application
version: << .ClusterAddonVersion >>

0 comments on commit 783b8ba

Please sign in to comment.