Skip to content

Commit

Permalink
chore(kuma-dp): cleanup bootstrap version field
Browse files Browse the repository at this point in the history
Fixes #2986

Signed-off-by: Tharun <rajendrantharun@live.com>
  • Loading branch information
tharun208 committed Jan 7, 2022
1 parent 728704b commit 9075dc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion app/kuma-dp/pkg/dataplane/envoy/remote_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ func (b *remoteBootstrap) requestForBootstrap(url *net_url.URL, cfg kuma_dp.Conf
AdminPort: cfg.Dataplane.AdminPort.Lowest(),
DataplaneToken: token,
DataplaneResource: dataplaneResource,
BootstrapVersion: types.BootstrapV3, // set BootstrapVersion to be compatible with old Kuma CPs
CaCert: cfg.ControlPlane.CaCert,
Version: types.Version{
KumaDp: types.KumaDpVersion{
Expand Down
9 changes: 3 additions & 6 deletions app/kuma-dp/pkg/dataplane/envoy/remote_bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ var _ = Describe("Remote Bootstrap", func() {
"caCert": "",
"dynamicMetadata": {
"test": "value"
},
"bootstrapVersion": "3"
}
}`,
}
}()),
Expand Down Expand Up @@ -163,8 +162,7 @@ var _ = Describe("Remote Bootstrap", func() {
}
},
"caCert": "",
"dynamicMetadata": null,
"bootstrapVersion": "3"
"dynamicMetadata": null
}`,
}
}()),
Expand Down Expand Up @@ -205,8 +203,7 @@ var _ = Describe("Remote Bootstrap", func() {
}
},
"caCert": "",
"dynamicMetadata": null,
"bootstrapVersion": "3"
"dynamicMetadata": null
}`,
}
}()),
Expand Down
8 changes: 2 additions & 6 deletions pkg/xds/bootstrap/types/bootstrap_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ type BootstrapRequest struct {
// CaCert is a PEM-encoded CA cert that DP uses to verify CP
CaCert string `json:"caCert"`
DynamicMetadata map[string]string `json:"dynamicMetadata"`
// todo(lobkovilya): delete BootstrapVersion, it's needed to have backward compatibility
// between new DPPs and old Kuma CPs. Issue https://github.com/kumahq/kuma/issues/2986
// BootstrapVersion is an optional version to override the control plane's default setting
BootstrapVersion BootstrapVersion `json:"bootstrapVersion"`
DNSPort uint32 `json:"dnsPort,omitempty"`
EmptyDNSPort uint32 `json:"emptyDnsPort,omitempty"`
DNSPort uint32 `json:"dnsPort,omitempty"`
EmptyDNSPort uint32 `json:"emptyDnsPort,omitempty"`
}

type Version struct {
Expand Down

0 comments on commit 9075dc8

Please sign in to comment.