Skip to content

Commit a9717b3

Browse files
Make config generation and helm reconciliation work with new k0s library (#194)
* Make config generation and helm reconciliation work with new k0s library Signed-off-by: danj-replicated <[email protected]> * disable multi node interactive test --------- Signed-off-by: danj-replicated <[email protected]>
1 parent 1787a46 commit a9717b3

File tree

11 files changed

+183
-1231
lines changed

11 files changed

+183
-1231
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ EMBEDDED_OPERATOR_CHART_VERSION = 0.4.1
1111
OPENEBS_CHART_URL = https://openebs.github.io/charts
1212
OPENEBS_CHART_NAME = openebs/openebs
1313
OPENEBS_CHART_VERSION = 3.9.0
14-
KUBECTL_VERSION = v1.28.2
14+
KUBECTL_VERSION = v1.28.4
1515
K0SCTL_VERSION = v0.16.0
16-
K0S_VERSION = v1.28.2+k0s.0
16+
K0S_VERSION = v1.28.4+k0s.0
1717
TROUBLESHOOT_VERSION = v0.77.0
1818
LD_FLAGS = -X github.com/replicatedhq/embedded-cluster/pkg/defaults.K0sVersion=$(K0S_VERSION) \
1919
-X github.com/replicatedhq/embedded-cluster/pkg/defaults.Version=$(VERSION) \

e2e/install_test.go

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -113,53 +113,53 @@ func TestSingleNodeInstallationCentos8Stream(t *testing.T) {
113113
}
114114
}
115115

116-
func TestMultiNodeInteractiveInstallation(t *testing.T) {
117-
t.Parallel()
118-
t.Log("creating cluster")
119-
tc := cluster.NewTestCluster(&cluster.Input{
120-
T: t,
121-
Nodes: 3,
122-
Image: "ubuntu/jammy",
123-
SSHPublicKey: "../output/tmp/id_rsa.pub",
124-
SSHPrivateKey: "../output/tmp/id_rsa",
125-
EmbeddedClusterPath: "../output/bin/embedded-cluster",
126-
})
127-
defer tc.Destroy()
128-
for i := range tc.Nodes {
129-
t.Logf("installing ssh on node %d", i)
130-
commands := [][]string{
131-
{"apt-get", "update", "-y"},
132-
{"apt-get", "install", "openssh-server", "-y"},
133-
}
134-
if err := RunCommandsOnNode(t, tc, i, commands); err != nil {
135-
t.Fatalf("fail to install ssh on node %d: %v", i, err)
136-
}
137-
}
138-
t.Logf("installing expect on node 0")
139-
line := []string{"apt-get", "install", "expect", "-y"}
140-
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
141-
t.Fatalf("fail to install expect on node 0: %v", err)
142-
}
143-
t.Log("running multi node interactive install from node 0")
144-
line = []string{"interactive-multi-node-install.exp"}
145-
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
146-
t.Fatalf("fail to install embedded-cluster from node 0: %v", err)
147-
}
148-
t.Log("waiting for cluster nodes to report ready")
149-
line = []string{"wait-for-ready-nodes.sh", "3"}
150-
if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
151-
t.Fatalf("nodes not reporting ready: %v", err)
152-
}
153-
t.Log("restarting embedded-cluster service in all nodes")
154-
for i := range tc.Nodes {
155-
cmd := []string{"systemctl", "restart", "embedded-cluster"}
156-
if stdout, stderr, err := RunCommandOnNode(t, tc, i, cmd); err != nil {
157-
t.Logf("stdout: %s", stdout)
158-
t.Logf("stderr: %s", stderr)
159-
t.Fatalf("fail to restart service node %d: %v", i, err)
160-
}
161-
}
162-
}
116+
// func TestMultiNodeInteractiveInstallation(t *testing.T) {
117+
// t.Parallel()
118+
// t.Log("creating cluster")
119+
// tc := cluster.NewTestCluster(&cluster.Input{
120+
// T: t,
121+
// Nodes: 3,
122+
// Image: "ubuntu/jammy",
123+
// SSHPublicKey: "../output/tmp/id_rsa.pub",
124+
// SSHPrivateKey: "../output/tmp/id_rsa",
125+
// EmbeddedClusterPath: "../output/bin/embedded-cluster",
126+
// })
127+
// defer tc.Destroy()
128+
// for i := range tc.Nodes {
129+
// t.Logf("installing ssh on node %d", i)
130+
// commands := [][]string{
131+
// {"apt-get", "update", "-y"},
132+
// {"apt-get", "install", "openssh-server", "-y"},
133+
// }
134+
// if err := RunCommandsOnNode(t, tc, i, commands); err != nil {
135+
// t.Fatalf("fail to install ssh on node %d: %v", i, err)
136+
// }
137+
// }
138+
// t.Logf("installing expect on node 0")
139+
// line := []string{"apt-get", "install", "expect", "-y"}
140+
// if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
141+
// t.Fatalf("fail to install expect on node 0: %v", err)
142+
// }
143+
// t.Log("running multi node interactive install from node 0")
144+
// line = []string{"interactive-multi-node-install.exp"}
145+
// if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
146+
// t.Fatalf("fail to install embedded-cluster from node 0: %v", err)
147+
// }
148+
// t.Log("waiting for cluster nodes to report ready")
149+
// line = []string{"wait-for-ready-nodes.sh", "3"}
150+
// if _, _, err := RunCommandOnNode(t, tc, 0, line); err != nil {
151+
// t.Fatalf("nodes not reporting ready: %v", err)
152+
// }
153+
// t.Log("restarting embedded-cluster service in all nodes")
154+
// for i := range tc.Nodes {
155+
// cmd := []string{"systemctl", "restart", "embedded-cluster"}
156+
// if stdout, stderr, err := RunCommandOnNode(t, tc, i, cmd); err != nil {
157+
// t.Logf("stdout: %s", stdout)
158+
// t.Logf("stderr: %s", stderr)
159+
// t.Fatalf("fail to restart service node %d: %v", i, err)
160+
// }
161+
// }
162+
// }
163163

