-
Notifications
You must be signed in to change notification settings - Fork 327
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
chore(*) delete CLI flag '--bootstrap-version' #2965
Conversation
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Codecov Report
@@ Coverage Diff @@
## master #2965 +/- ##
==========================================
+ Coverage 52.37% 52.39% +0.01%
==========================================
Files 912 912
Lines 52522 52493 -29
==========================================
- Hits 27510 27502 -8
+ Misses 22817 22798 -19
+ Partials 2195 2193 -2
Continue to review full report at Codecov.
|
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
app/kuma-dp/cmd/run.go
Outdated
@@ -226,7 +226,8 @@ func newRunCmd(opts kuma_cmd.RunCmdOpts, rootCtx *RootContext) *cobra.Command { | |||
cmd.PersistentFlags().StringVar(&cfg.ControlPlane.CaCertFile, "ca-cert-file", cfg.ControlPlane.CaCertFile, "Path to CA cert by which connection to the Control Plane will be verified if HTTPS is used") | |||
cmd.PersistentFlags().StringVar(&cfg.DataplaneRuntime.BinaryPath, "binary-path", cfg.DataplaneRuntime.BinaryPath, "Binary path of Envoy executable") | |||
cmd.PersistentFlags().Uint32Var(&cfg.DataplaneRuntime.Concurrency, "concurrency", cfg.DataplaneRuntime.Concurrency, "Number of Envoy worker threads") | |||
cmd.PersistentFlags().StringVar(&cfg.Dataplane.BootstrapVersion, "bootstrap-version", cfg.Dataplane.BootstrapVersion, "Bootstrap version (and API version) of xDS config. If empty, default version defined in Kuma CP will be used. (ex. '2', '3')") | |||
cmd.PersistentFlags().StringVar(&bootstrapVersion, "bootstrap-version", "", "Bootstrap version (and API version) of xDS config. If empty, default version defined in Kuma CP will be used. (ex. '2', '3')") | |||
_ = cmd.PersistentFlags().MarkDeprecated("bootstrap-version", "Envoy API v3 is used by default") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message makes it seem like it still does something IMO since a deprecated command could just be discouraged. I think changing "by default" to "and can not be changed. This flag is not respected." or something similar would help. Might even be worth throwing an error if it's used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend against throwing an error, since that would immediately break existing deployments that use the flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we can't throw an error here. Updated the message, now it looks like:
Flag --bootstrap-version has been deprecated, Envoy API v3 is used and can not be changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah indeed, although if somebody uses the flag and sets something different from the default, just ignoring it may not be much better since presumably something will break for them that's even harder to diagnose. In the end a proper deprecate -> remove process would be best but I think there wasn't really time here.
pkg/config/xds/bootstrap/config.go
Outdated
return nil | ||
} | ||
|
||
func DefaultBootstrapServerConfig() *BootstrapServerConfig { | ||
return &BootstrapServerConfig{ | ||
APIVersion: envoy_common.APIV3, | ||
Params: DefaultBootstrapParamsConfig(), | ||
//APIVersion: envoy_common.APIV3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better just to leave this out, otherwise it might get out of sync one day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that was unintentionally, thanks!
DNSPort uint32 `json:"dnsPort,omitempty"` | ||
EmptyDNSPort uint32 `json:"emptyDnsPort,omitempty"` | ||
DNSPort uint32 `json:"dnsPort,omitempty"` | ||
EmptyDNSPort uint32 `json:"emptyDnsPort,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this is a compatible change. If the DP is upgraded before the CP is, then the CP would not receive the BootstrapVersion
field when it unmarshals the request JSON. That would be OK, but the field would be empty, so in the bootstrap generator the check in (*bootstrapGenerator)configForParameters()
would fail and the DP would not be able to bootstrap.
To get across the upgrade, it would be safer for the DP to always send this field with a fixed value, then we can ignore it on the CP side and remove the DP code in a later release.
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. We should file an issue to follow up and remove remnants of the bootstrap in a future release (and we can ref the issue number from the TODO comments).
@lobkovilya Did you manually confirm that this works with a Envoy 1.18 DP?
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Summary
Based on envoyproxy/envoy#16456, since v4 is very far away we decided to delete a bootstrap version field from Kuma.
Full changelog
Issues resolved
N/A
Documentation
Testing
Backwards compatibility
backport-to-stable
label if the code is backwards compatible. Otherwise, list breaking changes.