Skip to content

Commit

Permalink
Set routeSource in Felix configuration to WorkloadIPs for non-Calico …
Browse files Browse the repository at this point in the history
…CNI (#791)
  • Loading branch information
realgaurav authored Aug 3, 2020
1 parent 572e864 commit b2e7fc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/render/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,10 @@ func (c *nodeComponent) nodeEnvVars() []v1.EnvVar {
}
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_IPTABLESBACKEND", Value: "auto"})

if c.cr.Spec.CNI.Type != operator.PluginCalico {
nodeEnv = append(nodeEnv, v1.EnvVar{Name: "FELIX_ROUTESOURCE", Value: "WorkloadIPs"})
}

if c.amazonCloudInt != nil {
nodeEnv = append(nodeEnv, GetTigeraSecurityGroupEnvVariables(c.amazonCloudInt)...)
nodeEnv = append(nodeEnv, v1.EnvVar{
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 b2e7fc5

Please sign in to comment.