-
Notifications
You must be signed in to change notification settings - Fork 292
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 option to get clustername from google metadata #448
Conversation
This would be really nice for multi cluster ! |
@thijsdejong thanks for the PR. Do we have to set clustername as |
Hi, You have to set clustername to |
@thijsdejong documentation for botkube.io is placed at https://github.com/infracloudio/botkube-docs. We use hugo to build that. Could you please update the installation and configuration guide as per the change? Please LMK if you need any help with that. |
@@ -277,6 +278,15 @@ func New() (*Config, error) { | |||
yaml.Unmarshal(b, c) | |||
} | |||
|
|||
if c.Settings.ClusterName == "+google_metadata+" { |
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.
Can we use something like {{ google_metada }}
instead? Looks more like go templating
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.
Using {{}} would suggest that Go templating is actually supported. If it is not, then this only leads to confusion, I think.
Would $GOOGLE_METADATA
or google-metadata:///cluster
make more sense to you?
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.
Sounds good to me.
Hello there, I'm not really sure if that's the proper way of implementing this 🤔 It feels to me like this is not the BotKube's responsibility. In that way, later we would need to support other cloud providers and that would be hard to maintain. However, we could be more flexible with cluster name configuration. What @mszostok introduced in #601 could be supported in @mszostok @PrasadG193 @thijsdejong What do you think? Cheers! |
Alright, so let's close it and implement in the way as I mentioned above. You can follow the implementation under this issue: #643. Thanks! |
ISSUE TYPE
SUMMARY
This adds the option to get the cluster name from google metadata server. This is very useful in a multicluster setup on GCP that we use.
cloud.google.com/go v0.38.0