Get Hub host and port from ProxyConfig struct

This commit is contained in:
M. Mert Yildiran
2022-12-29 04:23:37 +03:00
parent a4f5d832b3
commit 1474a7d687
3 changed files with 6 additions and 8 deletions

View File

@@ -261,7 +261,7 @@ func (provider *Provider) BuildHubPod(opts *PodOptions) (*core.Pod, error) {
return pod, nil
}
func (provider *Provider) BuildFrontPod(opts *PodOptions) (*core.Pod, error) {
func (provider *Provider) BuildFrontPod(opts *PodOptions, hubHost string, hubPort string) (*core.Pod, error) {
configMapVolume := &core.ConfigMapVolumeSource{}
configMapVolume.Name = ConfigMapName
@@ -285,7 +285,6 @@ func (provider *Provider) BuildFrontPod(opts *PodOptions) (*core.Pod, error) {
volumeMounts := []core.VolumeMount{}
volumes := []core.Volume{}
// TODO: Get host and port from ProxyConfig
containers := []core.Container{
{
Name: opts.PodName,
@@ -322,11 +321,11 @@ func (provider *Provider) BuildFrontPod(opts *PodOptions) (*core.Pod, error) {
},
{
Name: "REACT_APP_HUB_HOST",
Value: "localhost",
Value: hubHost,
},
{
Name: "REACT_APP_HUB_PORT",
Value: "8898",
Value: hubPort,
},
},
},