-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Update Rancher API integration to go-rancher client v2. #2291
Conversation
@rawmind0 Could you manage the vendor files? |
@rawmind0 I will manage the glide part 😄 |
Thanks @ldez ...Tell me if you need anything else... :) |
@rawmind0 done! |
Thanks so much @ldez .. :) |
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 do not know enough about Rancher to know if the <service_name>. <Stack_name>. <Domain>
change is breaking, could you tell me?
} else { | ||
for key, value := range service.LaunchConfig.Labels { | ||
rancherData.Labels[key] = value.(string) | ||
} | ||
} | ||
|
||
for _, container := range containers { | ||
if container.Labels[labelRancherStackServiceName] == rancherData.Name && | ||
if container.Labels[labelRancherStackServiceName] == stack.Name+"/"+service.Name && |
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.
In this case, the order is different from <service_name>. <stack_name>
, could you explain why?
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.
Because one thing is how system establish context hierarchy names for services stack/service
set by container label io.rancher.stack_service.name
Another thing is the dns name for the servicesservice.stack.domain
to set default traefik Host matcher.. All rancher dns external integrations and internal dns set by default dns entries as service.stack.domain
. I think it's useful to make them match by default.
This change is just generating default traefik frontend rule to |
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 👏
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 👏 🐮
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
ping @SantoDE |
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 👼
I really like that it's a way closer now to match with rancher defaults.
…ervice name and host rule to <service_name>.<stack_name>.<domain> on rancher integration
Isn't backward incompatible change? Going from |
Description
<service_name>.<stack_name>.<domain>
on rancher integration (api and metadata), to match default dns Rancher naming.