Skip to content

Commit

Permalink
Populate proxy settings in lighthouse pods
Browse files Browse the repository at this point in the history
This was recently done for submariner pods but seems we should
also do it for lighthouse pods.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Apr 15, 2024
1 parent 540682d commit 0eb7ec3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions controllers/servicediscovery/servicediscovery_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
submarinerv1alpha1 "github.com/submariner-io/submariner-operator/api/v1alpha1"
"github.com/submariner-io/submariner-operator/controllers/apply"
"github.com/submariner-io/submariner-operator/controllers/metrics"
"github.com/submariner-io/submariner-operator/pkg/httpproxy"
"github.com/submariner-io/submariner-operator/pkg/images"
opnames "github.com/submariner-io/submariner-operator/pkg/names"
appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -241,7 +242,7 @@ func newLighthouseAgent(cr *submarinerv1alpha1.ServiceDiscovery, name string) *a
Name: name,
Image: getImagePath(cr, opnames.ServiceDiscoveryImage, names.ServiceDiscoveryComponent),
ImagePullPolicy: images.GetPullPolicy(cr.Spec.Version, cr.Spec.ImageOverrides[names.ServiceDiscoveryComponent]),
Env: []corev1.EnvVar{
Env: httpproxy.AddEnvVars([]corev1.EnvVar{
{Name: "SUBMARINER_NAMESPACE", Value: cr.Spec.Namespace},
{Name: "SUBMARINER_CLUSTERID", Value: cr.Spec.ClusterID},
{Name: "SUBMARINER_DEBUG", Value: strconv.FormatBool(cr.Spec.Debug)},
Expand All @@ -253,7 +254,7 @@ func newLighthouseAgent(cr *submarinerv1alpha1.ServiceDiscovery, name string) *a
{Name: broker.EnvironmentVariable("CA"), Value: cr.Spec.BrokerK8sCA},
{Name: broker.EnvironmentVariable("Insecure"), Value: strconv.FormatBool(cr.Spec.BrokerK8sInsecure)},
{Name: broker.EnvironmentVariable("Secret"), Value: cr.Spec.BrokerK8sSecret},
},
}),
VolumeMounts: volumeMounts,
},
},
Expand Down Expand Up @@ -338,9 +339,9 @@ func newLighthouseCoreDNSDeployment(cr *submarinerv1alpha1.ServiceDiscovery) *ap
Name: names.LighthouseCoreDNSComponent,
Image: getImagePath(cr, opnames.LighthouseCoreDNSImage, names.LighthouseCoreDNSComponent),
ImagePullPolicy: images.GetPullPolicy(cr.Spec.Version, cr.Spec.ImageOverrides[names.LighthouseCoreDNSComponent]),
Env: []corev1.EnvVar{
Env: httpproxy.AddEnvVars([]corev1.EnvVar{
{Name: "SUBMARINER_CLUSTERID", Value: cr.Spec.ClusterID},
},
}),
Args: []string{
"-conf",
"/etc/coredns/Corefile",
Expand Down

0 comments on commit 0eb7ec3

Please sign in to comment.