-
Notifications
You must be signed in to change notification settings - Fork 551
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
rpk: support advertised addresses in rpk redpanda config bootstrap
#16652
rpk: support advertised addresses in rpk redpanda config bootstrap
#16652
Conversation
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc934-5c2b-4da4-90b1-922299a9e442:
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc934-5c27-489b-b37c-70ec651c241b:
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc934-5c2e-4c71-baaf-5a29bc9aa4cb:
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc95c-9ae7-444b-8cb6-82ea46cf0bd3:
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc95c-9aef-48e2-92bd-25af9b2754d0:
new failures in https://buildkite.com/redpanda/redpanda/builds/45170#018dc95c-9ae3-402c-8601-f303e71f1e54:
new failures in https://buildkite.com/redpanda/redpanda/builds/45218#018dce76-2bb1-4317-abcf-e338eb7f2fdb:
new failures in https://buildkite.com/redpanda/redpanda/builds/45218#018dce87-9c2b-41f4-9a5b-99ce68364d54:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45170#018dc934-5c2b-4da4-90b1-922299a9e442 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45223#018dcf0b-c3f4-4429-b097-33e1510e9b67 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45223#018dcf1c-aef9-46be-af8e-a745f827bb30 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45223#018dcf89-5e27-459f-abdf-c093e0fb9c3a ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45309#018dd76b-7cec-4537-b17a-4322923748e5 |
163f820
to
a86992b
Compare
The failures mentioned here: #16652 (comment) were fixed. Initial Green CI build: https://buildkite.com/redpanda/redpanda/builds/45223#_ |
/ci-repeat 3 |
/cdt |
src/go/rpk/pkg/config/config.go
Outdated
DefaultAdminPort = 9644 | ||
DefaultRPCPort = 33145 | ||
DefaultListenAddress = "0.0.0.0" | ||
DefaultAdvertisedAddress = "127.0.0.1" |
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.
Nit: can this be named something like Localhost or LoopbackIP?
The other default variables are defaults that we add internally (in params.go). This one here is only a default externally, in the repo level redpanda.yaml file. I was confused / looking up where this default is coming from -- it isn't rpk, rpk isn't defaulting this. The PR is to guard against behavior that may be set externally.
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.
Actually I may be wrong. Where is this being set to 127.0.0.1? I thought that example file was only used for testing.
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.
Yes, it is used for testing. But for some Redpanda images this is the starting redpanda.yaml
.
But yeah, I agree. We can change the name to localhost
but I wanted to make sure that I was using default
as in "this comes from somewhere else" and not just only: "we will replace localhost".
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.
Approved but lmk if you change the name and I'll re-+1.
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.
1 error in CDT: https://buildkite.com/redpanda/redpanda/builds/45255#018dd26a-9862-4855-bdb0-6b74d6493284/6-11701 Unrelated. Error is: #15893 |
This commit introduces 2 new flags and a new behavior to `rpk redpanda config bootstrap`. By default, now advertised addresses (kafka/rpc) are included in our configuration file. So, now `bootstrap` supports overriding the default address with the private IP or the one passed via `--self` flag. Also, adds flags to override this behavior and let the user select which address:port to use in the advertised addresses.
We better error here than later during startup. See redpanda-data#12395
a86992b
to
cd0faa8
Compare
/backport v23.3.x |
Fixes #16623
This PR introduces both Advertised RPC and Kafka addresses to our defaults. Given that these values are now added to our default config file (see #14600) we must handle them properly during bootstrap.
Now
bootstrap
supports overriding the default address with the private IP or the one passed via--self
flag.Also, it adds flags to override this behavior and lets the user select which
address:port
to use in the advertised addresses.rpk will preemptively fail if the resulting advertised host is
0.0.0.0
to avoid a validation error during startup.Example:
Starting with the default Redpanda configuration file (https://github.com/redpanda-data/redpanda/blob/dev/conf/redpanda.yaml):
Backports Required
Release Notes
Features
rpk redpanda config bootstrap
now support bootstrapping your advertised addresses configuration.