This repository has been archived by the owner on Jul 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
add feature to set google metadata within hosts when running on gce #817
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wadells
approved these changes
Jan 19, 2021
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.
LGTM!
a-palchikov
approved these changes
Jan 20, 2021
lib/utils/utils.go
Outdated
"syscall" | ||
"unicode" | ||
|
||
"github.com/gravitational/planet/lib/constants" | ||
"github.com/sirupsen/logrus" |
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: move to the next group
bernardjkim
approved these changes
Jan 21, 2021
|
||
if utils.OnGCEVM() { | ||
hosts = append(hosts, utils.HostEntry{ | ||
IP: "169.254.169.254", |
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.
Is this a commonly used IP address for a metadata server?
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.
Yea, off hand both AWS and GCE use this IP for the metadata server. I don't know about other envs off hand.
knisbet
pushed a commit
that referenced
this pull request
Jan 21, 2021
knisbet
pushed a commit
that referenced
this pull request
Jan 21, 2021
knisbet
pushed a commit
that referenced
this pull request
Feb 4, 2021
This was referenced Mar 22, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a feature to planet to hardcode the google metadata server into the planet hosts file when detected as running on a gcloud VM. This is a workaround for a kubelet problem where it will always try and contact the metadata server even when configured without cloud integrations.
kubernetes/kubernetes#30195
kubernetes/kubernetes#86245
And probably others.
Updates gravitational/gravity#2391