From 88ad17a84b1796c3bce9718c2366be95580e95ea Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Wed, 31 Jan 2024 13:27:29 -0600 Subject: [PATCH] Use upstream ingress-nginx chart Change-Id: I90a1a1e27f0b821bbecfe493057eada81d4f9424 --- tools/deployment/common/ingress.sh | 80 +++++++++++++++++++ .../deployment/keystone-auth/070-keystone.sh | 2 +- .../mariadb-operator-cluster/070-keystone.sh | 2 +- .../openstack-support-rook/030-rabbitmq.sh | 2 +- .../100-ceph-radosgateway.sh | 2 +- .../openstack-support-rook/130-cinder.sh | 2 +- .../openstack-support/030-rabbitmq.sh | 2 +- .../100-ceph-radosgateway.sh | 2 +- .../openstack-support/130-cinder.sh | 2 +- zuul.d/jobs.yaml | 14 ++-- 10 files changed, 95 insertions(+), 15 deletions(-) create mode 100755 tools/deployment/common/ingress.sh diff --git a/tools/deployment/common/ingress.sh b/tools/deployment/common/ingress.sh new file mode 100755 index 000000000..ed347a846 --- /dev/null +++ b/tools/deployment/common/ingress.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +: ${HELM_INGRESS_NGINX_VERSION:="4.8.3"} + +helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx + +#NOTE: Deploy cluster ingress +helm upgrade --install ingress-nginx-cluster ingress-nginx/ingress-nginx \ + --version ${HELM_INGRESS_NGINX_VERSION} \ + --namespace=kube-system \ + --set controller.admissionWebhooks.enabled="false" \ + --set controller.kind=DaemonSet \ + --set controller.service.type=ClusterIP \ + --set controller.scope.enabled="false" \ + --set controller.hostNetwork="true" \ + --set controller.ingressClassResource.name=nginx-cluster \ + --set controller.ingressClassResource.controllerValue="k8s.io/ingress-nginx-cluster" \ + --set controller.ingressClassResource.default="true" \ + --set controller.ingressClass=nginx-cluster \ + --set controller.labels.app=ingress-api + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh kube-system + +#NOTE: Deploy namespace ingress +helm upgrade --install ingress-nginx-openstack ingress-nginx/ingress-nginx \ + --version ${HELM_INGRESS_NGINX_VERSION} \ + --namespace=openstack \ + --set controller.admissionWebhooks.enabled="false" \ + --set controller.scope.enabled="true" \ + --set controller.service.enabled="false" \ + --set controller.ingressClassResource.name=nginx \ + --set controller.ingressClassResource.controllerValue="k8s.io/ingress-nginx-openstack" \ + --set controller.ingressClass=nginx \ + --set controller.labels.app=ingress-api + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh openstack + +helm upgrade --install ingress-nginx-ceph ingress-nginx/ingress-nginx \ + --version ${HELM_INGRESS_NGINX_VERSION} \ + --namespace=ceph \ + --set controller.admissionWebhooks.enabled="false" \ + --set controller.scope.enabled="true" \ + --set controller.service.enabled="false" \ + --set controller.ingressClassResource.name=nginx-ceph \ + --set controller.ingressClassResource.controllerValue="k8s.io/ingress-nginx-ceph" \ + --set controller.ingressClass=nginx-ceph \ + --set controller.labels.app=ingress-api + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh ceph + +helm upgrade --install ingress-nginx-osh-infra ingress-nginx/ingress-nginx \ + --version ${HELM_INGRESS_NGINX_VERSION} \ + --namespace=osh-infra \ + --set controller.admissionWebhooks.enabled="false" \ + --set controller.scope.enabled="true" \ + --set controller.service.enabled="false" \ + --set controller.ingressClassResource.name=nginx-osh-infra \ + --set controller.ingressClassResource.controllerValue="k8s.io/ingress-nginx-osh-infra" \ + --set controller.ingressClass=nginx-osh-infra \ + --set controller.labels.app=ingress-api + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh osh-infra diff --git a/tools/deployment/keystone-auth/070-keystone.sh b/tools/deployment/keystone-auth/070-keystone.sh index 4de64a4e0..99e86b240 100755 --- a/tools/deployment/keystone-auth/070-keystone.sh +++ b/tools/deployment/keystone-auth/070-keystone.sh @@ -35,7 +35,7 @@ cd - helm upgrade --install keystone ${OSH_PATH}/keystone \ --namespace=openstack \ --values=${OSH_PATH}/keystone/values_overrides/ldap.yaml \ - --set network.api.ingress.classes.namespace=nginx-openstack \ + --set network.api.ingress.classes.namespace=nginx \ ${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS_KEYSTONE} diff --git a/tools/deployment/mariadb-operator-cluster/070-keystone.sh b/tools/deployment/mariadb-operator-cluster/070-keystone.sh index bafe63241..39f4c6227 100755 --- a/tools/deployment/mariadb-operator-cluster/070-keystone.sh +++ b/tools/deployment/mariadb-operator-cluster/070-keystone.sh @@ -35,7 +35,7 @@ cd - helm upgrade --install keystone ${OSH_PATH}/keystone \ --namespace=openstack \ --values=${OSH_PATH}/keystone/values_overrides/ldap.yaml \ - --set network.api.ingress.classes.namespace=nginx-openstack \ + --set network.api.ingress.classes.namespace=nginx \ --set endpoints.oslo_db.hosts.default=mariadb-server-primary \ ${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS_KEYSTONE} diff --git a/tools/deployment/openstack-support-rook/030-rabbitmq.sh b/tools/deployment/openstack-support-rook/030-rabbitmq.sh index ed871c897..862695d37 100755 --- a/tools/deployment/openstack-support-rook/030-rabbitmq.sh +++ b/tools/deployment/openstack-support-rook/030-rabbitmq.sh @@ -25,7 +25,7 @@ helm upgrade --install rabbitmq ./rabbitmq \ --namespace=openstack \ --recreate-pods \ --force \ - --set network.management.ingress.classes.namespace=nginx-openstack \ + --set network.management.ingress.classes.namespace=nginx \ ${OSH_INFRA_EXTRA_HELM_ARGS} \ ${OSH_INFRA_EXTRA_HELM_ARGS_RABBITMQ} diff --git a/tools/deployment/openstack-support-rook/100-ceph-radosgateway.sh b/tools/deployment/openstack-support-rook/100-ceph-radosgateway.sh index d27b027d6..48f5eb79b 100755 --- a/tools/deployment/openstack-support-rook/100-ceph-radosgateway.sh +++ b/tools/deployment/openstack-support-rook/100-ceph-radosgateway.sh @@ -46,7 +46,7 @@ EOF helm upgrade --install radosgw-openstack ${OSH_INFRA_PATH}/ceph-rgw \ --namespace=openstack \ --values=/tmp/radosgw-openstack.yaml \ - --set network.api.ingress.classes.namespace=nginx-openstack \ + --set network.api.ingress.classes.namespace=nginx \ ${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS_CEPH_RGW} diff --git a/tools/deployment/openstack-support-rook/130-cinder.sh b/tools/deployment/openstack-support-rook/130-cinder.sh index 2f24abf0a..7fdeffa6d 100755 --- a/tools/deployment/openstack-support-rook/130-cinder.sh +++ b/tools/deployment/openstack-support-rook/130-cinder.sh @@ -46,7 +46,7 @@ EOF helm upgrade --install cinder ${OSH_PATH}/cinder \ --namespace=openstack \ --values=/tmp/cinder.yaml \ - --set network.api.ingress.classes.namespace=nginx-openstack \ + --set network.api.ingress.classes.namespace=nginx \ ${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS_CINDER} diff --git a/tools/deployment/openstack-support/030-rabbitmq.sh b/tools/deployment/openstack-support/030-rabbitmq.sh index ed871c897..862695d37 100755 --- a/tools/deployment/openstack-support/030-rabbitmq.sh +++ b/tools/deployment/openstack-support/030-rabbitmq.sh @@ -25,7 +25,7 @@ helm upgrade --install rabbitmq ./rabbitmq \ --namespace=openstack \ --recreate-pods \ --force \ - --set network.management.ingress.classes.namespace=nginx-openstack \ + --set network.management.ingress.classes.namespace=nginx \ ${OSH_INFRA_EXTRA_HELM_ARGS} \ ${OSH_INFRA_EXTRA_HELM_ARGS_RABBITMQ} diff --git a/tools/deployment/openstack-support/100-ceph-radosgateway.sh b/tools/deployment/openstack-support/100-ceph-radosgateway.sh index c2a9becf9..5c127dc54 100755 --- a/tools/deployment/openstack-support/100-ceph-radosgateway.sh +++ b/tools/deployment/openstack-support/100-ceph-radosgateway.sh @@ -34,7 +34,7 @@ network: api: ingress: classes: - namespace: nginx-openstack + namespace: nginx deployment: ceph: true rgw_keystone_user_and_endpoints: true diff --git a/tools/deployment/openstack-support/130-cinder.sh b/tools/deployment/openstack-support/130-cinder.sh index 364dc937b..7cf2d8d62 100755 --- a/tools/deployment/openstack-support/130-cinder.sh +++ b/tools/deployment/openstack-support/130-cinder.sh @@ -46,7 +46,7 @@ EOF helm upgrade --install cinder ${OSH_PATH}/cinder \ --namespace=openstack \ --values=/tmp/cinder.yaml \ - --set network.api.ingress.classes.namespace=nginx-openstack \ + --set network.api.ingress.classes.namespace=nginx \ ${OSH_EXTRA_HELM_ARGS} \ ${OSH_EXTRA_HELM_ARGS_CINDER} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 876e3dd7b..8b9b444f0 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -119,7 +119,7 @@ container_distro_version: focal gate_scripts: - ./tools/deployment/osh-infra-logging/000-prepare-k8s.sh - - ./tools/deployment/osh-infra-logging/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph-rook.sh - ./tools/deployment/ceph/ceph-adapter-rook.sh - ./tools/deployment/osh-infra-logging/040-ldap.sh @@ -145,7 +145,7 @@ gate_scripts: - ./tools/deployment/osh-infra-monitoring/000-prepare-k8s.sh - ./tools/deployment/osh-infra-monitoring/010-deploy-docker-registry.sh - - ./tools/deployment/osh-infra-monitoring/020-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/osh-infra-monitoring/030-nfs-provisioner.sh - ./tools/deployment/osh-infra-monitoring/040-ldap.sh - ./tools/deployment/osh-infra-monitoring/045-mariadb.sh @@ -195,7 +195,7 @@ gate_scripts: - ./tools/deployment/openstack-support/000-prepare-k8s.sh - ./tools/deployment/openstack-support/007-namespace-config.sh - - ./tools/deployment/openstack-support/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph.sh - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - ./tools/deployment/openstack-support/030-rabbitmq.sh @@ -222,7 +222,7 @@ gate_scripts: - ./tools/deployment/openstack-support-rook/000-prepare-k8s.sh - ./tools/deployment/openstack-support-rook/007-namespace-config.sh - - ./tools/deployment/openstack-support-rook/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph-rook.sh - ./tools/deployment/ceph/ceph-adapter-rook.sh - ./tools/deployment/openstack-support-rook/030-rabbitmq.sh @@ -251,7 +251,7 @@ gate_scripts: - ./tools/deployment/openstack-support/000-prepare-k8s.sh - ./tools/deployment/openstack-support/007-namespace-config.sh - - ./tools/deployment/openstack-support/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph.sh - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - ./tools/deployment/openstack-support/030-rabbitmq.sh @@ -279,7 +279,7 @@ gate_scripts: - ./tools/deployment/openstack-support/000-prepare-k8s.sh - ./tools/deployment/openstack-support/007-namespace-config.sh - - ./tools/deployment/openstack-support/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph.sh - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - ./tools/deployment/openstack-support/030-rabbitmq.sh @@ -308,7 +308,7 @@ gate_scripts: - ./tools/deployment/openstack-support/000-prepare-k8s.sh - ./tools/deployment/openstack-support/007-namespace-config.sh - - ./tools/deployment/openstack-support/010-ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/ceph/ceph.sh - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - ./tools/deployment/mariadb-operator-cluster/012-setup-client.sh