forked from joeholley/supergloo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.go
98 lines (74 loc) · 2.34 KB
/
install.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package flagutils
import (
"fmt"
"github.com/solo-io/supergloo/pkg/install/linkerd"
"github.com/solo-io/supergloo/pkg/install/istio"
"github.com/solo-io/supergloo/cli/pkg/constants"
"github.com/solo-io/supergloo/cli/pkg/options"
"github.com/spf13/pflag"
)
func AddInstallFlags(set *pflag.FlagSet, in *options.Install) {
set.BoolVar(&in.Update,
"update",
false,
"update an existing install?")
}
func AddIstioInstallFlags(set *pflag.FlagSet, in *options.Install) {
set.StringVar(&in.InstallationNamespace.Istio,
"installation-namespace",
"istio-system",
"which namespace to install Istio into?")
set.StringVar(&in.IstioInstall.IstioVersion,
"version",
istio.IstioVersion106,
fmt.Sprintf("version of istio to install? available: %v", constants.SupportedIstioVersions))
set.BoolVar(&in.IstioInstall.EnableMtls,
"mtls",
true,
"enable mtls?")
set.BoolVar(&in.IstioInstall.EnableAutoInject,
"auto-inject",
true,
"enable auto-injection?")
set.BoolVar(&in.IstioInstall.InstallGrafana,
"grafana",
true,
"add grafana to the install?")
set.BoolVar(&in.IstioInstall.InstallPrometheus,
"prometheus",
true,
"add prometheus to the install?")
set.BoolVar(&in.IstioInstall.InstallJaeger,
"jaeger",
true,
"add jaeger to the install?")
}
func AddLinkerdInstallFlags(set *pflag.FlagSet, in *options.Install) {
set.StringVar(&in.InstallationNamespace.Linkerd,
"installation-namespace",
"linkerd",
"which namespace to install Linkerd into?")
set.StringVar(&in.LinkerdInstall.LinkerdVersion,
"version",
linkerd.Version_stable221,
fmt.Sprintf("version of linkerd to install? available: %v", constants.SupportedLinkerdVersions))
set.BoolVar(&in.LinkerdInstall.EnableMtls,
"mtls",
true,
"enable mtls?")
set.BoolVar(&in.LinkerdInstall.EnableAutoInject,
"auto-inject",
true,
"enable auto-injection?")
}
func AddGlooIngressInstallFlags(set *pflag.FlagSet, in *options.Install) {
set.StringVar(&in.InstallationNamespace.Gloo,
"installation-namespace",
"gloo-system",
"which namespace to install Gloo into?")
set.StringVar(&in.GlooIngressInstall.GlooVersion,
"version",
"latest",
fmt.Sprintf("version of gloo to install? available: %v", constants.SupportedGlooVersions))
set.VarP(&in.MeshIngress.Meshes, "target-meshes", "t", "Which meshes to target (comma seperated list) <namespace>.<name>")
}