File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 4
4
"encoding/json"
5
5
6
6
"github.com/kairos-io/kairos-sdk/bus"
7
+ "github.com/kairos-io/kairos-sdk/utils"
7
8
8
9
"github.com/mudler/edgevpn/pkg/node"
9
10
"github.com/mudler/go-pluggable"
@@ -18,12 +19,23 @@ func InteractiveInstall(e *pluggable.Event) pluggable.EventResponse { //nolint:r
18
19
AskPrompt : "Do you want to setup a full mesh-support?" ,
19
20
IfEmpty : node .GenerateNewConnectionData ().Base64 (),
20
21
},
21
- {
22
+ }
23
+
24
+ // Check which Kubernetes binary is installed
25
+ if utils .K3sBin () != "" {
26
+ prompts = append (prompts , bus.YAMLPrompt {
22
27
YAMLSection : "k3s.enabled" ,
23
28
Bool : true ,
24
29
Prompt : "Do you want to enable k3s?" ,
25
- },
30
+ })
31
+ } else if utils .K0sBin () != "" {
32
+ prompts = append (prompts , bus.YAMLPrompt {
33
+ YAMLSection : "k0s.enabled" ,
34
+ Bool : true ,
35
+ Prompt : "Do you want to enable k0s?" ,
36
+ })
26
37
}
38
+
27
39
payload , err := json .Marshal (prompts )
28
40
if err != nil {
29
41
return ErrorEvent ("Failed marshalling JSON input: %s" , err .Error ())
You can’t perform that action at this time.
0 commit comments