Skip to content

Commit

Permalink
Disable Envoy version check if L7 proxy is disabled
Browse files Browse the repository at this point in the history
If '--enable-l7-proxy' is set to 'false', there is no point in
performing the Envoy version check, and so it should be automatically
disabled. One of the motivations for this change is that in some
scenarios it's necessary to disable the L7 proxy to allow Cilium to
start (eg. #17467), but
specifying '--enable-l7-proxy=false' is not enough due to the version
check still being performed in this situation. This commit attempts to
improve the UX by disabling the version check if Envoy itself is
disabled.

Signed-off-by: Bruno M. Custódio <brunomcustodio@gmail.com>
  • Loading branch information
bmcustodio committed Jul 8, 2022
1 parent 4298879 commit c6523db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/option/config.go
Expand Up @@ -3213,7 +3213,6 @@ func (c *DaemonConfig) Populate() {
c.CompilerFlags = viper.GetStringSlice(CompilerFlags)
c.ConfigFile = viper.GetString(ConfigFile)
c.HTTP403Message = viper.GetString(HTTP403Message)
c.DisableEnvoyVersionCheck = viper.GetBool(DisableEnvoyVersionCheck)
c.K8sNamespace = viper.GetString(K8sNamespaceName)
c.AgentNotReadyNodeTaintKey = viper.GetString(AgentNotReadyNodeTaintKeyName)
c.MaxControllerInterval = viper.GetInt(MaxCtrlIntervalName)
Expand All @@ -3226,6 +3225,12 @@ func (c *DaemonConfig) Populate() {
c.BypassIPAvailabilityUponRestore = viper.GetBool(BypassIPAvailabilityUponRestore)
c.EnableK8sTerminatingEndpoint = viper.GetBool(EnableK8sTerminatingEndpoint)

// Disable Envoy version check if L7 proxy is disabled.
c.DisableEnvoyVersionCheck = viper.GetBool(DisableEnvoyVersionCheck)
if !c.EnableL7Proxy {
c.DisableEnvoyVersionCheck = true
}

// VTEP integration enable option
c.EnableVTEP = viper.GetBool(EnableVTEP)

Expand Down

0 comments on commit c6523db

Please sign in to comment.