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

fix(kuma-cp) fix hds disabled on dpserver #2268

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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