Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kuma-cp): hash-suffix remove feature flag #8461

Merged
merged 10 commits into from
Dec 11, 2023
5 changes: 0 additions & 5 deletions docs/generated/kuma-cp.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,6 @@ experimental:
# If true then control plane computes reachable services automatically based on MeshTrafficPermission.
# Lack of MeshTrafficPermission is treated as Deny the traffic.
autoReachableServices: false # ENV: KUMA_EXPERIMENTAL_AUTO_REACHABLE_SERVICES
# KDSSyncNameWithHashSuffix if true then during KDS sync resource name is going to be suffixed with hash.
# The hash is computed based on various resource characteristics like mesh, namespace, etc. The feature prevents name
# collisions when syncing policies with the same names but different meshes from Global(Universal) to Zone(Kubernetes).
# More extensive explanation of the problem and solution can be found in the MADR https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/029-kds-sync-hash-suffix.md
KDSSyncNameWithHashSuffix: false # ENV: KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX

proxy:
gateway:
Expand Down
5 changes: 0 additions & 5 deletions docs/generated/raw/kuma-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,6 @@ experimental:
# If true then control plane computes reachable services automatically based on MeshTrafficPermission.
# Lack of MeshTrafficPermission is treated as Deny the traffic.
autoReachableServices: false # ENV: KUMA_EXPERIMENTAL_AUTO_REACHABLE_SERVICES
# KDSSyncNameWithHashSuffix if true then during KDS sync resource name is going to be suffixed with hash.
# The hash is computed based on various resource characteristics like mesh, namespace, etc. The feature prevents name
# collisions when syncing policies with the same names but different meshes from Global(Universal) to Zone(Kubernetes).
# More extensive explanation of the problem and solution can be found in the MADR https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/029-kds-sync-hash-suffix.md
KDSSyncNameWithHashSuffix: false # ENV: KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX

proxy:
gateway:
Expand Down
4 changes: 0 additions & 4 deletions pkg/config/app/kuma-cp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ var DefaultConfig = func() Config {
FullResyncInterval: config_types.Duration{Duration: 1 * time.Minute},
DelayFullResync: false,
},
KDSSyncNameWithHashSuffix: false,
},
Proxy: xds.DefaultProxyConfig(),
InterCp: intercp.DefaultInterCpConfig(),
Expand Down Expand Up @@ -407,9 +406,6 @@ type ExperimentalConfig struct {
// If true then control plane computes reachable services automatically based on MeshTrafficPermission.
// Lack of MeshTrafficPermission is treated as Deny the traffic.
AutoReachableServices bool `json:"autoReachableServices" envconfig:"KUMA_EXPERIMENTAL_AUTO_REACHABLE_SERVICES"`
// KDSSyncNameWithHashSuffix if true then during KDS sync resource name is going to be suffixed with hash.
// The hash is computed based on various resource characteristics like mesh, namespace, etc.
KDSSyncNameWithHashSuffix bool `json:"kdsSyncNameWithHashSuffix" envconfig:"KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX"`
}

type ExperimentalKDSEventBasedWatchdog struct {
Expand Down
5 changes: 0 additions & 5 deletions pkg/config/app/kuma-cp/kuma-cp.defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,6 @@ experimental:
# If true then control plane computes reachable services automatically based on MeshTrafficPermission.
# Lack of MeshTrafficPermission is treated as Deny the traffic.
autoReachableServices: false # ENV: KUMA_EXPERIMENTAL_AUTO_REACHABLE_SERVICES
# KDSSyncNameWithHashSuffix if true then during KDS sync resource name is going to be suffixed with hash.
# The hash is computed based on various resource characteristics like mesh, namespace, etc. The feature prevents name
# collisions when syncing policies with the same names but different meshes from Global(Universal) to Zone(Kubernetes).
# More extensive explanation of the problem and solution can be found in the MADR https://github.com/kumahq/kuma/blob/master/docs/madr/decisions/029-kds-sync-hash-suffix.md
KDSSyncNameWithHashSuffix: false # ENV: KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX

proxy:
gateway:
Expand Down
2 changes: 0 additions & 2 deletions pkg/config/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ experimental:
fullResyncInterval: 15s
delayFullResync: true
autoReachableServices: true
kdsSyncNameWithHashSuffix: true
proxy:
gateway:
globalDownstreamMaxConnections: 1
Expand Down Expand Up @@ -968,7 +967,6 @@ tracing:
"KUMA_EXPERIMENTAL_KDS_EVENT_BASED_WATCHDOG_FULL_RESYNC_INTERVAL": "15s",
"KUMA_EXPERIMENTAL_KDS_EVENT_BASED_WATCHDOG_DELAY_FULL_RESYNC": "true",
"KUMA_EXPERIMENTAL_AUTO_REACHABLE_SERVICES": "true",
"KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX": "true",
"KUMA_PROXY_GATEWAY_GLOBAL_DOWNSTREAM_MAX_CONNECTIONS": "1",
"KUMA_TRACING_OPENTELEMETRY_ENDPOINT": "otel-collector:4317",
"KUMA_TRACING_OPENTELEMETRY_ENABLED": "true",
Expand Down
5 changes: 1 addition & 4 deletions pkg/kds/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ func DefaultContext(
cfg.Store.Type,
cfg.Store.Kubernetes.SystemNamespace,
),
}

if cfg.Experimental.KDSSyncNameWithHashSuffix {
mappers = append(mappers, AddHashSuffix)
AddHashSuffix,
}

return &Context{
Expand Down
2 changes: 0 additions & 2 deletions pkg/kds/context/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ var _ = Describe("Context", func() {
cfg.Store.Kubernetes.SystemNamespace = caseCfg.k8sSystemNamespace
}

cfg.Experimental.KDSSyncNameWithHashSuffix = true

return cfg
}

Expand Down
2 changes: 0 additions & 2 deletions test/framework/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ func (c E2eConfig) AutoConfigure() error {
Config.Arch = runtime.GOARCH
Config.OS = runtime.GOOS

Config.KumaCpConfig.Multizone.Global.Envs["KUMA_EXPERIMENTAL_KDS_SYNC_NAME_WITH_HASH_SUFFIX"] = "true"

return nil
}

Expand Down
Loading