From f3286ded3defb29f43d99e1b8020660c4530c86d Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Mon, 29 Jan 2024 19:50:02 -0600 Subject: [PATCH] Use upstream ingress-nginx Change-Id: Iecd53115f4ee2f4dc6ea4f575cfdb4a934aacb1a --- tools/deployment/common/ingress.sh | 66 +++++++++++++++++++++ tools/deployment/component/cinder/cinder.sh | 1 + zuul.d/base.yaml | 17 +++--- 3 files changed, 76 insertions(+), 8 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 0000000000..7b37b2fd5f --- /dev/null +++ b/tools/deployment/common/ingress.sh @@ -0,0 +1,66 @@ +#!/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 diff --git a/tools/deployment/component/cinder/cinder.sh b/tools/deployment/component/cinder/cinder.sh index dfb11e27a0..7fadb66262 100755 --- a/tools/deployment/component/cinder/cinder.sh +++ b/tools/deployment/component/cinder/cinder.sh @@ -61,6 +61,7 @@ EOF helm upgrade --install cinder ./cinder \ --namespace=openstack \ --values=/tmp/cinder.yaml \ + --timeout=600s \ ${OSH_EXTRA_HELM_ARGS:=} \ ${OSH_EXTRA_HELM_ARGS_CINDER} diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 88364f06bd..fed65175b1 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -41,7 +41,8 @@ - ^doc/.*$ - ^releasenotes/.*$ timeout: 7200 - pre-run: tools/gate/playbooks/prepare-hosts.yaml + pre-run: + - tools/gate/playbooks/prepare-hosts.yaml post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml run: - tools/gate/playbooks/deploy-env.yaml @@ -73,7 +74,7 @@ gate_scripts: - ./tools/deployment/common/prepare-k8s.sh - ./tools/deployment/common/setup-client.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - - ./tools/deployment/component/common/rabbitmq.sh - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh @@ -99,7 +100,7 @@ gate_scripts: - ./tools/deployment/common/prepare-k8s.sh - ./tools/deployment/common/setup-client.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - - ./tools/deployment/component/common/rabbitmq.sh - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh @@ -130,7 +131,7 @@ - ./tools/deployment/common/prepare-k8s.sh - ./tools/deployment/common/setup-client.sh - ./tools/deployment/common/cert-manager.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh - ./tools/deployment/component/common/rabbitmq.sh @@ -151,7 +152,7 @@ - ./tools/deployment/common/setup-client.sh - ./tools/deployment/component/ceph/ceph.sh - ./tools/deployment/component/ceph/ceph-ns-activate.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh - ./tools/deployment/component/common/rabbitmq.sh @@ -173,7 +174,7 @@ - ./tools/deployment/common/setup-client.sh - ./tools/deployment/component/ceph/ceph-rook.sh - ./tools/deployment/component/ceph/ceph-adapter-rook.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh - ./tools/deployment/component/common/rabbitmq.sh @@ -208,7 +209,7 @@ gate_scripts: - ./tools/deployment/common/prepare-k8s.sh - ./tools/deployment/common/setup-client.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - export GLANCE_BACKEND=memory; ./tools/deployment/component/common/openstack.sh - ./tools/deployment/common/setup-gateway.sh - - ./tools/deployment/common/use-it.sh @@ -228,7 +229,7 @@ gate_scripts: - ./tools/deployment/common/prepare-k8s.sh - ./tools/deployment/common/setup-client.sh - - ./tools/deployment/component/common/ingress.sh + - ./tools/deployment/common/ingress.sh - ./tools/deployment/component/common/mariadb.sh - ./tools/deployment/component/common/memcached.sh - ./tools/deployment/component/common/rabbitmq.sh