-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Implements a secondary interface just for services #266
Conversation
@@ -141,6 +141,6 @@ var kubeVipSampleManifest = &cobra.Command{ | |||
} | |||
|
|||
b, _ := yaml.Marshal(p) | |||
fmt.Printf(string(b)) | |||
fmt.Print(string(b)) |
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 it just for testing? It's better to delete it.
cmd/kube-vip-kubeadm.go
Outdated
@@ -150,7 +152,7 @@ func autoGenLocalPeer() (*kubevip.RaftPeer, error) { | |||
} | |||
} | |||
if a == "" { | |||
return nil, fmt.Errorf("Unable to find local address") | |||
return nil, fmt.Errorf("nable to find local address") |
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 it should be unable
.
pkg/kubevip/config_envvar.go
Outdated
@@ -24,6 +24,9 @@ const ( | |||
//vipInterface - defines the interface that the vip should bind too | |||
vipInterface = "vip_interface" | |||
|
|||
//vipInterface - defines the interface that the vip should bind too |
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.
wrong annotation
@@ -24,6 +24,9 @@ const ( | |||
//vipInterface - defines the interface that the vip should bind too | |||
vipInterface = "vip_interface" | |||
|
|||
//vipInterface - defines the interface that the vip should bind too | |||
vipServicesInterface = "vip_servicesinterface" |
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.
From my perspect, services_vip_interface would be better than vip_servicesinterface. What do you think?
pkg/kubevip/config_types.go
Outdated
@@ -63,6 +63,9 @@ type Config struct { | |||
// Interface is the network interface to bind to (default: First Adapter) | |||
Interface string `yaml:"interface,omitempty"` | |||
|
|||
// Interface is the network interface to bind to (default: First Adapter) |
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.
wrong annotation.
pkg/manager/services.go
Outdated
@@ -90,18 +90,26 @@ func (sm *Manager) syncServices(service *v1.Service, wg *sync.WaitGroup) error { | |||
|
|||
} | |||
|
|||
// Detect if we're using a specific interface for services | |||
var serciceInterface string |
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.
spelling mistake
pkg/manager/services.go
Outdated
// Generate new Virtual IP configuration | ||
newVip := kubevip.Config{ | ||
VIP: newServiceAddress, //TODO support more than one vip? | ||
Interface: sm.config.Interface, | ||
Interface: serciceInterface, |
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.
ditto
Thanks for the feedback, all issues addressed! |
lgtm |
This allows an end user to specify a secondary interface that is used purely for services.
Or within the environment variables!