diff --git a/charts/consul/templates/connect-inject-deployment.yaml b/charts/consul/templates/connect-inject-deployment.yaml index d38e8ef584..2d163f6943 100644 --- a/charts/consul/templates/connect-inject-deployment.yaml +++ b/charts/consul/templates/connect-inject-deployment.yaml @@ -161,7 +161,7 @@ spec: {{- if .Values.global.openshift.enabled }} -enable-openshift \ {{- end }} - -openshift-scc-name={{ .Values.connectInject.apiGateway.openshiftSccName }} + -openshift-scc-name={{ .Values.connectInject.apiGateway.openshiftSccName }} \ {{- if .Values.connectInject.transparentProxy.defaultOverwriteProbes }} -transparent-proxy-default-overwrite-probes=true \ {{- else }} diff --git a/control-plane/api-gateway/common/translation.go b/control-plane/api-gateway/common/translation.go index 54ce317510..94241eed22 100644 --- a/control-plane/api-gateway/common/translation.go +++ b/control-plane/api-gateway/common/translation.go @@ -107,7 +107,7 @@ func (t ResourceTranslator) toAPIGatewayListener(gateway gwv1beta1.Gateway, list return api.APIGatewayListener{ Name: string(listener.Name), Hostname: DerefStringOr(listener.Hostname, ""), - Port: ToContainerPort(listener.Port), + Port: int(listener.Port), Protocol: listenerProtocolMap[strings.ToLower(string(listener.Protocol))], TLS: api.APIGatewayTLSConfiguration{ Certificates: certificates, @@ -115,10 +115,6 @@ func (t ResourceTranslator) toAPIGatewayListener(gateway gwv1beta1.Gateway, list }, true } -func ToContainerPort(portNumber gwv1beta1.PortNumber) int { - return int(portNumber) + 2000 -} - func (t ResourceTranslator) ToHTTPRoute(route gwv1beta1.HTTPRoute, resources *ResourceMap) *api.HTTPRouteConfigEntry { namespace := t.Namespace(route.Namespace) diff --git a/control-plane/api-gateway/gatekeeper/service.go b/control-plane/api-gateway/gatekeeper/service.go index c0565a57b4..cdb6c37357 100644 --- a/control-plane/api-gateway/gatekeeper/service.go +++ b/control-plane/api-gateway/gatekeeper/service.go @@ -5,8 +5,6 @@ package gatekeeper import ( "context" - "k8s.io/apimachinery/pkg/util/intstr" - "github.com/hashicorp/consul-k8s/control-plane/api-gateway/common" "github.com/hashicorp/consul-k8s/control-plane/api/v1alpha1" "k8s.io/apimachinery/pkg/types" @@ -77,9 +75,8 @@ func (g *Gatekeeper) service(gateway gwv1beta1.Gateway, gcc v1alpha1.GatewayClas ports = append(ports, corev1.ServicePort{ Name: string(listener.Name), // only TCP-based services are supported for now - Protocol: corev1.ProtocolTCP, - Port: int32(listener.Port), - TargetPort: intstr.FromInt(common.ToContainerPort(listener.Port)), + Protocol: corev1.ProtocolTCP, + Port: int32(listener.Port), }) seenPorts[listener.Port] = struct{}{}