istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/test/framework/components/istio/flags.go (about)

     1  //  Copyright Istio Authors
     2  //
     3  //  Licensed under the Apache License, Version 2.0 (the "License");
     4  //  you may not use this file except in compliance with the License.
     5  //  You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  //  Unless required by applicable law or agreed to in writing, software
    10  //  distributed under the License is distributed on an "AS IS" BASIS,
    11  //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  //  See the License for the specific language governing permissions and
    13  //  limitations under the License.
    14  
    15  package istio
    16  
    17  import (
    18  	"flag"
    19  )
    20  
    21  // init registers the command-line flags that we can exposed for "go test".
    22  func init() {
    23  	flag.StringVar(&settingsFromCommandline.SystemNamespace, "istio.test.kube.systemNamespace", settingsFromCommandline.SystemNamespace,
    24  		"Specifies the namespace where the istiod resides in a typical deployment. Defaults to istio-system")
    25  	flag.StringVar(&settingsFromCommandline.TelemetryNamespace, "istio.test.kube.telemetryNamespace", settingsFromCommandline.TelemetryNamespace,
    26  		"Specifies the namespace in which kiali, tracing providers, graphana, prometheus are deployed.")
    27  	flag.BoolVar(&settingsFromCommandline.DeployIstio, "istio.test.kube.deploy", settingsFromCommandline.DeployIstio,
    28  		"Deploy Istio into the target Kubernetes environment.")
    29  	flag.StringVar(&settingsFromCommandline.PrimaryClusterIOPFile, "istio.test.kube.helm.iopFile", settingsFromCommandline.PrimaryClusterIOPFile,
    30  		"IstioOperator spec file. This can be an absolute path or relative to repository root.")
    31  	flag.StringVar(&helmValues, "istio.test.kube.helm.values", helmValues,
    32  		"Manual overrides for Helm values file. Only valid when deploying Istio.")
    33  	flag.BoolVar(&settingsFromCommandline.DeployEastWestGW, "istio.test.kube.deployEastWestGW", settingsFromCommandline.DeployEastWestGW,
    34  		"Deploy Istio east west gateway into the target Kubernetes environment.")
    35  	flag.BoolVar(&settingsFromCommandline.DumpKubernetesManifests, "istio.test.istio.dumpManifests", settingsFromCommandline.DumpKubernetesManifests,
    36  		"Dump generated Istio install manifests in the artifacts directory.")
    37  	flag.BoolVar(&settingsFromCommandline.IstiodlessRemotes, "istio.test.istio.istiodlessRemotes", settingsFromCommandline.IstiodlessRemotes,
    38  		"Remote clusters run without istiod, using webhooks/ca from the primary cluster.")
    39  	flag.StringVar(&operatorOptions, "istio.test.istio.operatorOptions", operatorOptions,
    40  		`Comma separated operator configuration in addition to the default operator configuration.
    41  		e.g. components.cni.enabled=true,components.cni.namespace=kube-system`)
    42  	flag.BoolVar(&settingsFromCommandline.EnableCNI, "istio.test.istio.enableCNI", settingsFromCommandline.EnableCNI,
    43  		"Deploy Istio with CNI enabled.")
    44  	flag.StringVar(&settingsFromCommandline.IngressGatewayServiceName, "istio.test.kube.ingressGatewayServiceName",
    45  		settingsFromCommandline.IngressGatewayServiceName,
    46  		`Specifies the name of the ingressgateway service to use when running tests in a preinstalled istio installation.
    47  		Should only be set when istio.test.kube.deploy=false`)
    48  	flag.StringVar(&settingsFromCommandline.IngressGatewayServiceNamespace, "istio.test.kube.ingressGatewayServiceNamespace",
    49  		settingsFromCommandline.IngressGatewayServiceNamespace,
    50  		`Specifies the namespace of the ingressgateway service to use when running tests in a preinstalled istio installation.
    51  		Should only be set when istio.test.kube.deploy=false`)
    52  	flag.StringVar(&settingsFromCommandline.IngressGatewayIstioLabel, "istio.test.kube.ingressGatewayIstioLabel",
    53  		settingsFromCommandline.IngressGatewayIstioLabel,
    54  		`Specifies the istio label of the ingressgateway to search for when running tests in a preinstalled istio installation.
    55  		Should only be set when istio.test.kube.deploy=false`)
    56  	flag.StringVar(&settingsFromCommandline.EgressGatewayServiceName, "istio.test.kube.egressGatewayServiceName",
    57  		settingsFromCommandline.EgressGatewayServiceName,
    58  		`Specifies the name of the egressgateway service to use when running tests in a preinstalled istio installation.
    59  		Should only be set when istio.test.kube.deploy=false`)
    60  	flag.StringVar(&settingsFromCommandline.EgressGatewayServiceNamespace, "istio.test.kube.egressGatewayServiceNamespace",
    61  		settingsFromCommandline.EgressGatewayServiceNamespace,
    62  		`Specifies the namespace of the egressgateway service to use when running tests in a preinstalled istio installation.
    63  		Should only be set when istio.test.kube.deploy=false`)
    64  	flag.StringVar(&settingsFromCommandline.EgressGatewayIstioLabel, "istio.test.kube.egressGatewayIstioLabel",
    65  		settingsFromCommandline.EgressGatewayIstioLabel,
    66  		`Specifies the istio label of the egressgateway to search for when running tests in a preinstalled istio installation.
    67  		Should only be set when istio.test.kube.deploy=false`)
    68  	flag.StringVar(&settingsFromCommandline.SharedMeshConfigName, "istio.test.kube.sharedMeshConfigName",
    69  		settingsFromCommandline.SharedMeshConfigName,
    70  		`Specifies the name of the SHARED_MESH_CONFIG defined and created by the user upon installing Istio.
    71  		Should only be set when istio.test.kube.userSharedMeshConfig=true and istio.test.kube.deploy=false.`)
    72  }