Skip to content

Commit

Permalink
Set routeSource in Felix configuration to WorkloadIPs for aws-vpc CNI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Khatri committed Jul 31, 2020
1 parent 25fa185 commit 5125cdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/render/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ func (c *nodeComponent) nodeEnvVars() []v1.EnvVar {
case operator.PluginAmazonVPC:
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_INTERFACEPREFIX", Value: "eni"})
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_IPTABLESMANGLEALLOWACTION", Value: "Return"})
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_ROUTESOURCE", Value: "WorkloadIPs"})
case operator.PluginGKE:
// The GKE CNI plugin uses its own interface prefix.
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_INTERFACEPREFIX", Value: "gke"})
Expand Down
1 change: 1 addition & 0 deletions pkg/render/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ var _ = Describe("Node rendering tests", func() {
{Name: "FELIX_IPTABLESBACKEND", Value: "auto"},
{Name: "FELIX_INTERFACEPREFIX", Value: "eni"},
{Name: "FELIX_IPTABLESMANGLEALLOWACTION", Value: "Return"},
{Name: "FELIX_ROUTESOURCE", Value: "WorkloadIPs"},
}
Expect(ds.Spec.Template.Spec.Containers[0].Env).To(ConsistOf(expectedNodeEnv))

Expand Down

0 comments on commit 5125cdf

Please sign in to comment.