Skip to content

Commit 413e843

Browse files
authored
feat: allow additional controller nodes to run workloads (#411)
* ensure goldpinger is running on all nodes * fix version test * fix repositories * count goldpinger pods, not running goldpinger pods * test nightly kotsadm image * append --no-taints in join * ?
1 parent 6e3cf7a commit 413e843

File tree

7 files changed

+32
-5
lines changed

7 files changed

+32
-5
lines changed

cmd/embedded-cluster/join.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ func runK0sInstallCommand(fullcmd string) error {
325325
args = append(args, "--token-file", "/etc/k0s/join-token")
326326
if strings.Contains(fullcmd, "controller") {
327327
args = append(args, "--disable-components", "konnectivity-server", "--enable-dynamic-config")
328+
329+
if !strings.Contains(fullcmd, "--no-taints") {
330+
args = append(args, "--no-taints")
331+
}
328332
}
329333
if _, err := runCommand(args[0], args[1:]...); err != nil {
330334
return err

e2e/kots-release-install/cluster-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
repositories:
3434
- name: ingress-nginx
3535
url: https://kubernetes.github.io/ingress-nginx
36+
- name: okgolove
37+
url: https://okgolove.github.io/helm-charts/
3638
charts:
3739
- name: ingress-nginx
3840
chartname: ingress-nginx/ingress-nginx
@@ -45,3 +47,8 @@ spec:
4547
nodePorts:
4648
http: "80"
4749
https: "443"
50+
- chartname: okgolove/goldpinger
51+
name: goldpinger
52+
namespace: goldpinger
53+
version: 6.1.2
54+
order: 11

e2e/kots-release-upgrade/cluster-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ spec:
5757
namespace: goldpinger
5858
version: 6.1.2
5959
order: 11
60+
- chartname: oci://registry-1.docker.io/bitnamicharts/memcached
61+
name: memcached-vendor-chart
62+
namespace: memcached
63+
values: "abc: xyz"
64+
order: 4
65+
version: 6.6.4

e2e/scripts/check-postupgrade-state.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ main() {
5252
echo "installations"
5353
kubectl get installations
5454

55-
# ensure that goldpinger exists
56-
kubectl get ns goldpinger
55+
# ensure that memcached exists
56+
kubectl get ns memcached
5757

5858
# ensure that new app pods exist
5959
kubectl get pods -n kotsadm -l app=second

e2e/scripts/single-node-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ check_openebs_storage_class() {
109109
}
110110

111111
ensure_app_not_upgraded() {
112-
if kubectl get ns | grep -q goldpinger ; then
113-
echo "found goldpinger ns"
112+
if kubectl get ns | grep -q memcached ; then
113+
echo "found memcached ns"
114114
return 1
115115
fi
116116
if kubectl get pods -n kotsadm -l app=second | grep -q second ; then

e2e/scripts/wait-for-ready-nodes.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ main() {
1818
kubectl get nodes || true
1919
done
2020
echo "All nodes are ready"
21+
22+
echo "checking that goldpinger has run on all nodes"
23+
kubectl get pods -n goldpinger
24+
local goldpinger_running_count=
25+
goldpinger_running_count=$(kubectl get pods --no-headers -n goldpinger | wc -l)
26+
if [ "$goldpinger_running_count" -lt "$expected_nodes" ]; then
27+
echo "goldpinger is running on $goldpinger_running_count nodes, expected $expected_nodes"
28+
exit 1
29+
fi
30+
2131
exit 0
2232
}
2333

e2e/version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func TestVersion(t *testing.T) {
6969
}
7070
}
7171

72-
expectedCharts := []string{"openebs", "embedded-cluster-operator", "admin-console", "ingress-nginx"}
72+
expectedCharts := []string{"openebs", "embedded-cluster-operator", "admin-console", "ingress-nginx", "goldpinger"}
7373
if len(parsed.Configs.Charts) != len(expectedCharts) {
7474
t.Log(output)
7575
t.Fatalf("found %d charts in metadata, expected %d", len(parsed.Configs.Charts), len(expectedCharts))

0 commit comments

Comments
 (0)