From c09fe0e66274e1081d3a1f120fe2f7c3efcef832 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Fri, 16 Nov 2018 16:59:00 -0500 Subject: [PATCH] Updates for nova-api-proxy helm chart Nova endpoints cannot be created at the nova-api-proxy due to a few issues in nova-api-proxy chart. Changes include: - Fix the reference issues in nova-api-proxy chart in order to create service and ingress for nova-api-proxy - Add a job in nova-api-proxy chart to create service ingress rule - Change the public host name of the endpoint from "nova-api-proxy" to "nova" - Disable the nova endpoints and ingress creation in nova chart Change-Id: I6a49dee18aa409d81f4620920262715c6d85c2eb Depends-On: https://review.openstack.org/#/c/619651/ Story: 2004007 Task: 26953 Signed-off-by: Angie Wang --- .../manifests/manifest-no-tests.yaml | 4 ++++ .../stx-openstack-helm/manifests/manifest.yaml | 4 ++++ .../nova-api-proxy/templates/ingress.yaml | 4 ++-- .../templates/service-ingress-api.yaml | 12 ++++++++++++ .../nova-api-proxy/templates/service.yaml | 12 ++++++------ .../stx-openstack-helm/nova-api-proxy/values.yaml | 10 ++++++---- 6 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service-ingress-api.yaml diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest-no-tests.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest-no-tests.yaml index ca4341c8d6..bb04700edf 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest-no-tests.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest-no-tests.yaml @@ -492,6 +492,10 @@ data: application: nova component: cell-setup values: + manifests: + job_ks_endpoints: false + ingress_osapi: false + service_ingress_osapi: false labels: agent: compute: diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml index e02a1d5630..1ccabb0a6e 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml @@ -492,6 +492,10 @@ data: application: nova component: cell-setup values: + manifests: + job_ks_endpoints: false + ingress_osapi: false + service_ingress_osapi: false labels: agent: compute: diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/ingress.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/ingress.yaml index 3fd8de5d9a..2dd74756d9 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/ingress.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/ingress.yaml @@ -6,7 +6,7 @@ # */}} -{{- if and .Values.manifests.ingress .Values.network.api_proxy.ingress.public }} -{{- $ingressOpts := dict "envAll" . "backendServiceType" "compute" "backendPort" "n-api-proxy" -}} +{{- if and .Values.manifests.ingress_api .Values.network.api_proxy.ingress.public }} +{{- $ingressOpts := dict "envAll" . "backendService" "api_proxy" "backendServiceType" "compute" "backendPort" "n-api-proxy" -}} {{ $ingressOpts | include "helm-toolkit.manifests.ingress" }} {{- end }} diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service-ingress-api.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service-ingress-api.yaml new file mode 100644 index 0000000000..cee787a3af --- /dev/null +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service-ingress-api.yaml @@ -0,0 +1,12 @@ +{{/* +# +# Copyright (c) 2018 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +*/}} + +{{- if and .Values.manifests.service_ingress_api .Values.network.api_proxy.ingress.public }} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "compute" -}} +{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} +{{- end }} diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service.yaml index 0d8584b07e..784067149b 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/templates/service.yaml @@ -12,19 +12,19 @@ apiVersion: v1 kind: Service metadata: - name: {{ tuple "nova" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ tuple "compute" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} spec: ports: - name: n-api-proxy port: {{ tuple "compute" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - {{ if .Values.network.api.node_port.enabled }} - nodePort: {{ .Values.network.api.node_port.port }} + {{ if .Values.network.api_proxy.node_port.enabled }} + nodePort: {{ .Values.network.api_proxy.node_port.port }} {{ end }} selector: -{{ tuple $envAll "nova" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} - {{ if .Values.network.api.node_port.enabled }} +{{ tuple $envAll "nova" "api-proxy" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} + {{ if .Values.network.api_proxy.node_port.enabled }} type: NodePort - {{ if .Values.network.api.external_policy_local }} + {{ if .Values.network.api_proxy.external_policy_local }} externalTrafficPolicy: Local {{ end }} {{ end }} diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/values.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/values.yaml index 33ed6642b3..efed60eee2 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/values.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy/values.yaml @@ -155,6 +155,7 @@ dependencies: static: ks_endpoints: jobs: + - nova-ks-user - nova-ks-service services: - endpoint: internal @@ -203,15 +204,14 @@ endpoints: scheme: default: http port: - admin: - default: 35357 api: default: 80 + internal: 5000 compute: name: nova hosts: default: nova-api-proxy - public: nova-api-proxy + public: nova host_fqdn_override: default: null # NOTE(portdirect): this chart supports TLS for fqdn over-ridden public @@ -295,7 +295,9 @@ manifests: configmap_etc: true deployment_api_proxy: true ingress_api: true - job_ks_endpoints: false + service_api: true + service_ingress_api: true + job_ks_endpoints: true resources: {}