From 35c23a2324b0b148371262ee5b2fefeb718fe144 Mon Sep 17 00:00:00 2001 From: josebb Date: Thu, 2 Dec 2021 17:11:11 +0200 Subject: [PATCH] Distinguish between port number of internal endpoint and binding port number in heat 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: If393517aeb983e0cef7f370376f2bf4d12f65f4f --- heat/Chart.yaml | 2 +- heat/templates/configmap-etc.yaml | 6 +++--- heat/templates/deployment-api.yaml | 6 +++--- heat/templates/deployment-cfn.yaml | 6 +++--- heat/templates/deployment-cloudwatch.yaml | 4 ++-- heat/templates/service-api.yaml | 2 +- heat/templates/service-cfn.yaml | 2 +- heat/templates/service-cloudwatch.yaml | 2 +- heat/values.yaml | 6 ++++++ releasenotes/notes/heat.yaml | 1 + 10 files changed, 22 insertions(+), 15 deletions(-) diff --git a/heat/Chart.yaml b/heat/Chart.yaml index 014e5845e6..86a3a75392 100644 --- a/heat/Chart.yaml +++ b/heat/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Heat name: heat -version: 0.2.14 +version: 0.2.15 home: https://docs.openstack.org/heat/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Heat/OpenStack_Project_Heat_vertical.png sources: diff --git a/heat/templates/configmap-etc.yaml b/heat/templates/configmap-etc.yaml index cc5da4fa0d..b49edcd14c 100644 --- a/heat/templates/configmap-etc.yaml +++ b/heat/templates/configmap-etc.yaml @@ -112,15 +112,15 @@ limitations under the License. {{- end -}} {{- if empty .Values.conf.heat.heat_api.bind_port -}} -{{- $_ := tuple "orchestration" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api "bind_port" -}} +{{- $_ := tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api "bind_port" -}} {{- end -}} {{- if empty .Values.conf.heat.heat_api_cloudwatch.bind_port -}} -{{- $_ := tuple "cloudwatch" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cloudwatch "bind_port" -}} +{{- $_ := tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cloudwatch "bind_port" -}} {{- end -}} {{- if empty .Values.conf.heat.heat_api_cfn.bind_port -}} -{{- $_ := tuple "cloudformation" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cfn "bind_port" -}} +{{- $_ := tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cfn "bind_port" -}} {{- end -}} {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} diff --git a/heat/templates/deployment-api.yaml b/heat/templates/deployment-api.yaml index d3cebb0acd..1274e88365 100644 --- a/heat/templates/deployment-api.yaml +++ b/heat/templates/deployment-api.yaml @@ -73,13 +73,13 @@ spec: - stop ports: - name: h-api - containerPort: {{ tuple "orchestration" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + containerPort: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ tuple "orchestration" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} livenessProbe: tcpSocket: - port: {{ tuple "orchestration" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} initialDelaySeconds: 30 volumeMounts: - name: pod-tmp diff --git a/heat/templates/deployment-cfn.yaml b/heat/templates/deployment-cfn.yaml index dc05f6f546..2f16901662 100644 --- a/heat/templates/deployment-cfn.yaml +++ b/heat/templates/deployment-cfn.yaml @@ -73,13 +73,13 @@ spec: - stop ports: - name: h-cfn - containerPort: {{ tuple "cloudformation" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + containerPort: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ tuple "cloudformation" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} livenessProbe: tcpSocket: - port: {{ tuple "cloudformation" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} initialDelaySeconds: 30 volumeMounts: - name: pod-tmp diff --git a/heat/templates/deployment-cloudwatch.yaml b/heat/templates/deployment-cloudwatch.yaml index 2fc5a4912c..d6bc2c79f6 100644 --- a/heat/templates/deployment-cloudwatch.yaml +++ b/heat/templates/deployment-cloudwatch.yaml @@ -72,10 +72,10 @@ spec: - stop ports: - name: h-cwh - containerPort: {{ tuple "cloudwatch" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + containerPort: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ tuple "cloudwatch" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/heat/templates/service-api.yaml b/heat/templates/service-api.yaml index fd0aadf33b..39de5987c2 100644 --- a/heat/templates/service-api.yaml +++ b/heat/templates/service-api.yaml @@ -22,7 +22,7 @@ metadata: spec: ports: - name: h-api - port: {{ tuple "orchestration" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.api.node_port.enabled }} nodePort: {{ .Values.network.api.node_port.port }} {{ end }} diff --git a/heat/templates/service-cfn.yaml b/heat/templates/service-cfn.yaml index 568c1db2c0..4114962e9d 100644 --- a/heat/templates/service-cfn.yaml +++ b/heat/templates/service-cfn.yaml @@ -22,7 +22,7 @@ metadata: spec: ports: - name: h-cfn - port: {{ tuple "cloudformation" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.cfn.node_port.enabled }} nodePort: {{ .Values.network.cfn.node_port.port }} {{ end }} diff --git a/heat/templates/service-cloudwatch.yaml b/heat/templates/service-cloudwatch.yaml index 4978371651..0afec9daf8 100644 --- a/heat/templates/service-cloudwatch.yaml +++ b/heat/templates/service-cloudwatch.yaml @@ -22,7 +22,7 @@ metadata: spec: ports: - name: h-cwh - port: {{ tuple "cloudwatch" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.cloudwatch.node_port.enabled }} nodePort: {{ .Values.network.cloudwatch.node_port.port }} {{ end }} diff --git a/heat/values.yaml b/heat/values.yaml index 7b03ea7a79..31b481abeb 100644 --- a/heat/values.yaml +++ b/heat/values.yaml @@ -910,10 +910,12 @@ endpoints: default: '/v1/%(project_id)s' scheme: default: 'http' + service: 'http' port: api: default: 8004 public: 80 + service: 8004 cloudformation: name: heat-cfn hosts: @@ -932,10 +934,12 @@ endpoints: default: /v1 scheme: default: 'http' + service: 'http' port: api: default: 8000 public: 80 + service: 8000 # Cloudwatch does not get an entry in the keystone service catalog cloudwatch: name: heat-cloudwatch @@ -949,10 +953,12 @@ endpoints: type: null scheme: default: 'http' + service: 'http' port: api: default: 8003 public: 80 + service: 8003 oslo_db: auth: admin: diff --git a/releasenotes/notes/heat.yaml b/releasenotes/notes/heat.yaml index 58ee190d3c..a495b16263 100644 --- a/releasenotes/notes/heat.yaml +++ b/releasenotes/notes/heat.yaml @@ -21,4 +21,5 @@ heat: - 0.2.12 Migrated CronJob resource to batch/v1 API version & PodDisruptionBudget to policy/v1 - 0.2.13 Add Xena and Yoga values overrides - 0.2.14 Added OCI registry authentication + - 0.2.15 Distinguish between port number of internal endpoint and binding port number ...