Skip to content

Commit 316a610

Browse files
committed
chore: bump to vcluster v0.20.0-beta.15 and remove eks
1 parent 2c42bcf commit 316a610

File tree

38 files changed

+464
-338
lines changed

38 files changed

+464
-338
lines changed

.github/workflows/e2e.yaml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
run: |
114114
export CLUSTER_NAME=vcluster-k3s
115115
export CLUSTER_NAMESPACE=vcluster-k3s
116-
export CHART_VERSION=0.20.0-beta.12
116+
export CHART_VERSION=0.20.0-beta.15
117117
export HELM_VALUES=$(cat ./test/e2e/k3s-values.yaml | sed -z 's/\n/\\n/g')
118118
kubectl create namespace ${CLUSTER_NAMESPACE}
119119
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
@@ -129,7 +129,7 @@ jobs:
129129
run: |
130130
export CLUSTER_NAME=vcluster-k0s
131131
export CLUSTER_NAMESPACE=vcluster-k0s
132-
export CHART_VERSION=0.20.0-beta.12
132+
export CHART_VERSION=0.20.0-beta.15
133133
export CHART_NAME=vcluster
134134
export HELM_VALUES=$(cat ./test/e2e/k0s-values.yaml | sed -z 's/\n/\\n/g')
135135
kubectl create namespace ${CLUSTER_NAMESPACE}
@@ -146,7 +146,7 @@ jobs:
146146
run: |
147147
export CLUSTER_NAME=vcluster-k8s
148148
export CLUSTER_NAMESPACE=vcluster-k8s
149-
export CHART_VERSION=0.20.0-beta.12
149+
export CHART_VERSION=0.20.0-beta.15
150150
export CHART_NAME=vcluster
151151
export HELM_VALUES=$(cat ./test/e2e/k8s-values.yaml | sed -z 's/\n/\\n/g')
152152
kubectl create namespace ${CLUSTER_NAMESPACE}
@@ -158,20 +158,3 @@ jobs:
158158
159159
- name: Run E2E Tests K8S
160160
run: CLUSTER_NAME=vcluster-k8s NAMESPACE=vcluster-k8s LOCAL_PORT=14552 go test -mod=vendor ./test/e2e -v
161-
162-
- name: Create Vcluster Custom Resource EKS
163-
run: |
164-
export CLUSTER_NAME=vcluster-eks
165-
export CLUSTER_NAMESPACE=vcluster-eks
166-
export CHART_VERSION=0.20.0-beta.12
167-
export CHART_NAME=vcluster
168-
export HELM_VALUES=$(cat ./test/e2e/eks-values.yaml | sed -z 's/\n/\\n/g')
169-
kubectl create namespace ${CLUSTER_NAMESPACE}
170-
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
171-
172-
- name: Validate Resource Ready EKS
173-
run: |
174-
kubectl wait --for=condition=ready vcluster -n vcluster-eks vcluster-eks --timeout=100s
175-
176-
- name: Run E2E Tests EKS
177-
run: CLUSTER_NAME=vcluster-eks NAMESPACE=vcluster-eks LOCAL_PORT=14553 go test -mod=vendor ./test/e2e -v

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ require (
307307
github.com/google/uuid v1.6.0 // indirect
308308
github.com/imdario/mergo v0.3.16 // indirect
309309
github.com/json-iterator/go v1.1.12 // indirect
310-
github.com/loft-sh/vcluster v0.20.0-beta.12
310+
github.com/loft-sh/vcluster v0.20.0-beta.15
311311
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
312312
github.com/modern-go/reflect2 v1.0.2 // indirect
313313
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac h1:Gz/7Lb7WgdgIv+KJz87
504504
github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac/go.mod h1:YImeRjXH34Yf5E79T7UHBQpDZl9fIaaFRgyZ/bkY+UQ=
505505
github.com/loft-sh/utils v0.0.29 h1:P/MObccXToAZy2QoJSQDJ+OJx1qHitpFHEVj3QBSNJs=
506506
github.com/loft-sh/utils v0.0.29/go.mod h1:9hlX9cGpWHg3mNi/oBlv3X4ePGDMK66k8MbOZGFMDTI=
507-
github.com/loft-sh/vcluster v0.20.0-beta.12 h1:xqHLLYbcWEiKyA998CEKaI0AyQ0rf4isPk7DvUri94k=
508-
github.com/loft-sh/vcluster v0.20.0-beta.12/go.mod h1:Xm+Y8EADJCix31Lvb9kIPO3CIoRRV6RJrL48/skB5qw=
507+
github.com/loft-sh/vcluster v0.20.0-beta.15 h1:/E3CBS0a3sGeakKtYxwJCo9aSsQZ5oFWiGbZESytF/A=
508+
github.com/loft-sh/vcluster v0.20.0-beta.15/go.mod h1:Xm+Y8EADJCix31Lvb9kIPO3CIoRRV6RJrL48/skB5qw=
509509
github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM=
510510
github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM=
511511
github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk=

templates/cluster-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
chart:
2323
name: ${CHART_NAME:=vcluster}
2424
repo: ${CHART_REPO:=https://charts.loft.sh}
25-
version: ${CHART_VERSION:=0.20.0-beta.12}
25+
version: ${CHART_VERSION:=0.20.0-beta.15}
2626
controlPlaneEndpoint:
2727
host: ${VCLUSTER_HOST:=""}
2828
port: ${VCLUSTER_PORT:=0}

test/controllerstest/controllers_suite_test.go

Lines changed: 19 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,7 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
7575
}
7676
})
7777

