Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
squash please
  • Loading branch information
vthapar committed Aug 25, 2022
1 parent 462a87d commit cd41f43
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions controllers/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ limitations under the License.

package constants

const (
CleanupFinalizer = "controllers.submariner.io/cleanup"
)
const CleanupFinalizer = "controllers.submariner.io/cleanup"
2 changes: 1 addition & 1 deletion controllers/submariner/gateway_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func newGatewayPodTemplate(cr *v1alpha1.Submariner, name string, podSelectorLabe
{Name: "SUBMARINER_HEALTHCHECKENABLED", Value: strconv.FormatBool(healthCheckEnabled)},
{Name: "SUBMARINER_HEALTHCHECKINTERVAL", Value: strconv.FormatUint(healthCheckInterval, 10)},
{Name: "SUBMARINER_HEALTHCHECKMAXPACKETLOSSCOUNT", Value: strconv.FormatUint(healthCheckMaxPacketLossCount, 10)},
{Name: "SUBMARINER_GWMETRICSPORT", Value: gwMetricsServerPort},
{Name: "SUBMARINER_GWMETRICSPORT", Value: gatewayMetricsServerPort},
{Name: "NODE_NAME", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "spec.nodeName",
Expand Down
2 changes: 1 addition & 1 deletion controllers/submariner/globalnet_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func newGlobalnetDaemonSet(cr *v1alpha1.Submariner, name string) *appsv1.DaemonS
{Name: "SUBMARINER_NAMESPACE", Value: cr.Spec.Namespace},
{Name: "SUBMARINER_CLUSTERID", Value: cr.Spec.ClusterID},
{Name: "SUBMARINER_EXCLUDENS", Value: "submariner-operator,kube-system,operators,openshift-monitoring,openshift-dns"},
{Name: "SUBMARINER_GNMETRICSPORT", Value: gnMetricsServerPort},
{Name: "SUBMARINER_GNMETRICSPORT", Value: globalnetMetricsServerPort},
{Name: "NODE_NAME", ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "spec.nodeName",
Expand Down
4 changes: 2 additions & 2 deletions controllers/submariner/metrics_proxy_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func newMetricsProxyDaemonSet(cr *v1alpha1.Submariner, name string) *appsv1.Daem
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
*metricProxyContainer(cr, "gateway-metrics-proxy", fmt.Sprint(gatewayMetricsServicePort), gwMetricsServerPort),
*metricProxyContainer(cr, "gateway-metrics-proxy", fmt.Sprint(gatewayMetricsServicePort), gatewayMetricsServerPort),
},
NodeSelector: map[string]string{"submariner.io/gateway": "true"},
// The MetricsProxy Pod must be able to run on any flagged node, regardless of existing taints
Expand All @@ -72,7 +72,7 @@ func newMetricsProxyDaemonSet(cr *v1alpha1.Submariner, name string) *appsv1.Daem

if cr.Spec.GlobalCIDR != "" {
daemonSet.Spec.Template.Spec.Containers = append(daemonSet.Spec.Template.Spec.Containers,
*metricProxyContainer(cr, "globalnet-metrics-proxy", fmt.Sprint(globalnetMetricsServicePort), gnMetricsServerPort))
*metricProxyContainer(cr, "globalnet-metrics-proxy", fmt.Sprint(globalnetMetricsServicePort), globalnetMetricsServerPort))
}

return daemonSet
Expand Down
4 changes: 2 additions & 2 deletions controllers/submariner/submariner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ import (
const (
gatewayMetricsServicePort = 8080
globalnetMetricsServicePort = 8081
gwMetricsServerPort = "32780"
gnMetricsServerPort = "32781"
gatewayMetricsServerPort = "32780"
globalnetMetricsServerPort = "32781"
)

var log = logf.Log.WithName("controller_submariner")
Expand Down

0 comments on commit cd41f43

Please sign in to comment.