Skip to content

Commit

Permalink
Revert "USM: enable Istio TLS monitoring by default (DataDog#31066)" (D…
Browse files Browse the repository at this point in the history
  • Loading branch information
amenasria authored Nov 22, 2024
1 parent 16d8671 commit 579a0c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func TestFetchSystemProbeAgent(t *testing.T) {
assert.False(t, ia.data["feature_usm_postgres_enabled"].(bool))
assert.False(t, ia.data["feature_usm_redis_enabled"].(bool))
assert.False(t, ia.data["feature_usm_http2_enabled"].(bool))
assert.True(t, ia.data["feature_usm_istio_enabled"].(bool))
assert.False(t, ia.data["feature_usm_istio_enabled"].(bool))
assert.False(t, ia.data["feature_usm_go_tls_enabled"].(bool))
assert.False(t, ia.data["feature_discovery_enabled"].(bool))
assert.False(t, ia.data["feature_tcp_queue_length_enabled"].(bool))
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/setup/system_probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func InitSystemProbeConfig(cfg pkgconfigmodel.Config) {
cfg.BindEnvAndSetDefault(join(smNS, "enable_kafka_monitoring"), false)
cfg.BindEnv(join(smNS, "enable_postgres_monitoring"))
cfg.BindEnv(join(smNS, "enable_redis_monitoring"))
cfg.BindEnvAndSetDefault(join(smNS, "tls", "istio", "enabled"), true)
cfg.BindEnvAndSetDefault(join(smNS, "tls", "istio", "enabled"), false)
cfg.BindEnvAndSetDefault(join(smNS, "tls", "istio", "envoy_path"), defaultEnvoyPath)
cfg.BindEnv(join(smNS, "tls", "nodejs", "enabled"))
cfg.BindEnvAndSetDefault(join(smjtNS, "enabled"), false)
Expand Down
10 changes: 5 additions & 5 deletions pkg/network/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1269,23 +1269,23 @@ func TestIstioMonitoring(t *testing.T) {
mock.NewSystemProbe(t)
cfg := New()

assert.True(t, cfg.EnableIstioMonitoring)
assert.False(t, cfg.EnableIstioMonitoring)
})

t.Run("via yaml", func(t *testing.T) {
mockSystemProbe := mock.NewSystemProbe(t)
mockSystemProbe.SetWithoutSource("service_monitoring_config.tls.istio.enabled", false)
mockSystemProbe.SetWithoutSource("service_monitoring_config.tls.istio.enabled", true)
cfg := New()

assert.False(t, cfg.EnableIstioMonitoring)
assert.True(t, cfg.EnableIstioMonitoring)
})

t.Run("via deprecated ENV variable", func(t *testing.T) {
mock.NewSystemProbe(t)
t.Setenv("DD_SERVICE_MONITORING_CONFIG_TLS_ISTIO_ENABLED", "false")
t.Setenv("DD_SERVICE_MONITORING_CONFIG_TLS_ISTIO_ENABLED", "true")
cfg := New()

assert.False(t, cfg.EnableIstioMonitoring)
assert.True(t, cfg.EnableIstioMonitoring)
})
}

Expand Down
2 changes: 0 additions & 2 deletions pkg/network/usm/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ func TestMonitorProtocolFail(t *testing.T) {

cfg := config.New()
cfg.EnableHTTPMonitoring = true
cfg.EnableIstioMonitoring = false

monitor, err := NewMonitor(cfg, nil)
skipIfNotSupported(t, err)
require.NoError(t, err)
Expand Down

This file was deleted.

0 comments on commit 579a0c1

Please sign in to comment.