Skip to content

Commit

Permalink
Append TIGERA_TPROXY_ENABLED to per host envoy (#3518)
Browse files Browse the repository at this point in the history
* Append TIGERA_TPROXY_ENABLED to per host envoy

* Apply suggestions from code review

---------

Co-authored-by: Seth Malaki <[email protected]>
  • Loading branch information
radixo and electricjesus authored Sep 25, 2024
1 parent 19c2b1e commit 57b61bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/render/applicationlayer/applicationlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func (c *component) proxyEnv() []corev1.EnvVar {
// envoy needs to run as root to be able to use transparent flag (for tproxy)
{Name: "ENVOY_UID", Value: "0"},
{Name: "ENVOY_GID", Value: "0"},
{Name: "TIGERA_TPROXY", Value: "Enabled"},
}
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/render/applicationlayer/applicationlayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ var _ = Describe("Tigera Secure Application Layer rendering tests", func() {
expectedProxyEnvs := []corev1.EnvVar{
{Name: "ENVOY_UID", Value: "0"},
{Name: "ENVOY_GID", Value: "0"},
{Name: "TIGERA_TPROXY", Value: "Enabled"},
}
Expect(len(proxyEnvs)).To(Equal(len(expectedProxyEnvs)))

Expand Down Expand Up @@ -462,6 +463,7 @@ var _ = Describe("Tigera Secure Application Layer rendering tests", func() {
expectedProxyEnvs := []corev1.EnvVar{
{Name: "ENVOY_UID", Value: "0"},
{Name: "ENVOY_GID", Value: "0"},
{Name: "TIGERA_TPROXY", Value: "Enabled"},
}
Expect(len(proxyEnvs)).To(Equal(len(expectedProxyEnvs)))

Expand Down Expand Up @@ -620,6 +622,7 @@ var _ = Describe("Tigera Secure Application Layer rendering tests", func() {
expectedProxyEnvs := []corev1.EnvVar{
{Name: "ENVOY_UID", Value: "0"},
{Name: "ENVOY_GID", Value: "0"},
{Name: "TIGERA_TPROXY", Value: "Enabled"},
}
Expect(len(proxyEnvs)).To(Equal(len(expectedProxyEnvs)))

Expand Down

0 comments on commit 57b61bc

Please sign in to comment.