Set environment variables of front pod

This commit is contained in:
M. Mert Yildiran 2022-12-28 05:01:43 +03:00
parent af02b1d779
commit 647d197f51
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
2 changed files with 21 additions and 2 deletions

View File

@ -114,6 +114,11 @@ func createAndStartContainers(
respFront, err = cli.ContainerCreate(ctx, &container.Config{ respFront, err = cli.ContainerCreate(ctx, &container.Config{
Image: imageFront, Image: imageFront,
Tty: false, Tty: false,
Env: []string{
"REACT_APP_DEFAULT_FILTER= ",
"REACT_APP_HUB_HOST=localhost",
"REACT_APP_HUB_PORT=8898",
},
}, hostConfigFront, nil, nil, "kubeshark-front") }, hostConfigFront, nil, nil, "kubeshark-front")
if err != nil { if err != nil {
return return

View File

@ -345,8 +345,22 @@ func (provider *Provider) BuildFrontPod(opts *PodOptions, mountVolumeClaim bool,
"memory": memRequests, "memory": memRequests,
}, },
}, },
Command: []string{"nginx"}, Command: []string{"nginx"},
Args: []string{"-g", "daemon off;"}, Args: []string{"-g", "daemon off;"},
Env: []core.EnvVar{
{
Name: "REACT_APP_DEFAULT_FILTER",
Value: " ",
},
{
Name: "REACT_APP_HUB_HOST",
Value: "localhost",
},
{
Name: "REACT_APP_HUB_PORT",
Value: "8898",
},
},
WorkingDir: models.DataDirPath, WorkingDir: models.DataDirPath,
}, },
} }