Skip to content

Commit

Permalink
check: update tunneling detection logic
Browse files Browse the repository at this point in the history
make the feature detection logic compatible with the new flag introduced
in v1.14 in [1]

[1] cilium/cilium#24561

Signed-off-by: Gilberto Bertin <jibi@cilium.io>
  • Loading branch information
jibi authored and tklauser committed May 24, 2023
1 parent 61491cb commit 3237c9b
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions connectivity/check/features.go
Expand Up @@ -196,13 +196,24 @@ func (ct *ConnectivityTest) extractFeaturesFromConfigMap(ctx context.Context, cl
Mode: mode,
}

mode = "disabled"
if v, ok := cm.Data["tunnel"]; ok {
mode = v
}
result[FeatureTunnel] = FeatureStatus{
Enabled: mode != "disabled",
Mode: mode,
if versioncheck.MustCompile("<1.14.0")(ct.CiliumVersion) {
mode = "disabled"
if v, ok := cm.Data["tunnel"]; ok {
mode = v
}
result[FeatureTunnel] = FeatureStatus{
Enabled: mode != "disabled",
Mode: mode,
}
} else {
mode = "native"
if v, ok := cm.Data["routing-mode"]; ok {
mode = v
}
result[FeatureTunnel] = FeatureStatus{
Enabled: mode != "native",
Mode: mode,
}
}

result[FeatureIPv4] = FeatureStatus{
Expand Down

0 comments on commit 3237c9b

Please sign in to comment.