Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #508 from StrongMonkey/fix-lite-install
Browse files Browse the repository at this point in the history
Fix lite install being broken in istio mesh mode
  • Loading branch information
StrongMonkey authored Sep 24, 2019
2 parents c4e80ae + d74c420 commit 28dbc6f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 60 deletions.
85 changes: 28 additions & 57 deletions cli/cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,68 +42,39 @@ var (
IstioSidecarInjector,
}

linkerdComponents = []string{
LinkerdController,
LinkerdIdentity,
LinkerdGrafana,
LinkerdPrometheus,
LinkerdSidecarInjector,
LinkerdSpValidator,
LinkerdTap,
LinkerdWeb,
}

featureMap = map[string]string{
Autoscaler: "autoscaling",

BuildController: "build",

CertManager: "letsencrypt",
Autoscaler: constants.FeatureAutoscaling,

Gateway: "gateway",
IstioPilot: "gateway",
CertManager: constants.FeatureLetsencrypts,

IstioGrafana: "istio",
IstioCitadel: "istio",
IstioTelemetry: "istio",
IstioKiali: "istio",
IstioSidecarInjector: "istio",
IstioPrometheus: "istio",
Gateway: constants.FeatureGateway,
IstioPilot: constants.FeatureGateway,

LinkerdController: "linkerd",
LinkerdIdentity: "linkerd",
LinkerdGrafana: "linkerd",
LinkerdPrometheus: "linkerd",
LinkerdSidecarInjector: "linkerd",
LinkerdSpValidator: "linkerd",
LinkerdTap: "linkerd",
LinkerdWeb: "linkerd",
IstioSidecarInjector: constants.FeatureIstio,
IstioCitadel: constants.FeatureIstio,
IstioGrafana: constants.FeatureGrafana,
IstioTelemetry: constants.FeatureMixer,
IstioKiali: constants.FeatureKiali,
IstioPrometheus: constants.FeaturePromethues,

Registry: "build",
Webhook: "build",
BuildController: constants.FeatureBuild,
Registry: constants.FeatureBuild,
Webhook: constants.FeatureBuild,
}

Autoscaler = "autoscaler"
BuildController = "build-controller"
CertManager = "cert-manager"
IstioGrafana = "grafana"
IstioCitadel = "istio-citadel"
IstioPilot = "istio-pilot"
IstioTelemetry = "istio-telemetry"
IstioKiali = "kiali"
IstioSidecarInjector = "istio-sidecar-injector"
IstioPrometheus = "prometheus"
LinkerdController = "linkerd-controller"
LinkerdIdentity = "linkerd-identity"
LinkerdWeb = "linkerd-web"
LinkerdTap = "linkerd-tap"
LinkerdPrometheus = "linkerd-prometheus"
LinkerdGrafana = "linkerd-grafana"
LinkerdSidecarInjector = "linkerd-proxy-injector"
LinkerdSpValidator = "linkerd-sp-validator"
Gateway = "gateway"
Registry = "registry"
Webhook = "webhook"
Autoscaler = "autoscaler"
BuildController = "build-controller"
CertManager = "cert-manager"
IstioGrafana = "grafana"
IstioCitadel = "istio-citadel"
IstioPilot = "istio-pilot"
IstioTelemetry = "mixer"
IstioKiali = "kiali"
IstioSidecarInjector = "istio-sidecar-injector"
IstioPrometheus = "prometheus"
Gateway = "gateway"
Registry = "registry"
Webhook = "webhook"
)

type Install struct {
Expand All @@ -114,7 +85,7 @@ type Install struct {
HTTPProxy string `desc:"Set HTTP_PROXY environment variable for control plane"`
Yaml bool `desc:"Only print out k8s yaml manifest"`
Check bool `desc:"Only check status, don't deploy controller"`
Lite bool `desc:"Only install lite version of Rio(monitoring will be disabled, will be ignored if --disable-features is set)"`
Lite bool `desc:"Only install lite version of Rio istio install(only works if mesh-mode is istio, monitoring will be disabled, will be ignored if --disable-features is set)"`
Mode string `desc:"Install mode to expose gateway. Available options are svclb and hostport" default:"svclb"`
MeshMode string `desc:"Service mesh mode. Options: (linkerd/istio)" default:"linkerd"`
}
Expand Down Expand Up @@ -180,7 +151,7 @@ func (i *Install) Run(ctx *clicontext.CLIContext) error {

if i.Lite && len(i.DisableFeatures) == 0 {
fmt.Fprintf(out, "Setting install mode to lite, monitoring features will be disabled\n")
i.DisableFeatures = []string{"mixer", "grafana", "kiali", "prometheus"}
i.DisableFeatures = []string{IstioTelemetry, IstioGrafana, IstioKiali, IstioPrometheus}
}

if i.Mode == constants.InstallModeIngress {
Expand Down
10 changes: 10 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ const (
L5dOverrideHeader = "l5d-dst-override"
L5dRemoteIPHeader = "l5d-remote-ip"
L5dServerIDHeader = "l5d-server-id"

FeatureBuild = "build"
FeatureIstio = "istio"
FeatureGrafana = "grafana"
FeatureMixer = "mixer"
FeatureKiali = "kiali"
FeaturePromethues = "prometheus"
FeatureGateway = "gateway"
FeatureLetsencrypts = "letsencrypt"
FeatureAutoscaling = "autoscaling"
)

var (
Expand Down
Loading

0 comments on commit 28dbc6f

Please sign in to comment.