164164
func TestInstallWithDisabledAddons(t *testing.T) {
165165
t.Parallel()

go.mod

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,44 @@ require (
3030
)
3131

3232
require (
33-
github.com/frankban/quicktest v1.14.4 // indirect
34-
golang.org/x/mod v0.13.0 // indirect
33+
github.com/containerd/containerd v1.7.9 // indirect
34+
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
35+
github.com/frankban/quicktest v1.14.5 // indirect
36+
github.com/fsnotify/fsnotify v1.7.0 // indirect
37+
github.com/google/pprof v0.0.0-20230323073829-e72429f035bd // indirect
38+
github.com/gorilla/mux v1.8.1 // indirect
39+
github.com/opencontainers/go-digest v1.0.0 // indirect
40+
github.com/prometheus/client_golang v1.17.0 // indirect
41+
github.com/prometheus/client_model v0.5.0 // indirect
42+
github.com/prometheus/common v0.45.0 // indirect
43+
github.com/rs/cors v1.10.1 // indirect
44+
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
45+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
46+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
47+
go.uber.org/goleak v1.3.0 // indirect
48+
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
49+
golang.org/x/mod v0.14.0 // indirect
3550
)
3651

3752
require (
3853
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
3954
github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect
40-
github.com/Masterminds/goutils v1.1.1 // indirect
41-
github.com/Masterminds/semver v1.5.0 // indirect
4255
github.com/Masterminds/semver/v3 v3.2.1 // indirect
43-
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
4456
github.com/Microsoft/go-winio v0.6.1 // indirect
4557
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
4658
github.com/alessio/shellescape v1.4.2 // indirect
4759
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
4860
github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect
4961
github.com/carlmjohnson/versioninfo v0.22.5 // indirect
50-
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
62+
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
5163
github.com/creasty/defaults v1.7.0 // indirect
5264
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5365
github.com/davidmz/go-pageant v1.0.2 // indirect
54-
github.com/denisbrodbeck/machineid v1.0.1 // indirect
5566
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
5667
github.com/evanphx/json-patch v5.7.0+incompatible
5768
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
5869
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
59-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
70+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
6071
github.com/go-logr/logr v1.3.0 // indirect
6172
github.com/go-logr/zapr v1.2.4 // indirect
6273
github.com/go-macaroon-bakery/macaroon-bakery/v3 v3.0.1 // indirect
@@ -69,12 +80,11 @@ require (
6980
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
7081
github.com/go-playground/locales v0.14.1 // indirect
7182
github.com/go-playground/universal-translator v0.18.1 // indirect
72-
github.com/go-playground/validator/v10 v10.15.5 // indirect
83+
github.com/go-playground/validator/v10 v10.16.0 // indirect
7384
github.com/gofrs/uuid v4.4.0+incompatible // indirect
7485
github.com/gogo/protobuf v1.3.2 // indirect
7586
github.com/golang/protobuf v1.5.3 // indirect
7687
github.com/google/gnostic-models v0.6.8 // indirect
77-
github.com/google/go-cmp v0.6.0 // indirect
7888
github.com/google/gofuzz v1.2.0 // indirect
7989
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
8090
github.com/gorilla/schema v1.2.0 // indirect
@@ -83,7 +93,6 @@ require (
8393
github.com/gosimple/unidecode v1.0.1 // indirect
8494
github.com/hashicorp/go-uuid v1.0.3 // indirect
8595
github.com/hashicorp/go-version v1.6.0 // indirect
86-
github.com/huandu/xstrings v1.4.0 // indirect
8796
github.com/imdario/mergo v0.3.16 // indirect
8897
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
8998
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
@@ -95,7 +104,7 @@ require (
95104
github.com/json-iterator/go v1.1.12 // indirect
96105
github.com/juju/webbrowser v1.0.0 // indirect
97106
github.com/julienschmidt/httprouter v1.3.0 // indirect
98-
github.com/k0sproject/k0s v0.13.1
107+
github.com/k0sproject/k0s v1.28.5-0.20231116142149-82f76181191c
99108
github.com/k0sproject/version v0.4.2
100109
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
101110
github.com/kevinburke/ssh_config v1.2.0 // indirect
@@ -105,8 +114,8 @@ require (
105114
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect
106115
github.com/masterzen/winrm v0.0.0-20220917170901-b07f6cb0598d // indirect
107116
github.com/mattn/go-colorable v0.1.13 // indirect
108-
github.com/mattn/go-isatty v0.0.19 // indirect
109-
github.com/mattn/go-runewidth v0.0.14 // indirect
117+
github.com/mattn/go-isatty v0.0.20 // indirect
118+
github.com/mattn/go-runewidth v0.0.15 // indirect
110119
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
111120
github.com/mitchellh/copystructure v1.2.0 // indirect
112121
github.com/mitchellh/go-homedir v1.1.0 // indirect
@@ -122,7 +131,7 @@ require (
122131
github.com/pkg/sftp v1.13.5 // indirect
123132
github.com/pkg/xattr v0.4.9 // indirect
124133
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
125-
github.com/prometheus/procfs v0.11.1 // indirect
134+
github.com/prometheus/procfs v0.12.0 // indirect
126135
github.com/rivo/uniseg v0.4.4 // indirect
127136
github.com/robfig/cron/v3 v3.0.1 // indirect
128137
github.com/rogpeppe/fastuuid v1.2.0 // indirect
@@ -132,13 +141,13 @@ require (
132141
github.com/zitadel/oidc/v2 v2.7.0 // indirect
133142
go.mongodb.org/mongo-driver v1.11.3 // indirect
134143
go.uber.org/multierr v1.11.0 // indirect
135-
go.uber.org/zap v1.25.0 // indirect
136-
golang.org/x/net v0.17.0 // indirect
137-
golang.org/x/oauth2 v0.12.0 // indirect
138-
golang.org/x/sys v0.14.0 // indirect
144+
go.uber.org/zap v1.26.0 // indirect
145+
golang.org/x/net v0.18.0 // indirect
146+
golang.org/x/oauth2 v0.14.0 // indirect
147+
golang.org/x/sys v0.14.1-0.20231108175955-e4099bfacb8c // indirect
139148
golang.org/x/text v0.14.0 // indirect
140-
golang.org/x/time v0.3.0 // indirect
141-
golang.org/x/tools v0.14.0 // indirect
149+
golang.org/x/time v0.4.0 // indirect
150+
golang.org/x/tools v0.15.0 // indirect
142151
google.golang.org/appengine v1.6.8 // indirect
143152
google.golang.org/protobuf v1.31.0 // indirect
144153
gopkg.in/errgo.v1 v1.0.1 // indirect
@@ -147,11 +156,11 @@ require (
147156
gopkg.in/macaroon.v2 v2.1.0 // indirect
148157
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
149158
gopkg.in/yaml.v3 v3.0.1
150-
k8s.io/apiextensions-apiserver v0.28.3 // indirect
159+
k8s.io/apiextensions-apiserver v0.28.4 // indirect
151160
k8s.io/client-go v0.28.4 // indirect
152-
k8s.io/klog/v2 v2.100.1 // indirect
153-
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
154-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
161+
k8s.io/klog/v2 v2.110.1 // indirect
162+
k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e // indirect
163+
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf // indirect
155164
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
156-
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
165+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
157166
)

0 commit comments

Comments
 (0)