You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport (release/3.4) resolution to intermittent WlsSample tests failures due to NGINX download issue (#3181)
* Resolution to intermittent WlsSample tests failures due to NGINX download issue
Co-authored-by: ANTARYAMI.PANIGRAHI@ORACLE.COM <anpanigr@anpanigr-2.subnet1ad3phx.devweblogicphx.oraclevcn.com>
Copy file name to clipboardExpand all lines: kubernetes/samples/charts/util/setupLoadBalancer.sh
+55-30Lines changed: 55 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@
2
2
# Copyright (c) 2018, 2022, Oracle and/or its affiliates.
3
3
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4
4
5
-
# This script create or delete an Ingress controller.
5
+
# This script create or delete an Ingress controller.
6
6
# The script supports ingress controllers: Traefik and Nginx.
7
7
8
8
set -eu
9
9
set -o pipefail
10
10
11
11
UTILDIR="$(dirname "$(readlink -f "$0")")"
12
12
13
-
#Kubernetes command line interface.
14
-
#Default is 'kubectl' if KUBERNETES_CLI env variable is not set.
13
+
#Kubernetes command line interface.
14
+
#Default is 'kubectl' if KUBERNETES_CLI env variable is not set.
15
15
kubernetesCli=${KUBERNETES_CLI:-kubectl}
16
16
17
17
# https://github.com/containous/traefik/releases
@@ -28,6 +28,8 @@ namespace=""
28
28
release=""
29
29
repository=""
30
30
chart=""
31
+
ingressPropFile="ingress.properties"
32
+
skipDeleteNamespace="false"
31
33
32
34
# timestamp
33
35
# purpose: echo timestamp in the form yyyy-mm-ddThh:mm:ss.nnnnnnZ
@@ -60,6 +62,8 @@ usage() {
60
62
-t <ingress type> : ingress type traefik or nginx [required]
61
63
-v <ingress version> : ingress release version
62
64
-n <namespace> : ingress namespace
65
+
-p <ingress-prop> : extra ingress helm properties
66
+
-s : skip deleting ingress namespace
63
67
-m <kubernetes_cli> : Kubernetes command line interface. Default is 'kubectl' if KUBERNETES_CLI env variable is not set. Otherwise default is the value of KUBERNETES_CLI env variable.
64
68
-h : print help
65
69
EOF
@@ -68,26 +72,37 @@ exit $1
68
72
69
73
action_chosen=false
70
74
71
-
whilegetopts"cdt:n:r:v:h" opt;do
75
+
whilegetopts"scdt:p:n:r:v:h" opt;do
72
76
case$optin
73
77
c) action="create"
74
78
if [ $action_chosen="true" ];then
75
79
printError " Both -c (create) and -d (delete) option can not be specified for ingress controller."
76
80
usage 1
77
-
fi
81
+
fi
78
82
action_chosen=true
79
83
;;
80
84
d) action="delete"
81
85
if [ $action_chosen="true" ];then
82
86
printError " Both -c (create) and -d (delete) option can not be specified for ingress controller."
83
87
usage 1
84
-
fi
88
+
fi
85
89
action_chosen=true
86
90
;;
91
+
s) skipDeleteNamespace="true"
92
+
printInfo "Will Skip the Namespace Deletion"
93
+
;;
87
94
n) namespace="${OPTARG}"
88
95
;;
89
96
t) ingressType="${OPTARG}"
90
97
;;
98
+
p) ingressPropFile="${OPTARG}"
99
+
if [ ${action}=="create" ];then
100
+
if [ !-f${ingressPropFile} ];then
101
+
printError "[create] action is choosen but the custom ingress property file [${ingressPropFile}] is missing."
102
+
usage 1
103
+
fi
104
+
fi
105
+
;;
91
106
v) release="${OPTARG}"
92
107
;;
93
108
m) kubernetesCli="${OPTARG}"
@@ -100,23 +115,23 @@ while getopts "cdt:n:r:v:h" opt; do
100
115
done
101
116
102
117
if [ "x${action}"=="x" ];then
103
-
printError "You must specify either -c (create) or -d (delete) ingress controller"
118
+
printError "You must specify either -c (create) or -d (delete) ingress controller"
104
119
usage 1
105
120
fi
106
121
107
122
if [ "x${ingressType}"=="x" ];then
108
123
printError "You must specify ingress type (traefik or nginx) thru -t option"
0 commit comments