Skip to content

Commit

Permalink
Updates Kube Infra Namespace and Envoy Deployment
Browse files Browse the repository at this point in the history
Signed-off-by: danehans <[email protected]>
  • Loading branch information
danehans committed Aug 25, 2022
1 parent d99f32f commit 80c2891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 1 addition & 15 deletions internal/infrastructure/kubernetes/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
_ "embed"
"fmt"
"path/filepath"
"strings"
"text/template"

Expand All @@ -25,10 +24,6 @@ const (
envoyNsEnvVar = "ENVOY_GATEWAY_NAMESPACE"
// envoyPodEnvVar is the name of the Envoy pod name environment variable.
envoyPodEnvVar = "ENVOY_POD_NAME"
// envoyCfgVolName is the name of the Envoy configuration volume.
envoyCfgVolName = "envoy-config"
// envoyCfgVolMntDir is the directory name of the Envoy configuration volume.
envoyCfgVolMntDir = "config"
// envoyCfgFileName is the name of the Envoy configuration file.
envoyCfgFileName = "bootstrap.yaml"
// envoyHTTPPort is the container port number of Envoy's HTTP endpoint.
Expand Down Expand Up @@ -181,8 +176,6 @@ func expectedContainers(infra *ir.Infra) ([]corev1.Container, error) {
"envoy",
},
Args: []string{
"--config-path",
filepath.Join("/", envoyCfgVolMntDir, envoyCfgFileName),
fmt.Sprintf("--service-cluster $(%s)", envoyNsEnvVar),
fmt.Sprintf("--service-node $(%s)", envoyPodEnvVar),
fmt.Sprintf("--config-yaml %s", cfg.rendered),
Expand All @@ -208,14 +201,7 @@ func expectedContainers(infra *ir.Infra) ([]corev1.Container, error) {
},
},
},
Ports: ports,
VolumeMounts: []corev1.VolumeMount{
{
Name: envoyCfgVolName,
MountPath: filepath.Join("/", envoyCfgVolMntDir),
ReadOnly: true,
},
},
Ports: ports,
TerminationMessagePolicy: corev1.TerminationMessageReadFile,
TerminationMessagePath: "/dev/termination-log",
},
Expand Down
2 changes: 2 additions & 0 deletions internal/infrastructure/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func NewManager(cfg *config.Server) (*Manager, error) {
ns, found := os.LookupEnv("ENVOY_GATEWAY_NAMESPACE")
if found {
mgr.Infra.Namespace = ns
} else {
mgr.Infra.Namespace = "envoy-gateway-system"
}
} else {
// Kube is the only supported provider type.
Expand Down

0 comments on commit 80c2891

Please sign in to comment.