78-
ginkgo.It("reconcile successfully on k3s", func() {
79-
values := map[string]any{
80-
"vcluster": map[string]string{
81-
"image": "rancher/k3s:v1.28.2-k3s1",
82-
},
83-
}
84-
yamlBytes, yamlErr := yaml.Marshal(&values)
85-
gomega.Expect(yamlErr).NotTo(gomega.HaveOccurred())
78+
ginkgo.It("reconcile successfully on k8s", func() {
8679
vCluster := &v1alpha1.VCluster{
8780
ObjectMeta: metav1.ObjectMeta{
8881
Name: "test-vcluster",
@@ -91,9 +84,8 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
9184
Spec: v1alpha1.VClusterSpec{
9285
HelmRelease: &v1alpha1.VirtualClusterHelmRelease{
9386
Chart: v1alpha1.VirtualClusterHelmChart{
94-
Version: "0.19",
87+
Version: "0.20.0-beta.15",
9588
},
96-
Values: string(yamlBytes),
9789
},
9890
},
9991
}
@@ -128,75 +120,16 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
128120
gomega.Expect(result.RequeueAfter).Should(gomega.Equal(time.Minute))
129121
})
130122

131-
ginkgo.It("reconcile successfully on k0s", func() {
123+
ginkgo.It("reconcile successfully on k3s", func() {
132124
values := map[string]any{
133-
"vcluster": map[string]string{
134-
"image": "rancher/k3s:v1.28.2-k3s1",
135-
},
136-
}
137-
yamlBytes, yamlErr := yaml.Marshal(&values)
138-
gomega.Expect(yamlErr).NotTo(gomega.HaveOccurred())
139-
vCluster := &v1alpha1.VCluster{
140-
ObjectMeta: metav1.ObjectMeta{
141-
Name: "test-vcluster",
142-
Namespace: "default",
143-
},
144-
Spec: v1alpha1.VClusterSpec{
145-
HelmRelease: &v1alpha1.VirtualClusterHelmRelease{
146-
Chart: v1alpha1.VirtualClusterHelmChart{
147-
Name: "vcluster-k0s",
148-
Version: "0.19",
125+
"controlPlane": map[string]any{
126+
"distro": map[string]any{
127+
"k3s": map[string]bool{
128+
"enabled": true,
149129
},
150-
Values: string(yamlBytes),
151130
},
152131
},
153132
}
154-
hemlClient.On("Upgrade").Return(nil)
155-
f := fakeclientset.NewSimpleClientset()
156-
157-
_, err := f.CoreV1().ServiceAccounts("default").Create(context.Background(), &corev1.ServiceAccount{
158-
ObjectMeta: metav1.ObjectMeta{
159-
Name: "default",
160-
Namespace: "default",
161-
},
162-
}, metav1.CreateOptions{})
163-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
164-
165-
reconciler = &controllers.VClusterReconciler{
166-
Client: fakeclient.NewClientBuilder().WithScheme(scheme).WithObjects(vCluster, secret).WithStatusSubresource(vCluster).Build(),
167-
HelmClient: hemlClient,
168-
Scheme: scheme,
169-
ClientConfigGetter: &fakeConfigGetter{
170-
fake: f,
171-
},
172-
HTTPClientGetter: &fakeHTTPClientGetter{},
173-
}
174-
req := ctrl.Request{
175-
NamespacedName: types.NamespacedName{
176-
Name: vCluster.Name,
177-
Namespace: vCluster.Namespace,
178-
},
179-
}
180-
result, err := reconciler.Reconcile(ctx, req)
181-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
182-
gomega.Expect(result.RequeueAfter).Should(gomega.Equal(time.Minute))
183-
})
184-
185-
ginkgo.It("reconcile successfully on k8s", func() {
186-
values := map[string]any{
187-
"api": map[string]string{
188-
"image": "registry.k8s.io/kube-apiserver:v1.28.2",
189-
},
190-
"scheduler": map[string]string{
191-
"image": "registry.k8s.io/kube-scheduler:v1.28.2",
192-
},
193-
"controller": map[string]string{
194-
"image": "registry.k8s.io/kube-controller-manager:v1.28.2",
195-
},
196-
"etcd": map[string]string{
197-
"image": "registry.k8s.io/etcd:3.5.9-0",
198-
},
199-
}
200133
yamlBytes, yamlErr := yaml.Marshal(&values)
201134
gomega.Expect(yamlErr).NotTo(gomega.HaveOccurred())
202135
vCluster := &v1alpha1.VCluster{
@@ -207,8 +140,8 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
207140
Spec: v1alpha1.VClusterSpec{
208141
HelmRelease: &v1alpha1.VirtualClusterHelmRelease{
209142
Chart: v1alpha1.VirtualClusterHelmChart{
210-
Name: "vcluster-k8s",
211-
Version: "0.19",
143+
Name: "vcluster",
144+
Version: "0.20.0-beta.15",
212145
},
213146
Values: string(yamlBytes),
214147
},
@@ -245,19 +178,14 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
245178
gomega.Expect(result.RequeueAfter).Should(gomega.Equal(time.Minute))
246179
})
247180

248-
ginkgo.It("reconcile successfully on eks", func() {
181+
ginkgo.It("reconcile successfully on k0s", func() {
249182
values := map[string]any{
250-
"api": map[string]string{
251-
"image": "test",
252-
},
253-
"coredns": map[string]string{
254-
"image": "test",
255-
},
256-
"controller": map[string]string{
257-
"image": "test",
258-
},
259-
"etcd": map[string]string{
260-
"image": "test",
183+
"controlPlane": map[string]any{
184+
"distro": map[string]any{
185+
"k0s": map[string]bool{
186+
"enabled": true,
187+
},
188+
},
261189
},
262190
}
263191
yamlBytes, yamlErr := yaml.Marshal(&values)
@@ -270,8 +198,8 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
270198
Spec: v1alpha1.VClusterSpec{
271199
HelmRelease: &v1alpha1.VirtualClusterHelmRelease{
272200
Chart: v1alpha1.VirtualClusterHelmChart{
273-
Name: "vcluster-eks",
274-
Version: "0.19",
201+
Name: "vcluster",
202+
Version: "0.20.0-beta.15",
275203
},
276204
Values: string(yamlBytes),
277205
},
@@ -307,6 +235,7 @@ var _ = ginkgo.Describe("Vcluster Controller test", func() {
307235
gomega.Expect(err).NotTo(gomega.HaveOccurred())
308236
gomega.Expect(result.RequeueAfter).Should(gomega.Equal(time.Minute))
309237
})
238+
310239
})
311240

312241
})

test/e2e/eks-values.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

vendor/github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/connect.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/convert/config.go

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/list.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/loft-sh/vcluster/cmd/vclusterctl/cmd/platform/add/cluster.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)