@@ -62,7 +62,8 @@ const (
6262 envTelemetryEmitterExportMaxBatchSize = "CL_TELEMETRY_EMITTER_EXPORT_MAX_BATCH_SIZE"
6363 envTelemetryEmitterMaxQueueSize = "CL_TELEMETRY_EMITTER_MAX_QUEUE_SIZE"
6464
65- envChipIngressEndpoint = "CL_CHIP_INGRESS_ENDPOINT"
65+ envChipIngressEndpoint = "CL_CHIP_INGRESS_ENDPOINT"
66+ envChipIngressInsecureConnection = "CL_CHIP_INGRESS_INSECURE_CONNECTION"
6667)
6768
6869// EnvConfig is the configuration between the application and the LOOP executable. The values
@@ -116,7 +117,8 @@ type EnvConfig struct {
116117 TelemetryEmitterExportMaxBatchSize int
117118 TelemetryEmitterMaxQueueSize int
118119
119- ChipIngressEndpoint string
120+ ChipIngressEndpoint string
121+ ChipIngressInsecureConnection bool
120122}
121123
122124// AsCmdEnv returns a slice of environment variable key/value pairs for an exec.Cmd.
@@ -184,6 +186,7 @@ func (e *EnvConfig) AsCmdEnv() (env []string) {
184186 add (envTelemetryEmitterMaxQueueSize , strconv .Itoa (e .TelemetryEmitterMaxQueueSize ))
185187
186188 add (envChipIngressEndpoint , e .ChipIngressEndpoint )
189+ add (envChipIngressInsecureConnection , strconv .FormatBool (e .ChipIngressInsecureConnection ))
187190
188191 return
189192}
@@ -343,6 +346,10 @@ func (e *EnvConfig) parse() error {
343346 }
344347 // Optional
345348 e .ChipIngressEndpoint = os .Getenv (envChipIngressEndpoint )
349+ e .ChipIngressInsecureConnection , err = getBool (envChipIngressInsecureConnection )
350+ if err != nil {
351+ return fmt .Errorf ("failed to parse %s: %w" , envChipIngressInsecureConnection , err )
352+ }
346353 }
347354
348355 return nil
0 commit comments