Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.11] Adding the variable KNATIVE_EVENTING_RELEASE_TLS to install latest eventing TLS #351

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@

# Simple header for logging purposes.
function header() {
local upper="$(echo $1 | tr a-z A-Z)"

Check failure on line 166 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:166:- local upper="$(echo $1 | tr a-z A-Z)" library.sh:166:+ local upper="$(echo "$1" | tr a-z A-Z)"
make_banner "=" "${upper}"
}

Expand All @@ -179,7 +179,7 @@

# Checks whether the given function exists.
function function_exists() {
[[ "$(type -t $1)" == "function" ]]

Check failure on line 182 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:182:- [[ "$(type -t $1)" == "function" ]] library.sh:182:+ [[ "$(type -t "$1")" == "function" ]]
}

# GitHub Actions aware output grouping.
Expand Down Expand Up @@ -227,7 +227,7 @@
fi
echo -n "Waiting until ${DESCRIPTION} does not exist"
for i in {1..150}; do # timeout after 5 minutes
if ! kubectl ${KUBECTL_ARGS} > /dev/null 2>&1; then

Check failure on line 230 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:230:- if ! kubectl ${KUBECTL_ARGS} > /dev/null 2>&1; then library.sh:230:+ if ! kubectl "${KUBECTL_ARGS}" > /dev/null 2>&1; then
echo -e "\n${DESCRIPTION} does not exist"
return 0
fi
Expand All @@ -235,7 +235,7 @@
sleep 2
done
echo -e "\n\nERROR: timeout waiting for ${DESCRIPTION} not to exist"
kubectl ${KUBECTL_ARGS}

Check failure on line 238 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:238:- kubectl ${KUBECTL_ARGS} library.sh:238:+ kubectl "${KUBECTL_ARGS}"
return 1
}

Expand All @@ -253,7 +253,7 @@
fi
echo -n "Waiting until ${DESCRIPTION} exists"
for i in {1..150}; do # timeout after 5 minutes
if kubectl ${KUBECTL_ARGS} > /dev/null 2>&1; then

Check failure on line 256 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:256:- if kubectl ${KUBECTL_ARGS} > /dev/null 2>&1; then library.sh:256:+ if kubectl "${KUBECTL_ARGS}" > /dev/null 2>&1; then
echo -e "\n${DESCRIPTION} exists"
return 0
fi
Expand All @@ -261,7 +261,7 @@
sleep 2
done
echo -e "\n\nERROR: timeout waiting for ${DESCRIPTION} to exist"
kubectl ${KUBECTL_ARGS}

Check failure on line 264 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:264:- kubectl ${KUBECTL_ARGS} library.sh:264:+ kubectl "${KUBECTL_ARGS}"
return 1
}

Expand All @@ -276,14 +276,14 @@
for i in {1..150}; do # timeout after 5 minutes
# List all pods. Ignore Terminating pods as those have either been replaced through
# a deployment or terminated on purpose (through chaosduck for example).
local pods="$(kubectl get pods --no-headers -n $1 | grep -v Terminating)"

Check failure on line 279 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:279:- local pods="$(kubectl get pods --no-headers -n $1 | grep -v Terminating)" library.sh:279:+ local pods="$(kubectl get pods --no-headers -n "$1" | grep -v Terminating)"
# All pods must be running (ignore ImagePull error to allow the pod to retry)
local not_running_pods=$(echo "${pods}" | grep -v Running | grep -v Completed | grep -v ErrImagePull | grep -v ImagePullBackOff)
if [[ -n "${pods}" ]] && [[ -z "${not_running_pods}" ]]; then
# All Pods are running or completed. Verify the containers on each Pod.
local all_ready=1
while read pod ; do
local status=(`echo -n ${pod} | cut -f2 -d' ' | tr '/' ' '`)

Check failure on line 286 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:286:- local status=(`echo -n ${pod} | cut -f2 -d' ' | tr '/' ' '`) library.sh:286:+ local status=($(echo -n "${pod}" | cut -f2 -d' ' | tr '/' ' '))
# Set this Pod as the failed_pod. If nothing is wrong with it, then after the checks, set
# failed_pod to the empty string.
failed_pod=$(echo -n "${pod}" | cut -f1 -d' ')
Expand All @@ -310,7 +310,7 @@
echo -e "\n\nERROR: timeout waiting for pods to come up\n${pods}"
if [[ -n "${failed_pod}" ]]; then
echo -e "\n\nFailed Pod (data in YAML format) - ${failed_pod}\n"
kubectl -n $1 get pods "${failed_pod}" -oyaml

Check failure on line 313 in library.sh

View workflow job for this annotation

GitHub Actions / style / suggester / shell

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: library.sh:313:- kubectl -n $1 get pods "${failed_pod}" -oyaml library.sh:313:+ kubectl -n "$1" get pods "${failed_pod}" -oyaml
echo -e "\n\nPod Logs\n"
kubectl -n $1 logs "${failed_pod}" --all-containers
fi
Expand Down Expand Up @@ -1007,3 +1007,4 @@
readonly KNATIVE_SERVING_RELEASE_CORE="$(get_latest_knative_yaml_source "serving" "serving-core")"
readonly KNATIVE_NET_ISTIO_RELEASE="$(get_latest_knative_yaml_source "net-istio" "net-istio")"
readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")"
readonly KNATIVE_EVENTING_RELEASE_TLS="$(get_latest_knative_yaml_source "eventing" "eventing-tls-networking")"
Loading