-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support to include c2p authority #34
Conversation
@easwars please take a look |
main.go
Outdated
@@ -51,6 +52,7 @@ var ( | |||
gceVM = flag.String("gce-vm-experimental", "", "GCE VM name to use, instead of reading it from the metadata server. This flag is EXPERIMENTAL and may be changed or removed in a later release.") | |||
configMesh = flag.String("config-mesh-experimental", "", "Dictates which Mesh resource to use. This flag is EXPERIMENTAL and may be changed or removed in a later release.") | |||
includeFederationSupport = flag.Bool("include-federation-support-experimental", false, "whether or not to generate configs required for xDS Federation. This flag is EXPERIMENTAL and may be changed or removed in a later release.") | |||
includeC2PAuthority = flag.Bool("include-c2p-authority-experimental", false, "whether or not to include c2p TD authority for xDS Federation. Ignored if not used with include-federation-support-experimental flag. This flag is EXPERIMENTAL and may be changed or removed in a later release.") |
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.
c2p
might not be very descriptive for the users. Maybe include-directpath-authority-experimental
. Wdyt @ejona86 ?
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.
meh. Users should never need to set this. It'll just become the default and then go away.
I'm also updating this to include changes to support adding node metadata indicating IPv6 capabilities for DirectPath b/258291928 |
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 think changes are mostly looking good. Some very minor comments this time around.
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.
rev'ing the PR addressing comments. @easwars pls take a look when you can
main.go
Outdated
@@ -371,12 +382,15 @@ func getFromMetadata(urlStr string) ([]byte, error) { | |||
if err != nil { | |||
return nil, fmt.Errorf("failed reading from metadata server: %w", err) | |||
} | |||
if code := resp.StatusCode; code < 200 || code > 299 { | |||
return nil, fmt.Errorf("failed reading from metadata server with Non-OK status code: %d", code) |
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 on the actual error message. Include the url
since this function is shared and a concise error string.
return nil, fmt.Errorf("metadata server returned status code %d for url %q", code, url)
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.
yup that makes sense.. I'll update that
@ejona86 : I think the changes look good. I'm assigning you for a second set of eyes. Thank you. |
As part of xds federation changes, we need to add support to the bootstrap generator to add c2p authority to the config. This change addresses that.
what's happenin?
include-directpath-authority-experimental
flaghttp://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ipv6s
and set theTRAFFICDIRECTOR_DIRECTPATH_C2P_IPV6_CAPABLE
to true or false, in node metadataPart of #32