Skip to content

Commit c08c88c

Browse files
committed
fix: image tag and k8s version param
1 parent 4ed4be7 commit c08c88c

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v2
2121
- id: get_version
2222
run: |
23-
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
23+
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/v!!p')
2424
echo "::set-output name=release_version::$RELEASE_VERSION"
2525
- name: Prepare all release files for the provider
2626
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In the example commands below, the HELM_VALUES variable will be populated with t
3737
```shell
3838
export CLUSTER_NAME=vcluster
3939
export CLUSTER_NAMESPACE=vcluster
40-
export KUBERNETES_VERSION=1.24
40+
export KUBERNETES_VERSION=1.24.0
4141
export HELM_VALUES=$(cat devvalues.yaml | sed -z 's/\n/\\n/g')
4242
kubectl create namespace ${CLUSTER_NAMESPACE}
4343
clusterctl generate cluster ${CLUSTER_NAME} \
@@ -95,7 +95,7 @@ In the example commands below, the HELM_VALUES variable will be populated with t
9595
```shell
9696
export CLUSTER_NAME=test
9797
export CLUSTER_NAMESPACE=test
98-
export KUBERNETES_VERSION=1.24
98+
export KUBERNETES_VERSION=1.24.0
9999
export HELM_VALUES=$(cat devvalues.yaml | sed -z 's/\n/\\n/g')
100100
kubectl create namespace ${CLUSTER_NAMESPACE}
101101
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -

config/default/manager_image_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ spec:
88
spec:
99
containers:
1010
# Change the value of image field below to your controller image URL
11-
- image: loftsh/cluster-api-provider-vcluster:main
11+
- image: docker.io/loftsh/cluster-api-provider-vcluster:main
1212
name: manager

controllers/vcluster_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ func (r *VClusterReconciler) redeployIfNeeded(ctx context.Context, vCluster *v1a
264264
if len(v) == 2 {
265265
kVersion.Major = v[0]
266266
kVersion.Minor = v[1]
267+
} else if len(v) == 3 {
268+
kVersion.Major = v[0]
269+
kVersion.Minor = v[1]
270+
r.Log.Infof("vclusters %s/%s patch version defined in .spec.kubernetesVersion field will be ignored, latest supported patch version will be used", vCluster.Namespace, vCluster.Name)
267271
} else {
268272
return fmt.Errorf("invalid value of the .spec.kubernetesVersion field: %s", *vCluster.Spec.KubernetesVersion)
269273
}

templates/cluster-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ metadata:
1515
spec:
1616
kubernetesVersion: "${KUBERNETES_VERSION:=}"
1717
helmRelease:
18-
values: "${HELM_VALUES:=""}"
18+
values: "${HELM_VALUES:=}"
1919
chart:
2020
name: ${CHART_NAME:=null}
2121
repo: ${CHART_REPO:=null}

0 commit comments

Comments
 (0)