Skip to content

Commit

Permalink
fix(kuma-cp) fix hds disabled on dpserver
Browse files Browse the repository at this point in the history
Hds would be globally disabled on the dpserver when bootstraping a zone-ingress

Signed-off-by: Bastien Chatelard <bastien@koyeb.com>
  • Loading branch information
bchatelard committed Jul 1, 2021
1 parent 08ffede commit 958d8f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/xds/bootstrap/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ func (b *bootstrapGenerator) Generate(ctx context.Context, request types.Bootstr
if err != nil {
return nil, "", err
}
b.hdsEnabled = false
return b.generateFor(*proxyId, request, "ingress", adminPort)
case mesh_proto.DataplaneProxyType, mesh_proto.GatewayProxyType:
proxyId := core_xds.BuildProxyId(request.Mesh, request.Name)
Expand Down Expand Up @@ -264,6 +263,11 @@ func (b *bootstrapGenerator) generateFor(proxyId core_xds.ProxyId, request types
return nil, "", err
}

proxyType := mesh_proto.ProxyType(request.ProxyType)
if request.ProxyType == "" {
proxyType = mesh_proto.DataplaneProxyType
}

accessLogSocket := envoy_common.AccessLogSocketName(request.Name, request.Mesh)
xdsHost := b.xdsHost(request)
xdsUri := net.JoinHostPort(xdsHost, strconv.FormatUint(uint64(b.config.Params.XdsPort), 10))
Expand All @@ -290,7 +294,7 @@ func (b *bootstrapGenerator) generateFor(proxyId core_xds.ProxyId, request types
KumaDpBuildDate: request.Version.KumaDp.BuildDate,
EnvoyVersion: request.Version.Envoy.Version,
EnvoyBuild: request.Version.Envoy.Build,
HdsEnabled: b.hdsEnabled,
HdsEnabled: proxyType == mesh_proto.DataplaneProxyType && b.hdsEnabled,
DynamicMetadata: request.DynamicMetadata,
DNSPort: request.DNSPort,
EmptyDNSPort: request.EmptyDNSPort,
Expand Down

0 comments on commit 958d8f7

Please sign in to comment.