From 6882155faf66fb2c0da81706ee59c933e65004a3 Mon Sep 17 00:00:00 2001 From: josebb Date: Thu, 2 Dec 2021 17:29:33 +0200 Subject: [PATCH] Distinguish between port number of internal endpoint and binding port number in nova Now binding ports of service and pod spec are configured using internal endpoint values. To support reverse proxy for internalUrl, need to distinguish between binding ports and internal endpoint ports. I added `service` section in endpoint items apart from admin,public ,internal and default. Change-Id: Id5ce67f65374382d103c8a0aec78cb43713ce4d2 --- nova/Chart.yaml | 2 +- nova/templates/configmap-etc.yaml | 2 +- nova/templates/deployment-api-osapi.yaml | 6 +++--- nova/templates/service-osapi.yaml | 2 +- nova/values.yaml | 4 ++++ releasenotes/notes/nova.yaml | 1 + 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/nova/Chart.yaml b/nova/Chart.yaml index 1bf65e7879..5652456e1c 100644 --- a/nova/Chart.yaml +++ b/nova/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Nova name: nova -version: 0.2.43 +version: 0.2.44 home: https://docs.openstack.org/nova/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png sources: diff --git a/nova/templates/configmap-etc.yaml b/nova/templates/configmap-etc.yaml index d090d0e69e..12ad86c7d2 100644 --- a/nova/templates/configmap-etc.yaml +++ b/nova/templates/configmap-etc.yaml @@ -241,7 +241,7 @@ limitations under the License. {{- end -}} {{- if empty .Values.conf.nova.DEFAULT.osapi_compute_listen_port -}} -{{- $_ := tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.DEFAULT "osapi_compute_listen_port" -}} +{{- $_ := tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.DEFAULT "osapi_compute_listen_port" -}} {{- end -}} {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} diff --git a/nova/templates/deployment-api-osapi.yaml b/nova/templates/deployment-api-osapi.yaml index 3348ca9696..980dbed844 100644 --- a/nova/templates/deployment-api-osapi.yaml +++ b/nova/templates/deployment-api-osapi.yaml @@ -14,12 +14,12 @@ limitations under the License. {{- define "novaApiOsapiLivenessProbeTemplate" }} tcpSocket: - port: {{ tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- end }} {{- define "novaApiOsapiReadinessProbeTemplate" }} tcpSocket: - port: {{ tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- end }} {{- if .Values.manifests.deployment_api_osapi }} @@ -88,7 +88,7 @@ spec: - stop ports: - name: n-api - containerPort: {{ tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + containerPort: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ dict "envAll" $envAll "component" "api-osapi" "container" "default" "type" "liveness" "probeTemplate" (include "novaApiOsapiLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} {{ dict "envAll" $envAll "component" "api-osapi" "container" "default" "type" "readiness" "probeTemplate" (include "novaApiOsapiReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} volumeMounts: diff --git a/nova/templates/service-osapi.yaml b/nova/templates/service-osapi.yaml index 91ab52cd01..4aa1d4fa6e 100644 --- a/nova/templates/service-osapi.yaml +++ b/nova/templates/service-osapi.yaml @@ -22,7 +22,7 @@ metadata: spec: ports: - name: n-api - port: {{ tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.osapi.node_port.enabled }} nodePort: {{ .Values.network.osapi.node_port.port }} {{ end }} diff --git a/nova/values.yaml b/nova/values.yaml index 9d9f5ef69b..fadbda5a77 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -1792,10 +1792,12 @@ endpoints: default: "/v2.1/%(tenant_id)s" scheme: default: 'http' + service: 'http' port: api: default: 8774 public: 80 + service: 8774 novncproxy: default: 6080 compute_metadata: @@ -1863,10 +1865,12 @@ endpoints: default: / scheme: default: 'http' + service: 'http' port: api: default: 8778 public: 80 + service: 8778 network: name: neutron hosts: diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index fd757889a8..dda928fd9f 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -64,4 +64,5 @@ nova: - 0.2.41 Add Xena and Yoga values overrides - 0.2.42 Add missing configuration ``[vnc]/novncproxy_host`` - 0.2.43 Added OCI registry authentication + - 0.2.44 Distinguish between port number of internal endpoint and binding port number ...