openstack-helm/tools/deployment/common/ingress.sh
Vladimir Kozhukalov df1c999e41 Utilize OSH plugin for deployment test scripts
Depends-On: I8f30fbdf94d76ef9fa2985a25c033df290995326
Change-Id: I35b3793a660cfc27faf700b9679529b154e41df4
2024-04-20 01:31:03 -05:00

71 lines
2.8 KiB
Bash
Executable File

#!/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
if ! [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])metallb($|[[:space:]]) ]]; then
#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
helm osh wait-for-pods kube-system
fi
#NOTE: Deploy namespace ingress
helm upgrade --install ingress-nginx-openstack ingress-nginx/ingress-nginx \
--version ${HELM_INGRESS_NGINX_VERSION} \
--namespace=openstack \
--set controller.kind=DaemonSet \
--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
helm osh wait-for-pods openstack
helm upgrade --install ingress-nginx-ceph ingress-nginx/ingress-nginx \
--version ${HELM_INGRESS_NGINX_VERSION} \
--namespace=ceph \
--set controller.kind=DaemonSet \
--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
helm osh wait-for-pods ceph