Skip to content

Commit 5cbdd74

Browse files
committed
pass flag by pointer for value to persist
1 parent 9d71a5d commit 5cbdd74

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cmd/gateway/commands.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func createControllerCommand() *cobra.Command {
448448
"traffic to AI workloads.",
449449
)
450450

451-
addEPPConnectionFlags(cmd, endpointPickerDisableTLS, endpointPickerTLSSkipVerifyFlag)
451+
addEPPConnectionFlags(cmd, &endpointPickerDisableTLS, &endpointPickerTLSSkipVerifyFlag)
452452

453453
cmd.Flags().Var(
454454
&nginxDockerSecrets,
@@ -782,22 +782,22 @@ func createEndpointPickerCommand() *cobra.Command {
782782
},
783783
}
784784

785-
addEPPConnectionFlags(cmd, endpointPickerDisableTLS, endpointPickerTLSSkipVerifyFlag)
785+
addEPPConnectionFlags(cmd, &endpointPickerDisableTLS, &endpointPickerTLSSkipVerifyFlag)
786786

787787
return cmd
788788
}
789789

790-
func addEPPConnectionFlags(cmd *cobra.Command, disableTLS, tlsSkipVerify bool) {
790+
func addEPPConnectionFlags(cmd *cobra.Command, disableTLS, tlsSkipVerify *bool) {
791791
cmd.Flags().BoolVar(
792-
&disableTLS,
792+
disableTLS,
793793
endpointPickerDisableTLSFlag,
794794
false,
795795
"Disables TLS when connecting to the EndpointPicker. "+
796796
"Set to true only for development/testing or when using a service mesh for encryption.",
797797
)
798798

799799
cmd.Flags().BoolVar(
800-
&tlsSkipVerify,
800+
tlsSkipVerify,
801801
endpointPickerTLSSkipVerifyFlag,
802802
true,
803803
"Disables server certificate verification when connecting to the EndpointPicker, if TLS is enabled. "+

0 commit comments

Comments
 (0)