From 180477caece00cf6261b106899dd779f3ade4edb Mon Sep 17 00:00:00 2001 From: David Hadas Date: Wed, 10 May 2023 09:33:52 +0300 Subject: [PATCH 1/2] Backward compatibility for InternalEncryption --- pkg/config/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 8483707d1..47cf440cd 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -405,6 +405,10 @@ func NewConfigFromMap(data map[string]string) (*Config, error) { case "", string(TrustDisabled): // If DataplaneTrus is not set in the config-network, default is already // set to TrustDisabled. + if nc.InternalEncryption { + // Backward compatibility + nc.DataplaneTrust = TrustMinimal + } case string(TrustMinimal): nc.DataplaneTrust = TrustMinimal case string(TrustEnabled): From f1dfc7476fb27d39f7d3e2f01da5bec5195b4a25 Mon Sep 17 00:00:00 2001 From: David Hadas Date: Thu, 11 May 2023 11:54:12 +0300 Subject: [PATCH 2/2] fix test --- pkg/config/config_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index b572e7b06..389de74a6 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -285,6 +285,7 @@ func TestConfiguration(t *testing.T) { wantConfig: func() *Config { c := defaultConfig() c.InternalEncryption = true + c.DataplaneTrust = TrustMinimal return c }(), }, {