From 6e247eb59e88197666cc7aec27f469a7b6d0696e Mon Sep 17 00:00:00 2001 From: iamejboy Date: Sat, 16 Nov 2019 00:11:02 +0900 Subject: [PATCH] Service port names should follow istio-naming convention? (#5070) * update service ports name following istio-naming convention - https://istio.io/docs/setup/kubernetes/additional-setup/requirements/ * update missed and rename service port's name --- config/400-activator-service.yaml | 2 +- config/400-controller-service.yaml | 2 +- config/400-webhook-service.yaml | 3 ++- config/autoscaler-service.yaml | 4 ++-- pkg/apis/serving/v1alpha1/revision_lifecycle.go | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/config/400-activator-service.yaml b/config/400-activator-service.yaml index 4024c994aa63..c65b1796e72c 100644 --- a/config/400-activator-service.yaml +++ b/config/400-activator-service.yaml @@ -32,7 +32,7 @@ spec: protocol: TCP port: 81 targetPort: 8013 - - name: metrics + - name: http-metrics protocol: TCP port: 9090 targetPort: 9090 diff --git a/config/400-controller-service.yaml b/config/400-controller-service.yaml index 738376cdce88..ff6453cc2f5e 100644 --- a/config/400-controller-service.yaml +++ b/config/400-controller-service.yaml @@ -22,7 +22,7 @@ metadata: namespace: knative-serving spec: ports: - - name: metrics + - name: http-metrics port: 9090 protocol: TCP targetPort: 9090 diff --git a/config/400-webhook-service.yaml b/config/400-webhook-service.yaml index 226c148d90cc..4f5e3f82bc31 100644 --- a/config/400-webhook-service.yaml +++ b/config/400-webhook-service.yaml @@ -22,7 +22,8 @@ metadata: namespace: knative-serving spec: ports: - - port: 443 + - name: https-webhook + port: 443 targetPort: 8443 selector: role: webhook diff --git a/config/autoscaler-service.yaml b/config/autoscaler-service.yaml index 03765b2321c3..119c2f9c9724 100644 --- a/config/autoscaler-service.yaml +++ b/config/autoscaler-service.yaml @@ -26,11 +26,11 @@ spec: port: 8080 protocol: TCP targetPort: 8080 - - name: metrics + - name: http-metrics port: 9090 protocol: TCP targetPort: 9090 - - name: custom-metrics + - name: https-custom-metrics port: 443 protocol: TCP targetPort: 8443 diff --git a/pkg/apis/serving/v1alpha1/revision_lifecycle.go b/pkg/apis/serving/v1alpha1/revision_lifecycle.go index 965a2f807606..6bfbcca72dea 100644 --- a/pkg/apis/serving/v1alpha1/revision_lifecycle.go +++ b/pkg/apis/serving/v1alpha1/revision_lifecycle.go @@ -44,7 +44,7 @@ const ( // QueueAdminPortName specifies the port name for // health check and lifecycle hooks for queue-proxy. - QueueAdminPortName string = "queueadm-port" + QueueAdminPortName string = "http-queueadm" // AutoscalingQueueMetricsPortName specifies the port name to use for metrics // emitted by queue-proxy for autoscaler. @@ -52,11 +52,11 @@ const ( // UserQueueMetricsPortName specifies the port name to use for metrics // emitted by queue-proxy for end user. - UserQueueMetricsPortName = "user-metrics" + UserQueueMetricsPortName = "http-usermetric" // ServiceQueueMetricsPortName is the name of the port that serves metrics // on the Kubernetes service. - ServiceQueueMetricsPortName = "metrics" + ServiceQueueMetricsPortName = "http-metrics" ) var revCondSet = apis.NewLivingConditionSet(