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

Fbnoroot2 #704

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open

Fbnoroot2 #704

wants to merge 38 commits into from

Conversation

gsmith-sas
Copy link
Member

No description provided.

Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 70:
      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                    ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                     ^-------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                            ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n $LOG_NS fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 109:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 110:
kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 150:
kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 151:
kubectl -n $LOG_NS create configmap fbaz-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-env-vars \


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 156:
kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 165:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 166:
kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_azmonitor.sh line 167:
kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n $LOG_NS fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 113:
kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 114:
kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 154:
kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 155:
kubectl -n $LOG_NS create configmap fb-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-env-vars \


In logging/bin/deploy_fluentbit_opensearch.sh line 161:
kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 170:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 171:
kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_opensearch.sh line 172:
kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 195:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 197:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 17:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 18:
      if [ "$cleanup" == "true" ] && [ "$?" == "0" ]; then
                      ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
                                       ^--^ SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
                                        ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
                                            ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.


In logging/fb/migrate_fbstate_db.sh line 20:
         rm -f $newFile
               ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
         rm -f "$newFile"


In logging/fb/migrate_fbstate_db.sh line 29:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n $LOG_NS label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n $LOG_NS label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
@@ -202,7 +200,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -10,20 +10,20 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-      if [ "$cleanup" == "true" ] && [ "$?" == "0" ]; then
-         echo "INFO Deleting [$newFile]"
-         rm -f $newFile
-      fi
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+		if [ "$cleanup" == "true" ] && [ "$?" == "0" ]; then
+			echo "INFO Deleting [$newFile]"
+			rm -f $newFile
+		fi
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


@gsmith-sas gsmith-sas requested a review from ceelias December 16, 2024 19:28
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 70:
      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                    ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                     ^-------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                            ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n $LOG_NS fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 109:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 110:
kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 150:
kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 151:
kubectl -n $LOG_NS create configmap fbaz-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-env-vars \


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 156:
kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 165:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 166:
kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_azmonitor.sh line 167:
kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n $LOG_NS fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 113:
kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 114:
kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 154:
kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 155:
kubectl -n $LOG_NS create configmap fb-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-env-vars \


In logging/bin/deploy_fluentbit_opensearch.sh line 161:
kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 170:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 171:
kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_opensearch.sh line 172:
kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 195:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 197:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n $LOG_NS label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n $LOG_NS label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
@@ -202,7 +200,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 70:
      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                    ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                     ^-------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                            ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n $LOG_NS fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 109:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 110:
kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 150:
kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 151:
kubectl -n $LOG_NS create configmap fbaz-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-env-vars \


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 156:
kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 165:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_azmonitor.sh line 166:
kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_azmonitor.sh line 167:
kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n $LOG_NS fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n $LOG_NS apply -f $FB_CONFIGMAP
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 113:
kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 114:
kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 154:
kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 155:
kubectl -n $LOG_NS create configmap fb-env-vars \
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-env-vars \


In logging/bin/deploy_fluentbit_opensearch.sh line 161:
kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 170:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found


In logging/bin/deploy_fluentbit_opensearch.sh line 171:
kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh


In logging/bin/deploy_fluentbit_opensearch.sh line 172:
kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 195:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 197:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n $LOG_NS create secret generic connection-info-azmonitor --from-literal=customer_id=$AZMONITOR_CUSTOMER_ID --from-literal=shared_key=$AZMONITOR_SHARED_KEY
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n $LOG_NS label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n $LOG_NS fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n $LOG_NS fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n $LOG_NS create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n $LOG_NS create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n $LOG_NS label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n $LOG_NS label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n $LOG_NS create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n $LOG_NS label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n $LOG_NS label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
@@ -202,7 +200,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Collaborator

@ceelias ceelias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very small suggestions, feel free to disregard, overall lgtm!

CHANGELOG.md Outdated Show resolved Hide resolved
logging/bin/deploy_fluentbit_azmonitor.sh Outdated Show resolved Hide resolved
logging/bin/deploy_fluentbit_azmonitor.sh Show resolved Hide resolved
logging/bin/deploy_fluentbit_opensearch.sh Outdated Show resolved Hide resolved
logging/fb/fb_initcontainer_image.template Outdated Show resolved Hide resolved
@@ -6,7 +6,7 @@ data:
[FILTER]
Name modify
Match *
Set fb_configMap_version 0.2.26
Set fb_configMap_version 0.2.27noroot2a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious as to what the “noroot2a” is? Maybe you explained it to me in the call but I can’t recall

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I increment the version number and add some text to help me track changes as I'm fixing things. In our standard end-of-sprint work, we clean things up. So, just prior to creating our next release, this version number will be change 0.2.27. Basically, the stuff after the version number makes it clear there are changes in-flight and helps differentiate which changes have been made. In this particular case, the "noroot" was to make it clear this was related to running FB as a non-root user and the 2a meant this was something like the 3rd variation I tried.

Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n "$LOG_NS" fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n "$LOG_NS" fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 196:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 198:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n "$LOG_NS" label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n "$LOG_NS" label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 log_debug "Pausing to allow migration script to complete"
@@ -203,7 +201,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n "$LOG_NS" fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n "$LOG_NS" fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 196:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 198:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n "$LOG_NS" label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n "$LOG_NS" label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 log_debug "Pausing to allow migration script to complete"
@@ -203,7 +201,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


@gsmith-sas gsmith-sas requested a review from ceelias December 19, 2024 22:31
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n "$LOG_NS" fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n "$LOG_NS" fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 196:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 198:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n "$LOG_NS" label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n "$LOG_NS" label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 log_debug "Pausing to allow migration script to complete"
@@ -203,7 +201,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n "$LOG_NS" fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n "$LOG_NS" fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 196:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 198:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 9:
source bin/tls-include.sh
       ^----------------^ SC1091 (info): Not following: bin/tls-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 10:
source logging/bin/apiaccess-include.sh
       ^-- SC1091 (info): Not following: logging/bin/apiaccess-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 12:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_opensearch.sh line 35:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_opensearch.sh line 42:
generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE"   "$imageKeysFile"  "OS_SYSCTL_"
                                                 ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 60:
if verify_cert_generator $LOG_NS es-transport es-rest es-admin; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if verify_cert_generator "$LOG_NS" es-transport es-rest es-admin; then


In logging/bin/deploy_opensearch.sh line 61:
   log_debug "cert generator check OK [$cert_generator_ok]"
                                       ^----------------^ SC2154 (warning): cert_generator_ok is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 68:
create_tls_certs $LOG_NS logging es-transport es-rest es-admin
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
create_tls_certs "$LOG_NS" logging es-transport es-rest es-admin


In logging/bin/deploy_opensearch.sh line 74:
if [ ! -f  $TMP_DIR/es-transport.pem ]; then
           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ ! -f  "$TMP_DIR"/es-transport.pem ]; then


In logging/bin/deploy_opensearch.sh line 76:
   kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-transport.pem
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > "$TMP_DIR"/es-transport.pem


In logging/bin/deploy_opensearch.sh line 78:
node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
                                                            ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in "$TMP_DIR"/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")


In logging/bin/deploy_opensearch.sh line 80:
if [ ! -f  $TMP_DIR/es-admin.pem ]; then
           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ ! -f  "$TMP_DIR"/es-admin.pem ]; then


In logging/bin/deploy_opensearch.sh line 82:
   kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-admin.pem
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                       ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > "$TMP_DIR"/es-admin.pem


In logging/bin/deploy_opensearch.sh line 84:
admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
                                                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in "$TMP_DIR"/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")


In logging/bin/deploy_opensearch.sh line 89:
kubectl -n $LOG_NS delete secret opensearch-cert-subjects --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret opensearch-cert-subjects --ignore-not-found


In logging/bin/deploy_opensearch.sh line 90:
kubectl -n $LOG_NS create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"


In logging/bin/deploy_opensearch.sh line 91:
kubectl -n $LOG_NS label  secret opensearch-cert-subjects  managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  secret opensearch-cert-subjects  managed-by=v4m-es-script


In logging/bin/deploy_opensearch.sh line 94:
kubectl -n $LOG_NS delete configmap run-securityadmin.sh --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap run-securityadmin.sh --ignore-not-found


In logging/bin/deploy_opensearch.sh line 95:
kubectl -n $LOG_NS create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh


In logging/bin/deploy_opensearch.sh line 96:
kubectl -n $LOG_NS label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch


In logging/bin/deploy_opensearch.sh line 99:
export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)
       ^-----------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                  ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_ADMIN_USER=$(kubectl -n "$LOG_NS" get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 100:
export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)
       ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_ADMIN_PASSWD=$(kubectl -n "$LOG_NS" get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 101:
export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)
       ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_METRICGETTER_USER=$(kubectl -n "$LOG_NS" get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 102:
export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)
       ^--------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_METRICGETTER_PASSWD=$(kubectl -n "$LOG_NS" get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 105:
adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')
                                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
adminpwd_autogenerated=$(kubectl -n "$LOG_NS" get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')


In logging/bin/deploy_opensearch.sh line 106:
if [ ! -z "$adminpwd_autogenerated"  ]; then
     ^-- SC2236 (style): Use -n instead of ! -z.


In logging/bin/deploy_opensearch.sh line 144:
if [ "$(helm -n $LOG_NS list --filter 'opensearch' -q)" == "opensearch" ]; then
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(helm -n "$LOG_NS" list --filter 'opensearch' -q)" == "opensearch" ]; then


In logging/bin/deploy_opensearch.sh line 152:
helm2ReleaseCheck odfe-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck odfe-"$LOG_NS"


In logging/bin/deploy_opensearch.sh line 155:
if [ "$(helm -n $LOG_NS list --filter 'odfe' -q)" == "odfe" ]; then
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(helm -n "$LOG_NS" list --filter 'odfe' -q)" == "odfe" ]; then


In logging/bin/deploy_opensearch.sh line 163:
   if [ "$(helm -n $LOG_NS list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   if [ "$(helm -n "$LOG_NS" list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then


In logging/bin/deploy_opensearch.sh line 185:
      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
                                                                ^-----------^ SC2154 (warning): kb_api_url is referenced but not assigned.
                                                                                         ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                        ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u "$ES_ADMIN_USER":"$ES_ADMIN_PASSWD" -k)


In logging/bin/deploy_opensearch.sh line 200:
      response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
                            ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                         ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                                        ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      response=$(curl -s -o "$KB_GLOBAL_EXPORT_FILE"  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u "$ES_ADMIN_USER":"$ES_ADMIN_PASSWD" -k)


In logging/bin/deploy_opensearch.sh line 204:
         log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
                                                        ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
         log_debug "Failed response details: $(tail -n1 "$KB_GLOBAL_EXPORT_FILE")"


In logging/bin/deploy_opensearch.sh line 208:
         log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
                                               ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
         log_debug "Export details: $(tail -n1 "$KB_GLOBAL_EXPORT_FILE")"


In logging/bin/deploy_opensearch.sh line 223:
   if helm3ReleaseExists v4m-fb $LOG_NS; then
                                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   if helm3ReleaseExists v4m-fb "$LOG_NS"; then


In logging/bin/deploy_opensearch.sh line 225:
      helm -n $LOG_NS delete v4m-fb
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      helm -n "$LOG_NS" delete v4m-fb


In logging/bin/deploy_opensearch.sh line 230:
   helm -n $LOG_NS delete odfe
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm -n "$LOG_NS" delete odfe


In logging/bin/deploy_opensearch.sh line 238:
   source logging/bin/migrate_odfe_pvcs-include.sh
          ^-- SC1091 (info): Not following: logging/bin/migrate_odfe_pvcs-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 252:
if [ -z "$(kubectl -n $LOG_NS get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then
                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ -z "$(kubectl -n "$LOG_NS" get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then


In logging/bin/deploy_opensearch.sh line 254:
   kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" delete secret opensearch-securityconfig --ignore-not-found


In logging/bin/deploy_opensearch.sh line 257:
   mkdir -p $TMP_DIR/opensearch/securityconfig
            ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   mkdir -p "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 258:
   cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
                                              ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   cp logging/opensearch/securityconfig/*.yml "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 263:
      if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      if [ "$(ls "$USER_DIR"/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then


In logging/bin/deploy_opensearch.sh line 265:
        cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
           ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        cp "$USER_DIR"/logging/opensearch/securityconfig/*.yml "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 274:
   kubectl -n $LOG_NS create secret generic opensearch-securityconfig    \
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" create secret generic opensearch-securityconfig    \


In logging/bin/deploy_opensearch.sh line 275:
       --from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml  \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/action_groups.yml  \


In logging/bin/deploy_opensearch.sh line 276:
       --from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml      \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/allowlist.yml      \


In logging/bin/deploy_opensearch.sh line 277:
       --from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml      \
                                 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file whitelist.yml="$TMP_DIR"/opensearch/securityconfig/allowlist.yml      \


In logging/bin/deploy_opensearch.sh line 278:
       --from-file $TMP_DIR/opensearch/securityconfig/config.yml         \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/config.yml         \


In logging/bin/deploy_opensearch.sh line 279:
       --from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/internal_users.yml \


In logging/bin/deploy_opensearch.sh line 280:
       --from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml       \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/nodes_dn.yml       \


In logging/bin/deploy_opensearch.sh line 281:
       --from-file $TMP_DIR/opensearch/securityconfig/roles.yml          \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/roles.yml          \


In logging/bin/deploy_opensearch.sh line 282:
       --from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml  \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/roles_mapping.yml  \


In logging/bin/deploy_opensearch.sh line 283:
       --from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/tenants.yml


In logging/bin/deploy_opensearch.sh line 285:
   kubectl -n $LOG_NS label secret opensearch-securityconfig  managed-by=v4m-es-script
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" label secret opensearch-securityconfig  managed-by=v4m-es-script


In logging/bin/deploy_opensearch.sh line 314:
chart2install="$(get_helmchart_reference $OPENSEARCH_HELM_CHART_REPO $OPENSEARCH_HELM_CHART_NAME $OPENSEARCH_HELM_CHART_VERSION)"
                                         ^-------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^-------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                 ^----------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$OPENSEARCH_HELM_CHART_REPO" "$OPENSEARCH_HELM_CHART_NAME" "$OPENSEARCH_HELM_CHART_VERSION")"


In logging/bin/deploy_opensearch.sh line 315:
versionstring="$(get_helm_versionstring  $OPENSEARCH_HELM_CHART_VERSION)"
                                         ^----------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$OPENSEARCH_HELM_CHART_VERSION")"


In logging/bin/deploy_opensearch.sh line 321:
helm $helmDebug upgrade --install opensearch \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install opensearch \


In logging/bin/deploy_opensearch.sh line 322:
    --namespace $LOG_NS \
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    --namespace "$LOG_NS" \


In logging/bin/deploy_opensearch.sh line 331:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_opensearch.sh line 332:
    $chart2install
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$chart2install"


In logging/bin/deploy_opensearch.sh line 335:
if [ "$deploy_temp_masters" == "true" ]; then
      ^------------------^ SC2154 (warning): deploy_temp_masters is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 340:
   helm $helmDebug upgrade --install opensearch-master \
        ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm "$helmDebug" upgrade --install opensearch-master \


In logging/bin/deploy_opensearch.sh line 341:
       --namespace $LOG_NS \
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --namespace "$LOG_NS" \


In logging/bin/deploy_opensearch.sh line 350:
       --set roles={master} \
                   ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                          ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.


In logging/bin/deploy_opensearch.sh line 354:
       $versionstring \
       ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       "$versionstring" \


In logging/bin/deploy_opensearch.sh line 355:
       $chart2install
       ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       "$chart2install"


In logging/bin/deploy_opensearch.sh line 361:
pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
pvc_status=$(kubectl -n "$LOG_NS" get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 362:
until [ "$pvc_status" == "Bound" ] || (( $pvcCounter>90 ));
                                         ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In logging/bin/deploy_opensearch.sh line 366:
   pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   pvc_status=$(kubectl -n "$LOG_NS" get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 370:
pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
pvc_status=$(kubectl -n "$LOG_NS" get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 381:
kubectl -n $LOG_NS wait pods v4m-search-0 --for=condition=Ready --timeout=10m
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" wait pods v4m-search-0 --for=condition=Ready --timeout=10m


In logging/bin/deploy_opensearch.sh line 395:
   kubectl -n $LOG_NS wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m


In logging/bin/deploy_opensearch.sh line 408:
   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" scale statefulset v4m-master --replicas 1


In logging/bin/deploy_opensearch.sh line 413:
   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" scale statefulset v4m-master --replicas 0


In logging/bin/deploy_opensearch.sh line 418:
   helm -n $LOG_NS delete opensearch-master
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm -n "$LOG_NS" delete opensearch-master


In logging/bin/deploy_opensearch.sh line 424:
   kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found


In logging/bin/deploy_opensearch.sh line 430:
   min_data_nodes=$((odfe_data_pvc_count - 1))
                     ^-----------------^ SC2154 (warning): odfe_data_pvc_count is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 431:
   search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
                                  ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   search_node_count=$(kubectl -n "$LOG_NS" get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)


In logging/bin/deploy_opensearch.sh line 436:
      kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      kubectl -n "$LOG_NS" scale statefulset v4m-search --replicas=$min_data_nodes


In logging/bin/deploy_opensearch.sh line 445:
  kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  kubectl -n "$LOG_NS" exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh


In logging/bin/deploy_opensearch.sh line 447:
  kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  kubectl -n "$LOG_NS" cp v4m-search-0:config/run_securityadmin.log "$TMP_DIR"/run_securityadmin.log -c opensearch


In logging/bin/deploy_opensearch.sh line 448:
  if [ "$(tail -n1  $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
                    ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(tail -n1  "$TMP_DIR"/run_securityadmin.log)" == "Done with success" ]; then


In logging/bin/deploy_opensearch.sh line 454:
  sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  sed 's/^/   | /' "$TMP_DIR"/run_securityadmin.log


In logging/bin/deploy_opensearch.sh line 463:
   disable_sa_token_automount $LOG_NS v4m-os
                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   disable_sa_token_automount "$LOG_NS" v4m-os


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n "$LOG_NS" label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n "$LOG_NS" label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 log_debug "Pausing to allow migration script to complete"
@@ -203,7 +201,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_opensearch.sh.orig logging/bin/deploy_opensearch.sh
--- logging/bin/deploy_opensearch.sh.orig
+++ logging/bin/deploy_opensearch.sh
@@ -9,7 +9,7 @@
 source bin/tls-include.sh
 source logging/bin/apiaccess-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -16,8 +16,8 @@
 ELASTICSEARCH_ENABLE=${ELASTICSEARCH_ENABLE:-true}
 
 if [ "$ELASTICSEARCH_ENABLE" != "true" ]; then
-  log_verbose "Environment variable [ELASTICSEARCH_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenSearch"
-  exit 0
+	log_verbose "Environment variable [ELASTICSEARCH_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenSearch"
+	exit 0
 fi
 
 set -e
@@ -33,14 +33,14 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 #Generate yaml files with all container-related keys
-generateImageKeysFile "$OS_FULL_IMAGE"          "logging/opensearch/os_container_image.template"
-generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE"   "$imageKeysFile"  "OS_SYSCTL_"
-generateImageKeysFile "$OS_FULL_IMAGE"          "logging/opensearch/os_initcontainer_image.template"
+generateImageKeysFile "$OS_FULL_IMAGE" "logging/opensearch/os_container_image.template"
+generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE" "$imageKeysFile" "OS_SYSCTL_"
+generateImageKeysFile "$OS_FULL_IMAGE" "logging/opensearch/os_initcontainer_image.template"
 
 # get credentials
 export ES_ADMIN_PASSWD=${ES_ADMIN_PASSWD}
@@ -49,19 +49,19 @@
 export ES_METRICGETTER_PASSWD=${ES_METRICGETTER_PASSWD}
 
 # Create secrets containing internal user credentials
-create_user_secret internal-user-admin        admin        "$ES_ADMIN_PASSWD"         managed-by=v4m-es-script
-create_user_secret internal-user-kibanaserver kibanaserver "$ES_KIBANASERVER_PASSWD"  managed-by=v4m-es-script
-create_user_secret internal-user-logcollector logcollector "$ES_LOGCOLLECTOR_PASSWD"  managed-by=v4m-es-script
-create_user_secret internal-user-metricgetter metricgetter "$ES_METRICGETTER_PASSWD"  managed-by=v4m-es-script
+create_user_secret internal-user-admin admin "$ES_ADMIN_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-kibanaserver kibanaserver "$ES_KIBANASERVER_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-logcollector logcollector "$ES_LOGCOLLECTOR_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-metricgetter metricgetter "$ES_METRICGETTER_PASSWD" managed-by=v4m-es-script
 
 #cert_generator="${CERT_GENERATOR:-openssl}"
 
 # Verify cert generator is available (if necessary)
 if verify_cert_generator $LOG_NS es-transport es-rest es-admin; then
-   log_debug "cert generator check OK [$cert_generator_ok]"
-else
-   log_error "One or more required TLS certs do not exist and the expected certificate generator mechanism [$CERT_GENERATOR] is not available to create the missing certs"
-   exit 1
+	log_debug "cert generator check OK [$cert_generator_ok]"
+else
+	log_error "One or more required TLS certs do not exist and the expected certificate generator mechanism [$CERT_GENERATOR] is not available to create the missing certs"
+	exit 1
 fi
 
 # Create/Get necessary TLS certs
@@ -71,15 +71,15 @@
 sleep 10
 
 # Get subject from admin and transport cert for opensearch.yaml
-if [ ! -f  $TMP_DIR/es-transport.pem ]; then
-   log_debug "Extracting es-transport cert from secret"
-   kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-transport.pem
+if [ ! -f $TMP_DIR/es-transport.pem ]; then
+	log_debug "Extracting es-transport cert from secret"
+	kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" | base64 --decode >$TMP_DIR/es-transport.pem
 fi
 node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
 
-if [ ! -f  $TMP_DIR/es-admin.pem ]; then
-   log_debug "Extracting es-admin cert from secret"
-   kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-admin.pem
+if [ ! -f $TMP_DIR/es-admin.pem ]; then
+	log_debug "Extracting es-admin cert from secret"
+	kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" | base64 --decode >$TMP_DIR/es-admin.pem
 fi
 admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
 
@@ -87,54 +87,53 @@
 
 #write cert subjects to secret to be mounted as env var
 kubectl -n $LOG_NS delete secret opensearch-cert-subjects --ignore-not-found
-kubectl -n $LOG_NS create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
-kubectl -n $LOG_NS label  secret opensearch-cert-subjects  managed-by=v4m-es-script
+kubectl -n $LOG_NS create secret generic opensearch-cert-subjects --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
+kubectl -n $LOG_NS label secret opensearch-cert-subjects managed-by=v4m-es-script
 
 # Create ConfigMap for securityadmin script
 kubectl -n $LOG_NS delete configmap run-securityadmin.sh --ignore-not-found
 kubectl -n $LOG_NS create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh
-kubectl -n $LOG_NS label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
+kubectl -n $LOG_NS label configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
 
 # Need to retrieve these from secrets in case secrets pre-existed
-export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)
-export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)
-export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)
-export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)
+export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" | base64 --decode)
+export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" | base64 --decode)
+export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" | base64 --decode)
+export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" | base64 --decode)
 
 # Generate message about autogenerated admin password
-adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')
-if [ ! -z "$adminpwd_autogenerated"  ]; then
-   # Print info about how to obtain admin password
-   add_notice "                                                                    "
-   add_notice "**The OpenSearch 'admin' Account**"
-   add_notice "Generated 'admin' password:  $ES_ADMIN_PASSWD                       "
-   add_notice "To change the password for the 'admin' account at any time, run the "
-   add_notice "following command:                                                  "
-   add_notice "                                                                    "
-   add_notice "    logging/bin/change_internal_password.sh admin newPassword       "
-   add_notice "                                                                    "
-   add_notice "NOTE: *NEVER* change the password for the 'admin' account from within the"
-   add_notice "OpenSearch Dashboards web-interface.  The 'admin' password should *ONLY* be changed via "
-   add_notice "the change_internal_password.sh script in the logging/bin sub-directory."
-   add_notice "                                                                    "
-
-   LOGGING_DRIVER=${LOGGING_DRIVER:-false}
-   if [ "$LOGGING_DRIVER" != "true" ]; then
-      echo ""
-      display_notices
-      echo ""
-   fi
-fi
-
+adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin -o jsonpath='{.metadata.labels.autogenerated_password}')
+if [ ! -z "$adminpwd_autogenerated" ]; then
+	# Print info about how to obtain admin password
+	add_notice "                                                                    "
+	add_notice "**The OpenSearch 'admin' Account**"
+	add_notice "Generated 'admin' password:  $ES_ADMIN_PASSWD                       "
+	add_notice "To change the password for the 'admin' account at any time, run the "
+	add_notice "following command:                                                  "
+	add_notice "                                                                    "
+	add_notice "    logging/bin/change_internal_password.sh admin newPassword       "
+	add_notice "                                                                    "
+	add_notice "NOTE: *NEVER* change the password for the 'admin' account from within the"
+	add_notice "OpenSearch Dashboards web-interface.  The 'admin' password should *ONLY* be changed via "
+	add_notice "the change_internal_password.sh script in the logging/bin sub-directory."
+	add_notice "                                                                    "
+
+	LOGGING_DRIVER=${LOGGING_DRIVER:-false}
+	if [ "$LOGGING_DRIVER" != "true" ]; then
+		echo ""
+		display_notices
+		echo ""
+	fi
+fi
 
 # enable debug on Helm via env var
 export HELM_DEBUG="${HELM_DEBUG:-false}"
 
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
-helmRepoAdd opensearch  https://opensearch-project.github.io/helm-charts
+	helmDebug="--debug"
+fi
+
+helmRepoAdd opensearch https://opensearch-project.github.io/helm-charts
 
 ## Commenting out as it might be redundant code
 # log_verbose "Updating Helm repositories"
@@ -142,11 +141,11 @@
 
 # Check for existing OpenSearch helm release
 if [ "$(helm -n $LOG_NS list --filter 'opensearch' -q)" == "opensearch" ]; then
-   log_debug "The Helm release [opensearch] already exists; upgrading the release."
-   existingSearch="true"
-else
-   log_debug "The Helm release [opensearch] does NOT exist; deploying a new release."
-   existingSearch="false"
+	log_debug "The Helm release [opensearch] already exists; upgrading the release."
+	existingSearch="true"
+else
+	log_debug "The Helm release [opensearch] does NOT exist; deploying a new release."
+	existingSearch="false"
 fi
 
 helm2ReleaseCheck odfe-$LOG_NS
@@ -154,138 +153,137 @@
 # Check for existing Open Distro helm release
 if [ "$(helm -n $LOG_NS list --filter 'odfe' -q)" == "odfe" ]; then
 
-   log_info "An existing ODFE-based deployment was detected; migrating to an OpenSearch-based deployment."
-   existingODFE="true"
-
-   #
-   #Migrate Kibana content if upgrading from ODFE 1.7.0
-   #
-   if [ "$(helm -n $LOG_NS list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then
-
-      # Prior to our 1.1.0 release we used ODFE 1.7.0
-      log_info "Migrating content from Open Distro for Elasticsearch 1.7.0"
-
-      #export exisiting content from global tenant
-      #KB_GLOBAL_EXPORT_FILE="$TMP_DIR/kibana_global_content.ndjson"
-
-      log_debug "Exporting exisiting content from global tenant to temporary file [$KB_GLOBAL_EXPORT_FILE]."
-
-      set +e
-
-      #Need to connect to existing ODFE instance:
-      #   *unset vars returned by call to get_kb_api_url to force regeneration
-      #   *pass ODFE-specific values to get_kb_api_url
-      unset kb_api_url
-      unset kbpfpid
-      get_kb_api_url "ODFE" "v4m-es-kibana-svc"  "kibana-svc" "v4m-es-kibana-ing" "false"
-
-      #Need to confirm KB URL works...might not if TLS enabled.
-      #If that's the case, reset things and do it again with TLS=true.
-
-      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
-
-      if [[ $response != 2* ]]; then
-         log_debug "Unable to connect to Kibana using HTTP; will try using HTTPS"
-         stop_kb_portforwarding
-         unset kb_api_url
-         unset kbpfpid
-         get_kb_api_url "ODFE" "v4m-es-kibana-svc"  "kibana-svc" "v4m-es-kibana-ing" "true"
-      else
-         log_debug "Confirmed connection to Kibana"
-      fi
-
-      content2export='{"type": ["config", "url","visualization", "dashboard", "search", "index-pattern"],"excludeExportDetails": false}'
-
-      #The 'kb-xsrf' reference below is correct since we are interacting with ODFE KB
-      response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
-
-      if [[ $response != 2* ]]; then
-         log_warn "There was an issue exporting the existing content from Kibana [$response]"
-         log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
-         #TODO: Exit here?  Display messages as shown?  Add BIG MESSAGE about potential loss of content?
-      else
-         log_info "Content from existing Kibana instance cached for migration. [$response]"
-         log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
-      fi
-
-      #Remove traces of ODFE interaction
-      stop_kb_portforwarding
-      unset kb_api_url
-      unset kbpfpid
-   fi
-
-   #
-   # Upgrade from ODFE to OpenSearch
-   #
-
-   # Remove Fluent Bit Helm release to
-   # avoid losing log messages during transition
-   if helm3ReleaseExists v4m-fb $LOG_NS; then
-      log_debug "Removing the Fluent Bit Helm release"
-      helm -n $LOG_NS delete v4m-fb
-   fi
-
-   # Remove the existing ODFE Helm release
-   log_debug "Removing an existing ODFE Helm release"
-   helm -n $LOG_NS delete odfe
-   sleep 20
-
-   #bypass security setup since 
-   #it was already configured
-   existingSearch=true
-
-   #Migrate PVCs
-   source logging/bin/migrate_odfe_pvcs-include.sh
-else
-   log_debug "No obsolete Helm release of [odfe] was found."
-   existingODFE="false"
-fi
-
+	log_info "An existing ODFE-based deployment was detected; migrating to an OpenSearch-based deployment."
+	existingODFE="true"
+
+	#
+	#Migrate Kibana content if upgrading from ODFE 1.7.0
+	#
+	if [ "$(helm -n $LOG_NS list -o yaml --filter odfe | grep app_version)" == "- app_version: 1.8.0" ]; then
+
+		# Prior to our 1.1.0 release we used ODFE 1.7.0
+		log_info "Migrating content from Open Distro for Elasticsearch 1.7.0"
+
+		#export exisiting content from global tenant
+		#KB_GLOBAL_EXPORT_FILE="$TMP_DIR/kibana_global_content.ndjson"
+
+		log_debug "Exporting exisiting content from global tenant to temporary file [$KB_GLOBAL_EXPORT_FILE]."
+
+		set +e
+
+		#Need to connect to existing ODFE instance:
+		#   *unset vars returned by call to get_kb_api_url to force regeneration
+		#   *pass ODFE-specific values to get_kb_api_url
+		unset kb_api_url
+		unset kbpfpid
+		get_kb_api_url "ODFE" "v4m-es-kibana-svc" "kibana-svc" "v4m-es-kibana-ing" "false"
+
+		#Need to confirm KB URL works...might not if TLS enabled.
+		#If that's the case, reset things and do it again with TLS=true.
+
+		response=$(curl -s -o /dev/null -w "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
+
+		if [[ $response != 2* ]]; then
+			log_debug "Unable to connect to Kibana using HTTP; will try using HTTPS"
+			stop_kb_portforwarding
+			unset kb_api_url
+			unset kbpfpid
+			get_kb_api_url "ODFE" "v4m-es-kibana-svc" "kibana-svc" "v4m-es-kibana-ing" "true"
+		else
+			log_debug "Confirmed connection to Kibana"
+		fi
+
+		content2export='{"type": ["config", "url","visualization", "dashboard", "search", "index-pattern"],"excludeExportDetails": false}'
+
+		#The 'kb-xsrf' reference below is correct since we are interacting with ODFE KB
+		response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE -w "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export" -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
+
+		if [[ $response != 2* ]]; then
+			log_warn "There was an issue exporting the existing content from Kibana [$response]"
+			log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
+			#TODO: Exit here?  Display messages as shown?  Add BIG MESSAGE about potential loss of content?
+		else
+			log_info "Content from existing Kibana instance cached for migration. [$response]"
+			log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
+		fi
+
+		#Remove traces of ODFE interaction
+		stop_kb_portforwarding
+		unset kb_api_url
+		unset kbpfpid
+	fi
+
+	#
+	# Upgrade from ODFE to OpenSearch
+	#
+
+	# Remove Fluent Bit Helm release to
+	# avoid losing log messages during transition
+	if helm3ReleaseExists v4m-fb $LOG_NS; then
+		log_debug "Removing the Fluent Bit Helm release"
+		helm -n $LOG_NS delete v4m-fb
+	fi
+
+	# Remove the existing ODFE Helm release
+	log_debug "Removing an existing ODFE Helm release"
+	helm -n $LOG_NS delete odfe
+	sleep 20
+
+	#bypass security setup since
+	#it was already configured
+	existingSearch=true
+
+	#Migrate PVCs
+	source logging/bin/migrate_odfe_pvcs-include.sh
+else
+	log_debug "No obsolete Helm release of [odfe] was found."
+	existingODFE="false"
+fi
 
 # OpenSearch user customizations
 ES_OPEN_USER_YAML="${ES_OPEN_USER_YAML:-$USER_DIR/logging/user-values-opensearch.yaml}"
 if [ ! -f "$ES_OPEN_USER_YAML" ]; then
-  log_debug "[$ES_OPEN_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  ES_OPEN_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$ES_OPEN_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	ES_OPEN_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -z "$(kubectl -n $LOG_NS get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then
 
-   kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
-
-   #Copy OpenSearch Security Configuration files
-   mkdir -p $TMP_DIR/opensearch/securityconfig
-   cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
-   #Overlay OpenSearch security configuration files from USER_DIR (if exists)
-   if [ -d "$USER_DIR/logging/opensearch/securityconfig" ]; then
-      log_debug "OpenSearch Security Configuration directory found w/in USER_DIR [$USER_DIR]"
-
-      if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
-        log_info "Copying OpenSearch Security Configuration files from [$USER_DIR/logging/opensearch/securityconfig]"
-        cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
-      else
-         log_debug "No YAML (*.yml) files found in USER_DIR/opensearch/securityconfig directory"
-      fi
-   fi
-
-   #create secret containing OpenSearch security configuration yaml files
-   #NOTE: whitelist.yml file is only created due to apparent bug in OpenSearch
-   #      which causes an ERROR when securityAdmin.sh is run without it 
-   kubectl -n $LOG_NS create secret generic opensearch-securityconfig    \
-       --from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml  \
-       --from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml      \
-       --from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml      \
-       --from-file $TMP_DIR/opensearch/securityconfig/config.yml         \
-       --from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
-       --from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml       \
-       --from-file $TMP_DIR/opensearch/securityconfig/roles.yml          \
-       --from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml  \
-       --from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
-
-   kubectl -n $LOG_NS label secret opensearch-securityconfig  managed-by=v4m-es-script
-
-else
-   log_verbose "Using existing secret [opensearch-securityconfig] for OpenSearch Security Configuration"
+	kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
+
+	#Copy OpenSearch Security Configuration files
+	mkdir -p $TMP_DIR/opensearch/securityconfig
+	cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
+	#Overlay OpenSearch security configuration files from USER_DIR (if exists)
+	if [ -d "$USER_DIR/logging/opensearch/securityconfig" ]; then
+		log_debug "OpenSearch Security Configuration directory found w/in USER_DIR [$USER_DIR]"
+
+		if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
+			log_info "Copying OpenSearch Security Configuration files from [$USER_DIR/logging/opensearch/securityconfig]"
+			cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
+		else
+			log_debug "No YAML (*.yml) files found in USER_DIR/opensearch/securityconfig directory"
+		fi
+	fi
+
+	#create secret containing OpenSearch security configuration yaml files
+	#NOTE: whitelist.yml file is only created due to apparent bug in OpenSearch
+	#      which causes an ERROR when securityAdmin.sh is run without it
+	kubectl -n $LOG_NS create secret generic opensearch-securityconfig \
+		--from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml \
+		--from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/config.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/roles.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
+
+	kubectl -n $LOG_NS label secret opensearch-securityconfig managed-by=v4m-es-script
+
+else
+	log_verbose "Using existing secret [opensearch-securityconfig] for OpenSearch Security Configuration"
 fi
 
 # OpenSearch
@@ -296,83 +294,79 @@
 
 # Optional workload node placement support
 if [ "$LOG_NODE_PLACEMENT_ENABLE" == "true" ]; then
-  log_verbose "Enabling OpenSearch for workload node placement"
-  wnpValuesFile="logging/node-placement/values-opensearch-wnp.yaml"
-else
-  log_debug "Workload node placement support is disabled for OpenSearch"
-  wnpValuesFile="$TMP_DIR/empty.yaml"
+	log_verbose "Enabling OpenSearch for workload node placement"
+	wnpValuesFile="logging/node-placement/values-opensearch-wnp.yaml"
+else
+	log_debug "Workload node placement support is disabled for OpenSearch"
+	wnpValuesFile="$TMP_DIR/empty.yaml"
 fi
 
 OPENSHIFT_SPECIFIC_YAML=$TMP_DIR/empty.yaml
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-    OPENSHIFT_SPECIFIC_YAML=logging/openshift/values-opensearch-openshift.yaml
-fi
-
+	OPENSHIFT_SPECIFIC_YAML=logging/openshift/values-opensearch-openshift.yaml
+fi
 
 # Get Helm Chart Name
 log_debug "OpenSearch Helm Chart: repo [$OPENSEARCH_HELM_CHART_REPO] name [$OPENSEARCH_HELM_CHART_NAME] version [$OPENSEARCH_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $OPENSEARCH_HELM_CHART_REPO $OPENSEARCH_HELM_CHART_NAME $OPENSEARCH_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $OPENSEARCH_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $OPENSEARCH_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
-
 # Deploy OpenSearch via Helm chart
 # NOTE: nodeGroup needed to get resource names we want
 helm $helmDebug upgrade --install opensearch \
-    --namespace $LOG_NS \
-    --values "$imageKeysFile" \
-    --values logging/opensearch/opensearch_helm_values.yaml \
-    --values "$wnpValuesFile" \
-    --values "$ES_OPEN_USER_YAML" \
-    --values "$OPENSHIFT_SPECIFIC_YAML" \
-    --set nodeGroup=primary  \
-    --set masterService=v4m-search \
-    --set fullnameOverride=v4m-search \
-    $versionstring \
-    $chart2install
-
-# ODFE => OpenSearch Migration
-if [ "$deploy_temp_masters" == "true" ]; then
-
-   #NOTE: rbac.create set to 'false' since ServiceAccount
-   #      was created during prior Helm chart deployment
-   log_debug "Upgrade from ODFE to OpenSearch detected; creating temporary master-only nodes."
-   helm $helmDebug upgrade --install opensearch-master \
-       --namespace $LOG_NS \
-       --values logging/opensearch/opensearch_helm_values.yaml \
-       --values "$imageKeysFile" \
-       --values "$wnpValuesFile" \
-       --values "$ES_OPEN_USER_YAML" \
-       --values "$OPENSHIFT_SPECIFIC_YAML" \
-       --set nodeGroup=temp_masters  \
-       --set ingress.enabled=false \
-       --set replicas=2 \
-       --set roles={master} \
-       --set rbac.create=false \
-       --set masterService=v4m-search \
-       --set fullnameOverride=v4m-master \
-       $versionstring \
-       $chart2install
-fi
-
+	--namespace $LOG_NS \
+	--values "$imageKeysFile" \
+	--values logging/opensearch/opensearch_helm_values.yaml \
+	--values "$wnpValuesFile" \
+	--values "$ES_OPEN_USER_YAML" \
+	--values "$OPENSHIFT_SPECIFIC_YAML" \
+	--set nodeGroup=primary \
+	--set masterService=v4m-search \
+	--set fullnameOverride=v4m-search \
+	$versionstring \
+	$chart2install
+
+# ODFE => OpenSearch Migration
+if [ "$deploy_temp_masters" == "true" ]; then
+
+	#NOTE: rbac.create set to 'false' since ServiceAccount
+	#      was created during prior Helm chart deployment
+	log_debug "Upgrade from ODFE to OpenSearch detected; creating temporary master-only nodes."
+	helm $helmDebug upgrade --install opensearch-master \
+		--namespace $LOG_NS \
+		--values logging/opensearch/opensearch_helm_values.yaml \
+		--values "$imageKeysFile" \
+		--values "$wnpValuesFile" \
+		--values "$ES_OPEN_USER_YAML" \
+		--values "$OPENSHIFT_SPECIFIC_YAML" \
+		--set nodeGroup=temp_masters \
+		--set ingress.enabled=false \
+		--set replicas=2 \
+		--set roles={master} \
+		--set rbac.create=false \
+		--set masterService=v4m-search \
+		--set fullnameOverride=v4m-master \
+		$versionstring \
+		$chart2install
+fi
 
 # waiting for PVCs to be bound
 declare -i pvcCounter=0
-pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
-until [ "$pvc_status" == "Bound" ] || (( $pvcCounter>90 ));
-do
-   sleep 5
-   pvcCounter=$((pvcCounter+5))
-   pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+until [ "$pvc_status" == "Bound" ] || ((pvcCounter > 90)); do
+	sleep 5
+	pvcCounter=$((pvcCounter + 5))
+	pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
 done
 
 # Confirm PVC is "bound" (matched) to PV
-pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
-if [ "$pvc_status" != "Bound" ];  then
-      log_error "It appears that the PVC [v4m-search-v4m-search-0] associated with the [v4m-search-0] node has not been bound to a PV."
-      log_error "The status of the PVC is [$pvc_status]"
-      log_error "After ensuring all claims shown as Pending can be satisfied; run the remove_opensearch.sh script and try again."
-      exit 1
+pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+if [ "$pvc_status" != "Bound" ]; then
+	log_error "It appears that the PVC [v4m-search-v4m-search-0] associated with the [v4m-search-0] node has not been bound to a PV."
+	log_error "The status of the PVC is [$pvc_status]"
+	log_error "After ensuring all claims shown as Pending can be satisfied; run the remove_opensearch.sh script and try again."
+	exit 1
 fi
 log_verbose "The PVC [v4m-search-v4m-search-0] have been bound to PVs"
 
@@ -380,9 +374,8 @@
 log_info "Waiting on OpenSearch pods to be Ready"
 kubectl -n $LOG_NS wait pods v4m-search-0 --for=condition=Ready --timeout=10m
 
-
 # TO DO: Convert to curl command to detect ES is up?
-# hitting https:/host:port -u adminuser:adminpwd --insecure 
+# hitting https:/host:port -u adminuser:adminpwd --insecure
 # returns "OpenDistro Security not initialized." and 503 when up
 log_verbose "Waiting [2] minutes to allow OpenSearch to initialize [$(date)]"
 sleep 120
@@ -390,51 +383,50 @@
 # ODFE => OpenSearch Migration
 if [ "$deploy_temp_masters" == "true" ]; then
 
-   log_verbose "Upgrade to OpenSearch from Open Distro for Elasticsearch processing continues..."
-   log_info "Waiting up to [3] minutes for 'master-only' ES pods to be Ready [$(date)]"
-   kubectl -n $LOG_NS wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
-
-   #TODO: Remove 'master-only' nodes from list of 'master-eligible' ES nodes via API call?
-   # get_es_api_url
-   # curl call to remove 'master-only' nodes from list of 'master-eligible' nodes
-   # curl -X POST $es_api_url/_cluster/voting_config_exclusions?node_names=v4m-master-0,v4m-master-1,v4m-master-2
-   # sleep 60
-   # Probably (?) can skip the scale down and just uninstall Helm release
-
-
-   # Scale down master statefulset by 1 (to 1)
-   log_debug "Removing 'master-only' ES nodes needed only during upgrade to OpenSearch"
-
-   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
-   ## wait for 1 minute (probably excessive, but...)
-   sleep 30
-
-   #Scale down master statefulset by 1 (to 0)
-   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
-   ##wait for 1 minute (probably excessive, but...)
-   sleep 30
-
-   #uninstall the Helm release
-   helm -n $LOG_NS delete opensearch-master
-   ##wait for 30 secs? 1 min?
-   sleep 30
-
-   #Delete "master" PVCs
-   ## Add labels?  Appears labels were overwritten by Helm chart
-   kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
+	log_verbose "Upgrade to OpenSearch from Open Distro for Elasticsearch processing continues..."
+	log_info "Waiting up to [3] minutes for 'master-only' ES pods to be Ready [$(date)]"
+	kubectl -n $LOG_NS wait pods -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
+
+	#TODO: Remove 'master-only' nodes from list of 'master-eligible' ES nodes via API call?
+	# get_es_api_url
+	# curl call to remove 'master-only' nodes from list of 'master-eligible' nodes
+	# curl -X POST $es_api_url/_cluster/voting_config_exclusions?node_names=v4m-master-0,v4m-master-1,v4m-master-2
+	# sleep 60
+	# Probably (?) can skip the scale down and just uninstall Helm release
+
+	# Scale down master statefulset by 1 (to 1)
+	log_debug "Removing 'master-only' ES nodes needed only during upgrade to OpenSearch"
+
+	kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
+	## wait for 1 minute (probably excessive, but...)
+	sleep 30
+
+	#Scale down master statefulset by 1 (to 0)
+	kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
+	##wait for 1 minute (probably excessive, but...)
+	sleep 30
+
+	#uninstall the Helm release
+	helm -n $LOG_NS delete opensearch-master
+	##wait for 30 secs? 1 min?
+	sleep 30
+
+	#Delete "master" PVCs
+	## Add labels?  Appears labels were overwritten by Helm chart
+	kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
 fi
 
 # Reconcile count of 'data' nodes
 if [ "$existingODFE" == "true" ]; then
 
-   min_data_nodes=$((odfe_data_pvc_count - 1))
-   search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
-
-   if [ "$search_node_count" -gt "0" ] && [ "$min_data_nodes" -gt "0" ] && [ "$search_node_count" -lt "$min_data_nodes" ]; then
-      log_warn "There were insufficient OpenSearch nodes [$search_node_count] configured to handle all of the data from the original ODFE 'data' nodes"
-      log_warn "This OpenSearch cluster has been scaled up to [$min_data_nodes] nodes to ensure no loss of data."
-      kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
-   fi
+	min_data_nodes=$((odfe_data_pvc_count - 1))
+	search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
+
+	if [ "$search_node_count" -gt "0" ] && [ "$min_data_nodes" -gt "0" ] && [ "$search_node_count" -lt "$min_data_nodes" ]; then
+		log_warn "There were insufficient OpenSearch nodes [$search_node_count] configured to handle all of the data from the original ODFE 'data' nodes"
+		log_warn "This OpenSearch cluster has been scaled up to [$min_data_nodes] nodes to ensure no loss of data."
+		kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
+	fi
 fi
 
 set +e
@@ -442,18 +434,18 @@
 # Run the security admin script on the pod
 # Add some logic to find ES release
 if [ "$existingSearch" == "false" ] && [ "$existingODFE" != "true" ]; then
-  kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
-  # Retrieve log file from security admin script
-  kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
-  if [ "$(tail -n1  $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
-    log_verbose "The run_securityadmin.log script appears to have run successfully; you can review its output below:"
-  else
-    log_warn "There may have been a problem with the run_securityadmin.log script; review the output below:"
-  fi
-  # show output from run_securityadmin.sh script
-  sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
-else
-  log_verbose "Existing OpenSearch release found. Skipping OpenSearch security initialization."
+	kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
+	# Retrieve log file from security admin script
+	kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
+	if [ "$(tail -n1 $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
+		log_verbose "The run_securityadmin.log script appears to have run successfully; you can review its output below:"
+	else
+		log_warn "There may have been a problem with the run_securityadmin.log script; review the output below:"
+	fi
+	# show output from run_securityadmin.sh script
+	sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
+else
+	log_verbose "Existing OpenSearch release found. Skipping OpenSearch security initialization."
 fi
 
 set -e
@@ -460,8 +452,8 @@
 
 #Container Security: Disable serviceAccount Token Automounting
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-   disable_sa_token_automount $LOG_NS v4m-os
-   #NOTE: On other providers, OpenSearch pods linked to the 'default' serviceAccount
+	disable_sa_token_automount $LOG_NS v4m-os
+	#NOTE: On other providers, OpenSearch pods linked to the 'default' serviceAccount
 fi
 
 log_info "OpenSearch has been deployed"
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck -e SC1004' returned error 1 finding the following syntactical issues:

----------

In logging/bin/deploy_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_azmonitor.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_azmonitor.sh line 29:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_azmonitor.sh line 34:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 59:
log_info "Using FB ConfigMap:" $FB_CONFIGMAP
                               ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_info "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 63:
if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 78:
   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
          ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 79:
   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In logging/bin/deploy_fluentbit_azmonitor.sh line 83:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 85:
   helm  $helmDebug  delete -n "$LOG_NS" fbaz
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 87:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 89:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_azmonitor.sh line 106:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_azmonitor.sh line 128:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_azmonitor.sh line 131:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_azmonitor.sh line 152:
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
                                                            ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 159:
if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_azmonitor.sh line 172:
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 173:
 versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                          ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
 versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_azmonitor.sh line 177:
helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install v4m-fbaz  --namespace "$LOG_NS"  \


In logging/bin/deploy_fluentbit_azmonitor.sh line 178:
  $versionstring \
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$versionstring" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 179:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 181:
  --values $FB_AZMONITOR_USER_YAML \
           ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_AZMONITOR_USER_YAML" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 182:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_azmonitor.sh line 184:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_azmonitor.sh line 190:
disable_sa_token_automount $LOG_NS v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fbaz


In logging/bin/deploy_fluentbit_azmonitor.sh line 192:
enable_pod_token_automount $LOG_NS daemonset v4m-fbaz
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fbaz


In logging/bin/deploy_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_fluentbit_opensearch.sh line 10:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_fluentbit_opensearch.sh line 31:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 53:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/deploy_fluentbit_opensearch.sh line 56:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/deploy_fluentbit_opensearch.sh line 58:
   helm  $helmDebug  delete -n "$LOG_NS" fb
         ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm  "$helmDebug"  delete -n "$LOG_NS" fb


In logging/bin/deploy_fluentbit_opensearch.sh line 60:
   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
        ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 62:
   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
          ^-- SC2046 (warning): Quote this to prevent word splitting.


In logging/bin/deploy_fluentbit_opensearch.sh line 99:
log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
                                ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
log_debug "Using FB ConfigMap:" "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 110:
kubectl -n "$LOG_NS" apply -f $FB_CONFIGMAP
                              ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" apply -f "$FB_CONFIGMAP"


In logging/bin/deploy_fluentbit_opensearch.sh line 132:
KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
^-----------------------^ SC2269 (info): This variable is assigned to itself, so the assignment does nothing.


In logging/bin/deploy_fluentbit_opensearch.sh line 135:
   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
                              ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                                                                                             ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.

Did you mean: 
   runtime=$(kubectl get node "$somenode" -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')


In logging/bin/deploy_fluentbit_opensearch.sh line 164:
if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$( kubectl -n "$LOG_NS" get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then


In logging/bin/deploy_fluentbit_opensearch.sh line 176:
chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                    ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                               ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$FLUENTBIT_HELM_CHART_REPO" "$FLUENTBIT_HELM_CHART_NAME" "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 177:
versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
                                         ^---------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$FLUENTBIT_HELM_CHART_VERSION")"


In logging/bin/deploy_fluentbit_opensearch.sh line 181:
helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install --namespace "$LOG_NS" v4m-fb  \


In logging/bin/deploy_fluentbit_opensearch.sh line 182:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_fluentbit_opensearch.sh line 183:
  --values $imageKeysFile \
           ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.
           ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$imageKeysFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 185:
  --values $openshiftValuesFile \
           ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$openshiftValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 186:
  --values $tracingValuesFile \
           ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$tracingValuesFile" \


In logging/bin/deploy_fluentbit_opensearch.sh line 187:
  --values $FB_OPENSEARCH_USER_YAML   \
           ^----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  --values "$FB_OPENSEARCH_USER_YAML"   \


In logging/bin/deploy_fluentbit_opensearch.sh line 189:
  $chart2install
  ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  "$chart2install"


In logging/bin/deploy_fluentbit_opensearch.sh line 196:
disable_sa_token_automount $LOG_NS v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
disable_sa_token_automount "$LOG_NS" v4m-fb


In logging/bin/deploy_fluentbit_opensearch.sh line 198:
enable_pod_token_automount $LOG_NS daemonset v4m-fb
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
enable_pod_token_automount "$LOG_NS" daemonset v4m-fb


In logging/bin/deploy_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.."


In logging/bin/deploy_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 8:
source logging/bin/secrets-include.sh
       ^----------------------------^ SC1091 (info): Not following: logging/bin/secrets-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 9:
source bin/tls-include.sh
       ^----------------^ SC1091 (info): Not following: bin/tls-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 10:
source logging/bin/apiaccess-include.sh
       ^-- SC1091 (info): Not following: logging/bin/apiaccess-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 12:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_opensearch.sh line 35:
if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(kubectl get ns "$LOG_NS" -o name 2>/dev/null)" == "" ]; then


In logging/bin/deploy_opensearch.sh line 42:
generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE"   "$imageKeysFile"  "OS_SYSCTL_"
                                                 ^------------^ SC2154 (warning): imageKeysFile is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 60:
if verify_cert_generator $LOG_NS es-transport es-rest es-admin; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if verify_cert_generator "$LOG_NS" es-transport es-rest es-admin; then


In logging/bin/deploy_opensearch.sh line 61:
   log_debug "cert generator check OK [$cert_generator_ok]"
                                       ^----------------^ SC2154 (warning): cert_generator_ok is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 68:
create_tls_certs $LOG_NS logging es-transport es-rest es-admin
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
create_tls_certs "$LOG_NS" logging es-transport es-rest es-admin


In logging/bin/deploy_opensearch.sh line 74:
if [ ! -f  $TMP_DIR/es-transport.pem ]; then
           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ ! -f  "$TMP_DIR"/es-transport.pem ]; then


In logging/bin/deploy_opensearch.sh line 76:
   kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-transport.pem
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > "$TMP_DIR"/es-transport.pem


In logging/bin/deploy_opensearch.sh line 78:
node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
                                                            ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in "$TMP_DIR"/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")


In logging/bin/deploy_opensearch.sh line 80:
if [ ! -f  $TMP_DIR/es-admin.pem ]; then
           ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ ! -f  "$TMP_DIR"/es-admin.pem ]; then


In logging/bin/deploy_opensearch.sh line 82:
   kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-admin.pem
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                       ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > "$TMP_DIR"/es-admin.pem


In logging/bin/deploy_opensearch.sh line 84:
admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
                                                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in "$TMP_DIR"/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")


In logging/bin/deploy_opensearch.sh line 89:
kubectl -n $LOG_NS delete secret opensearch-cert-subjects --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret opensearch-cert-subjects --ignore-not-found


In logging/bin/deploy_opensearch.sh line 90:
kubectl -n $LOG_NS create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"


In logging/bin/deploy_opensearch.sh line 91:
kubectl -n $LOG_NS label  secret opensearch-cert-subjects  managed-by=v4m-es-script
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  secret opensearch-cert-subjects  managed-by=v4m-es-script


In logging/bin/deploy_opensearch.sh line 94:
kubectl -n $LOG_NS delete configmap run-securityadmin.sh --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap run-securityadmin.sh --ignore-not-found


In logging/bin/deploy_opensearch.sh line 95:
kubectl -n $LOG_NS create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh


In logging/bin/deploy_opensearch.sh line 96:
kubectl -n $LOG_NS label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch


In logging/bin/deploy_opensearch.sh line 99:
export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)
       ^-----------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                  ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_ADMIN_USER=$(kubectl -n "$LOG_NS" get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 100:
export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)
       ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_ADMIN_PASSWD=$(kubectl -n "$LOG_NS" get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 101:
export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)
       ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_METRICGETTER_USER=$(kubectl -n "$LOG_NS" get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 102:
export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)
       ^--------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
export ES_METRICGETTER_PASSWD=$(kubectl -n "$LOG_NS" get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)


In logging/bin/deploy_opensearch.sh line 105:
adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')
                                    ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
adminpwd_autogenerated=$(kubectl -n "$LOG_NS" get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')


In logging/bin/deploy_opensearch.sh line 106:
if [ ! -z "$adminpwd_autogenerated"  ]; then
     ^-- SC2236 (style): Use -n instead of ! -z.


In logging/bin/deploy_opensearch.sh line 144:
if [ "$(helm -n $LOG_NS list --filter 'opensearch' -q)" == "opensearch" ]; then
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(helm -n "$LOG_NS" list --filter 'opensearch' -q)" == "opensearch" ]; then


In logging/bin/deploy_opensearch.sh line 152:
helm2ReleaseCheck odfe-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck odfe-"$LOG_NS"


In logging/bin/deploy_opensearch.sh line 155:
if [ "$(helm -n $LOG_NS list --filter 'odfe' -q)" == "odfe" ]; then
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ "$(helm -n "$LOG_NS" list --filter 'odfe' -q)" == "odfe" ]; then


In logging/bin/deploy_opensearch.sh line 163:
   if [ "$(helm -n $LOG_NS list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   if [ "$(helm -n "$LOG_NS" list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then


In logging/bin/deploy_opensearch.sh line 185:
      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
                                                                ^-----------^ SC2154 (warning): kb_api_url is referenced but not assigned.
                                                                                         ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                        ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u "$ES_ADMIN_USER":"$ES_ADMIN_PASSWD" -k)


In logging/bin/deploy_opensearch.sh line 200:
      response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
                            ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                         ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                                        ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      response=$(curl -s -o "$KB_GLOBAL_EXPORT_FILE"  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u "$ES_ADMIN_USER":"$ES_ADMIN_PASSWD" -k)


In logging/bin/deploy_opensearch.sh line 204:
         log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
                                                        ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
         log_debug "Failed response details: $(tail -n1 "$KB_GLOBAL_EXPORT_FILE")"


In logging/bin/deploy_opensearch.sh line 208:
         log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
                                               ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
         log_debug "Export details: $(tail -n1 "$KB_GLOBAL_EXPORT_FILE")"


In logging/bin/deploy_opensearch.sh line 223:
   if helm3ReleaseExists v4m-fb $LOG_NS; then
                                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   if helm3ReleaseExists v4m-fb "$LOG_NS"; then


In logging/bin/deploy_opensearch.sh line 225:
      helm -n $LOG_NS delete v4m-fb
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      helm -n "$LOG_NS" delete v4m-fb


In logging/bin/deploy_opensearch.sh line 230:
   helm -n $LOG_NS delete odfe
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm -n "$LOG_NS" delete odfe


In logging/bin/deploy_opensearch.sh line 238:
   source logging/bin/migrate_odfe_pvcs-include.sh
          ^-- SC1091 (info): Not following: logging/bin/migrate_odfe_pvcs-include.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_opensearch.sh line 252:
if [ -z "$(kubectl -n $LOG_NS get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then
                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if [ -z "$(kubectl -n "$LOG_NS" get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then


In logging/bin/deploy_opensearch.sh line 254:
   kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" delete secret opensearch-securityconfig --ignore-not-found


In logging/bin/deploy_opensearch.sh line 257:
   mkdir -p $TMP_DIR/opensearch/securityconfig
            ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   mkdir -p "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 258:
   cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
                                              ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   cp logging/opensearch/securityconfig/*.yml "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 263:
      if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
                 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      if [ "$(ls "$USER_DIR"/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then


In logging/bin/deploy_opensearch.sh line 265:
        cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
           ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        cp "$USER_DIR"/logging/opensearch/securityconfig/*.yml "$TMP_DIR"/opensearch/securityconfig


In logging/bin/deploy_opensearch.sh line 274:
   kubectl -n $LOG_NS create secret generic opensearch-securityconfig    \
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" create secret generic opensearch-securityconfig    \


In logging/bin/deploy_opensearch.sh line 275:
       --from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml  \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/action_groups.yml  \


In logging/bin/deploy_opensearch.sh line 276:
       --from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml      \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/allowlist.yml      \


In logging/bin/deploy_opensearch.sh line 277:
       --from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml      \
                                 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file whitelist.yml="$TMP_DIR"/opensearch/securityconfig/allowlist.yml      \


In logging/bin/deploy_opensearch.sh line 278:
       --from-file $TMP_DIR/opensearch/securityconfig/config.yml         \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/config.yml         \


In logging/bin/deploy_opensearch.sh line 279:
       --from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/internal_users.yml \


In logging/bin/deploy_opensearch.sh line 280:
       --from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml       \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/nodes_dn.yml       \


In logging/bin/deploy_opensearch.sh line 281:
       --from-file $TMP_DIR/opensearch/securityconfig/roles.yml          \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/roles.yml          \


In logging/bin/deploy_opensearch.sh line 282:
       --from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml  \
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/roles_mapping.yml  \


In logging/bin/deploy_opensearch.sh line 283:
       --from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --from-file "$TMP_DIR"/opensearch/securityconfig/tenants.yml


In logging/bin/deploy_opensearch.sh line 285:
   kubectl -n $LOG_NS label secret opensearch-securityconfig  managed-by=v4m-es-script
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" label secret opensearch-securityconfig  managed-by=v4m-es-script


In logging/bin/deploy_opensearch.sh line 314:
chart2install="$(get_helmchart_reference $OPENSEARCH_HELM_CHART_REPO $OPENSEARCH_HELM_CHART_NAME $OPENSEARCH_HELM_CHART_VERSION)"
                                         ^-------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                     ^-------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                                 ^----------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chart2install="$(get_helmchart_reference "$OPENSEARCH_HELM_CHART_REPO" "$OPENSEARCH_HELM_CHART_NAME" "$OPENSEARCH_HELM_CHART_VERSION")"


In logging/bin/deploy_opensearch.sh line 315:
versionstring="$(get_helm_versionstring  $OPENSEARCH_HELM_CHART_VERSION)"
                                         ^----------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
versionstring="$(get_helm_versionstring  "$OPENSEARCH_HELM_CHART_VERSION")"


In logging/bin/deploy_opensearch.sh line 321:
helm $helmDebug upgrade --install opensearch \
     ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm "$helmDebug" upgrade --install opensearch \


In logging/bin/deploy_opensearch.sh line 322:
    --namespace $LOG_NS \
                ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    --namespace "$LOG_NS" \


In logging/bin/deploy_opensearch.sh line 331:
    $versionstring \
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$versionstring" \


In logging/bin/deploy_opensearch.sh line 332:
    $chart2install
    ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    "$chart2install"


In logging/bin/deploy_opensearch.sh line 335:
if [ "$deploy_temp_masters" == "true" ]; then
      ^------------------^ SC2154 (warning): deploy_temp_masters is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 340:
   helm $helmDebug upgrade --install opensearch-master \
        ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm "$helmDebug" upgrade --install opensearch-master \


In logging/bin/deploy_opensearch.sh line 341:
       --namespace $LOG_NS \
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       --namespace "$LOG_NS" \


In logging/bin/deploy_opensearch.sh line 350:
       --set roles={master} \
                   ^-- SC1083 (warning): This { is literal. Check expression (missing ;/\n?) or quote it.
                          ^-- SC1083 (warning): This } is literal. Check expression (missing ;/\n?) or quote it.


In logging/bin/deploy_opensearch.sh line 354:
       $versionstring \
       ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       "$versionstring" \


In logging/bin/deploy_opensearch.sh line 355:
       $chart2install
       ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
       "$chart2install"


In logging/bin/deploy_opensearch.sh line 361:
pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
pvc_status=$(kubectl -n "$LOG_NS" get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 362:
until [ "$pvc_status" == "Bound" ] || (( $pvcCounter>90 ));
                                         ^---------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In logging/bin/deploy_opensearch.sh line 366:
   pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   pvc_status=$(kubectl -n "$LOG_NS" get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 370:
pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
                        ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
pvc_status=$(kubectl -n "$LOG_NS" get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")


In logging/bin/deploy_opensearch.sh line 381:
kubectl -n $LOG_NS wait pods v4m-search-0 --for=condition=Ready --timeout=10m
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" wait pods v4m-search-0 --for=condition=Ready --timeout=10m


In logging/bin/deploy_opensearch.sh line 395:
   kubectl -n $LOG_NS wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m


In logging/bin/deploy_opensearch.sh line 408:
   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" scale statefulset v4m-master --replicas 1


In logging/bin/deploy_opensearch.sh line 413:
   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" scale statefulset v4m-master --replicas 0


In logging/bin/deploy_opensearch.sh line 418:
   helm -n $LOG_NS delete opensearch-master
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   helm -n "$LOG_NS" delete opensearch-master


In logging/bin/deploy_opensearch.sh line 424:
   kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   kubectl -n "$LOG_NS" delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found


In logging/bin/deploy_opensearch.sh line 430:
   min_data_nodes=$((odfe_data_pvc_count - 1))
                     ^-----------------^ SC2154 (warning): odfe_data_pvc_count is referenced but not assigned.


In logging/bin/deploy_opensearch.sh line 431:
   search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
                                  ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   search_node_count=$(kubectl -n "$LOG_NS" get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)


In logging/bin/deploy_opensearch.sh line 436:
      kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
                 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      kubectl -n "$LOG_NS" scale statefulset v4m-search --replicas=$min_data_nodes


In logging/bin/deploy_opensearch.sh line 445:
  kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  kubectl -n "$LOG_NS" exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh


In logging/bin/deploy_opensearch.sh line 447:
  kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  kubectl -n "$LOG_NS" cp v4m-search-0:config/run_securityadmin.log "$TMP_DIR"/run_securityadmin.log -c opensearch


In logging/bin/deploy_opensearch.sh line 448:
  if [ "$(tail -n1  $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
                    ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  if [ "$(tail -n1  "$TMP_DIR"/run_securityadmin.log)" == "Done with success" ]; then


In logging/bin/deploy_opensearch.sh line 454:
  sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
                   ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  sed 's/^/   | /' "$TMP_DIR"/run_securityadmin.log


In logging/bin/deploy_opensearch.sh line 463:
   disable_sa_token_automount $LOG_NS v4m-os
                              ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
   disable_sa_token_automount "$LOG_NS" v4m-os


In logging/bin/deploy_openshift_prereqs.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/deploy_openshift_prereqs.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/deploy_openshift_prereqs.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/deploy_openshift_prereqs.sh line 26:
oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
                                                      ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
oc adm policy add-scc-to-user privileged -z v4m-os -n "$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_azmonitor.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_azmonitor.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_azmonitor.sh line 13:
helm2ReleaseCheck fbaz-$LOG_NS
                       ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fbaz-"$LOG_NS"


In logging/bin/remove_fluentbit_azmonitor.sh line 16:
if helm3ReleaseExists fbaz $LOG_NS; then
                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fbaz "$LOG_NS"; then


In logging/bin/remove_fluentbit_azmonitor.sh line 26:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_azmonitor.sh line 29:
kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 30:
kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 31:
kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 32:
kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 33:
kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script    --ignore-not-found


In logging/bin/remove_fluentbit_azmonitor.sh line 37:
kubectl -n $LOG_NS delete secret connection-info-azmonitor --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete secret connection-info-azmonitor --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_fluentbit_opensearch.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_fluentbit_opensearch.sh line 8:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/bin/remove_fluentbit_opensearch.sh line 12:
helm2ReleaseCheck fb-$LOG_NS
                     ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm2ReleaseCheck fb-"$LOG_NS"


In logging/bin/remove_fluentbit_opensearch.sh line 14:
if helm3ReleaseExists fb $LOG_NS; then
                         ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
if helm3ReleaseExists fb "$LOG_NS"; then


In logging/bin/remove_fluentbit_opensearch.sh line 23:
helm delete -n $LOG_NS $fbRelease
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
helm delete -n "$LOG_NS" $fbRelease


In logging/bin/remove_fluentbit_opensearch.sh line 26:
kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-fluent-bit-config   --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 27:
kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-parsers        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 28:
kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-viya-tracing        --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 29:
kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-env-vars            --ignore-not-found


In logging/bin/remove_fluentbit_opensearch.sh line 30:
kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script    --ignore-not-found


In logging/bin/remove_openshift_artifacts.sh line 6:
cd "$(dirname $BASH_SOURCE)/../.."
^-- SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
              ^----------^ SC2128 (warning): Expanding an array without an index only gives the first element.
              ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
cd "$(dirname "$BASH_SOURCE")/../.." || exit


In logging/bin/remove_openshift_artifacts.sh line 7:
source logging/bin/common.sh
       ^-------------------^ SC1091 (info): Not following: logging/bin/common.sh was not specified as input (see shellcheck -x).


In logging/bin/remove_openshift_artifacts.sh line 9:
this_script=`basename "$0"`
            ^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
this_script=$(basename "$0")


In logging/fb/migrate_fbstate_db.sh line 16:
      cp $oldFile $newFile
         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                  ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      cp "$oldFile" "$newFile"


In logging/fb/migrate_fbstate_db.sh line 24:
chown -R 3301:3301 $newDir
                   ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
chown -R 3301:3301 "$newDir"

For more information:
  https://www.shellcheck.net/wiki/SC1083 -- This { is literal. Check expressi...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt -s' returned error 1 finding the following formatting issues:

----------
diff logging/bin/deploy_fluentbit_azmonitor.sh.orig logging/bin/deploy_fluentbit_azmonitor.sh
--- logging/bin/deploy_fluentbit_azmonitor.sh.orig
+++ logging/bin/deploy_fluentbit_azmonitor.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,15 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
-fi
-
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
+fi
 
 set -e
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
+	helmDebug="--debug"
 fi
 
 helm2ReleaseCheck fb-$LOG_NS
@@ -32,74 +31,73 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "The specified namespace [$LOG_NS] does not exist."
-  exit 1
+	log_error "The specified namespace [$LOG_NS] does not exist."
+	exit 1
 fi
 
 log_info "Deploying Fluent Bit (Azure Monitor)"
 
 #Generate yaml file with all container-related keys#Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"               "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
 generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_AZMONITOR_USER_YAML="${FB_AZMONITOR_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-azmonitor.yaml}"
 if [ ! -f "$FB_AZMONITOR_USER_YAML" ]; then
-  log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$FB_AZMONITOR_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_AZMONITOR_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_azmonitor.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_azmonitor.yaml"
 fi
 log_info "Using FB ConfigMap:" $FB_CONFIGMAP
 
-
 # Check/Create Connection Info Secret
 if [ "$(kubectl -n $LOG_NS get secret connection-info-azmonitor -o name 2>/dev/null)" == "" ]; then
 
-   export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
-   export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
-
-   if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided"  ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
-      log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
-      kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
-   else
-      log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
-      log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
-      exit 1
-   fi
-else
-   log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
-   export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" |base64 --decode)
-   export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" |base64 --decode)
+	export AZMONITOR_CUSTOMER_ID="${AZMONITOR_CUSTOMER_ID:-NotProvided}"
+	export AZMONITOR_SHARED_KEY="${AZMONITOR_SHARED_KEY:-NotProvided}"
+
+	if [ "$AZMONITOR_CUSTOMER_ID" != "NotProvided" ] && [ "$AZMONITOR_SHARED_KEY" != "NotProvided" ]; then
+		log_info "Creating secret [connection-info-azmonitor] in [$LOG_NS] namespace to hold Azure connection information."
+		kubectl -n "$LOG_NS" create secret generic connection-info-azmonitor --from-literal=customer_id="$AZMONITOR_CUSTOMER_ID" --from-literal=shared_key="$AZMONITOR_SHARED_KEY"
+	else
+		log_error "Unable to create secret [$LOG_NS/connection-info-azmonitor] because missing required information: [AZMONITOR_CUSTOMER_ID: $AZMONITOR_CUSTOMER_ID ; AZMONITOR_SHARED_KEY: $AZMONITOR_SHARED_KEY]."
+		log_error "You must provide this information via environment variables or create the secret [connection-info-azmonitor] before running this script."
+		exit 1
+	fi
+else
+	log_info "Obtaining connection information from existing secret [$LOG_NS/connection-info-azmonitor]"
+	export AZMONITOR_CUSTOMER_ID=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.customer_id}" | base64 --decode)
+	export AZMONITOR_SHARED_KEY=$(kubectl -n "$LOG_NS" get secret connection-info-azmonitor -o=jsonpath="{.data.shared_key}" | base64 --decode)
 fi
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fbaz $LOG_NS; then
-   log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fbaz
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-   log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_info "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fbaz
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 # Multiline parser setup
 LOG_MULTILINE_ENABLED="${LOG_MULTILINE_ENABLED:-true}"
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -107,41 +105,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fbaz-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fbaz-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fbaz-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fbaz-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -149,39 +147,38 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fbaz-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fbaz-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT=$KUBERNETES_RUNTIME_LOGFMT \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fbaz-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fbaz-dbmigrate-script -o name --ignore-not-found)" != "configmap/fbaz-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fbaz --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fbaz-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fbaz-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fbaz-dbmigrate-script managed-by=v4m-es-script
-
-
- ## Get Helm Chart Name
- log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
- chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
- versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
- log_debug "Installing Helm chart from artifact [$chart2install]"
+kubectl -n "$LOG_NS" label configmap fbaz-dbmigrate-script managed-by=v4m-es-script
+
+## Get Helm Chart Name
+log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
+chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
+log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install v4m-fbaz  --namespace $LOG_NS  \
-  $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
-  --values $FB_AZMONITOR_USER_YAML \
-  --values $tracingValuesFile \
-  --set fullnameOverride=v4m-fbaz \
-  $chart2install
+helm $helmDebug upgrade --install v4m-fbaz --namespace $LOG_NS \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_azmonitor.yaml \
+	--values $FB_AZMONITOR_USER_YAML \
+	--values $tracingValuesFile \
+	--set fullnameOverride=v4m-fbaz \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 sleep 20
diff logging/bin/deploy_fluentbit_opensearch.sh.orig logging/bin/deploy_fluentbit_opensearch.sh
--- logging/bin/deploy_fluentbit_opensearch.sh.orig
+++ logging/bin/deploy_fluentbit_opensearch.sh
@@ -7,7 +7,7 @@
 source logging/bin/common.sh
 source logging/bin/secrets-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -15,8 +15,8 @@
 FLUENT_BIT_ENABLED=${FLUENT_BIT_ENABLED:-true}
 
 if [ "$FLUENT_BIT_ENABLED" != "true" ]; then
-   log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
-   exit
+	log_info "Environment variable [FLUENT_BIT_ENABLED] is not set to 'true'; existing WITHOUT deploying Fluent Bit"
+	exit
 fi
 
 set -e
@@ -29,72 +29,70 @@
 # check for pre-reqs
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 # get credentials
 get_credentials_from_secret logcollector
 rc=$?
-if [ "$rc" != "0" ] ;then log_debug "RC=$rc"; exit $rc;fi
-
+if [ "$rc" != "0" ]; then
+	log_debug "RC=$rc"
+	exit $rc
+fi
 
 HELM_DEBUG="${HELM_DEBUG:-false}"
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
+	helmDebug="--debug"
+fi
 
 helmRepoAdd fluent https://fluent.github.io/helm-charts
 #log_verbose "Updating Helm repositories..."
 #helm repo update
 
-
 helm2ReleaseCheck fb-$LOG_NS
 
 # Check for an existing Helm release of stable/fluent-bit
 if helm3ReleaseExists fb $LOG_NS; then
-   log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
-   helm  $helmDebug  delete -n "$LOG_NS" fb
-
-   if [ $(kubectl get servicemonitors -A |grep fluent-bit-v2 -c) -ge 1 ]; then
-      log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
-   elif [ $(kubectl get servicemonitors -A |grep fluent-bit -c) -ge 1 ]; then
-      log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
-      log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
-   fi
-else
-  log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
+	log_verbose "Removing an existing release of deprecated stable/fluent-bit Helm chart from from the [$LOG_NS] namespace [$(date)]"
+	helm $helmDebug delete -n "$LOG_NS" fb
+
+	if [ $(kubectl get servicemonitors -A | grep fluent-bit-v2 -c) -ge 1 ]; then
+		log_debug "Updated serviceMonitor [fluent-bit-v2] appears to be deployed."
+	elif [ $(kubectl get servicemonitors -A | grep fluent-bit -c) -ge 1 ]; then
+		log_warn "You appear to have an obsolete service monitor in place for monitoring Fluent Bit."
+		log_warn "Run monitoring/bin/deploy_monitoring_cluster.sh to deploy the current set of service monitors."
+	fi
+else
+	log_debug "No existing release of the deprecated stable/fluent-bit Helm chart was found"
 fi
 
 #Generate yaml file with all container-related keys
-generateImageKeysFile "$FB_FULL_IMAGE"                "logging/fb/fb_container_image.template"
-generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE"  "logging/fb/fb_initcontainer_image.template"
+generateImageKeysFile "$FB_FULL_IMAGE" "logging/fb/fb_container_image.template"
+generateImageKeysFile "$FB_INITCONTAINER_FULL_IMAGE" "logging/fb/fb_initcontainer_image.template"
 
 # Fluent Bit user customizations
 FB_OPENSEARCH_USER_YAML="${FB_OPENSEARCH_USER_YAML:-$USER_DIR/logging/user-values-fluent-bit-opensearch.yaml}"
 if [ ! -f "$FB_OPENSEARCH_USER_YAML" ]; then
-  log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
-fi
-
+	log_debug "[$FB_OPENSEARCH_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	FB_OPENSEARCH_USER_YAML=$TMP_DIR/empty.yaml
+fi
 
 # Point to OpenShift response file or dummy as appropriate
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-  log_info "Deploying Fluent Bit on OpenShift cluster"
-  openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
-else
-  log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
-  openshiftValuesFile="$TMP_DIR/empty.yaml"
-fi
-
+	log_info "Deploying Fluent Bit on OpenShift cluster"
+	openshiftValuesFile="logging/openshift/values-fluent-bit.yaml"
+else
+	log_debug "Fluent Bit is NOT being deployed on OpenShift cluster"
+	openshiftValuesFile="$TMP_DIR/empty.yaml"
+fi
 
 if [ -f "$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml" ]; then
-   # use copy in USER_DIR
-   FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
-else
-   # use copy in repo
-   FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
+	# use copy in USER_DIR
+	FB_CONFIGMAP="$USER_DIR/logging/fluent-bit_config.configmap_opensearch.yaml"
+else
+	# use copy in repo
+	FB_CONFIGMAP="logging/fb/fluent-bit_config.configmap_opensearch.yaml"
 fi
 log_debug "Using FB ConfigMap:" $FB_CONFIGMAP
 
@@ -101,9 +99,9 @@
 # Multiline parser setup
 LOG_MULTILINE_ENABLED=${LOG_MULTILINE_ENABLED:-true}
 if [ "$LOG_MULTILINE_ENABLED" == "true" ]; then
-  LOG_MULTILINE_PARSER="docker, cri"
-else
-  LOG_MULTILINE_PARSER=""
+	LOG_MULTILINE_PARSER="docker, cri"
+else
+	LOG_MULTILINE_PARSER=""
 fi
 
 # Create ConfigMap containing Fluent Bit configuration
@@ -111,41 +109,41 @@
 
 # Create ConfigMap containing Viya-customized parsers (delete it first)
 kubectl -n "$LOG_NS" delete configmap fb-viya-parsers --ignore-not-found
-kubectl -n "$LOG_NS" create configmap fb-viya-parsers  --from-file=logging/fb/viya-parsers.conf
+kubectl -n "$LOG_NS" create configmap fb-viya-parsers --from-file=logging/fb/viya-parsers.conf
 
 TRACING_ENABLE="${TRACING_ENABLE:-false}"
 if [ "$TRACING_ENABLE" == "true" ]; then
-  # Create ConfigMap containing tracing config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file=logging/fb/viya-tracing.conf
-
-  tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
-else 
-  # Create empty ConfigMap for tracing since it is expected to exist in main config
-  kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
-  kubectl -n "$LOG_NS" create configmap fb-viya-tracing  --from-file="$TMP_DIR"/empty.yaml
-
-  tracingValuesFile=$TMP_DIR/empty.yaml
+	# Create ConfigMap containing tracing config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file=logging/fb/viya-tracing.conf
+
+	tracingValuesFile="logging/fb/fluent-bit_helm_values_tracing.yaml"
+else
+	# Create empty ConfigMap for tracing since it is expected to exist in main config
+	kubectl -n "$LOG_NS" delete configmap fb-viya-tracing --ignore-not-found
+	kubectl -n "$LOG_NS" create configmap fb-viya-tracing --from-file="$TMP_DIR"/empty.yaml
+
+	tracingValuesFile=$TMP_DIR/empty.yaml
 fi
 
 # Check for Kubernetes container runtime log format info
 KUBERNETES_RUNTIME_LOGFMT="${KUBERNETES_RUNTIME_LOGFMT}"
 if [ -z "$KUBERNETES_RUNTIME_LOGFMT" ]; then
-   somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
-   runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
-   log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
-   case $runtime in
-    docker)
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-    containerd|cri-o)
-      KUBERNETES_RUNTIME_LOGFMT="criwithlog"
-      ;;
-    *)
-      log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
-      KUBERNETES_RUNTIME_LOGFMT="docker"
-      ;;
-   esac
+	somenode=$(kubectl get nodes | awk 'NR==2 { print $1 }')
+	runtime=$(kubectl get node $somenode -o jsonpath={.status.nodeInfo.containerRuntimeVersion} | awk -F: '{print $1}')
+	log_debug "Kubernetes container runtime [$runtime] found on node [$somenode]"
+	case $runtime in
+	docker)
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	containerd | cri-o)
+		KUBERNETES_RUNTIME_LOGFMT="criwithlog"
+		;;
+	*)
+		log_warn "Unrecognized Kubernetes container runtime [$runtime]; using default parser"
+		KUBERNETES_RUNTIME_LOGFMT="docker"
+		;;
+	esac
 fi
 
 MON_NS="${MON_NS:-monitoring}"
@@ -153,40 +151,40 @@
 # Create ConfigMap containing Kubernetes container runtime log format
 kubectl -n "$LOG_NS" delete configmap fb-env-vars --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-env-vars \
-                   --from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
-                   --from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}"         \
-                   --from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}"                 \
-                   --from-literal=MON_NS="${MON_NS}"
-
-kubectl -n "$LOG_NS" label configmap fb-env-vars   managed-by=v4m-es-script
+	--from-literal=KUBERNETES_RUNTIME_LOGFMT="$KUBERNETES_RUNTIME_LOGFMT" \
+	--from-literal=LOG_MULTILINE_PARSER="${LOG_MULTILINE_PARSER}" \
+	--from-literal=SEARCH_SERVICENAME="${ES_SERVICENAME}" \
+	--from-literal=MON_NS="${MON_NS}"
+
+kubectl -n "$LOG_NS" label configmap fb-env-vars managed-by=v4m-es-script
 
 # Check to see if we are upgrading from earlier version requiring root access
-if [ "$( kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
-   log_debug "Removing FB pods (if they exist) to allow migration."
-   kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
+if [ "$(kubectl -n $LOG_NS get configmap fb-dbmigrate-script -o name --ignore-not-found)" != "configmap/fb-dbmigrate-script" ]; then
+	log_debug "Removing FB pods (if they exist) to allow migration."
+	kubectl -n "$LOG_NS" delete daemonset v4m-fb --ignore-not-found
 fi
 
 # Create ConfigMap containing Fluent Bit database migration script
 kubectl -n "$LOG_NS" delete configmap fb-dbmigrate-script --ignore-not-found
 kubectl -n "$LOG_NS" create configmap fb-dbmigrate-script --from-file logging/fb/migrate_fbstate_db.sh
-kubectl -n "$LOG_NS" label  configmap fb-dbmigrate-script managed-by=v4m-es-script
+kubectl -n "$LOG_NS" label configmap fb-dbmigrate-script managed-by=v4m-es-script
 
 ## Get Helm Chart Name
 log_debug "Fluent Bit Helm Chart: repo [$FLUENTBIT_HELM_CHART_REPO] name [$FLUENTBIT_HELM_CHART_NAME] version [$FLUENTBIT_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $FLUENTBIT_HELM_CHART_REPO $FLUENTBIT_HELM_CHART_NAME $FLUENTBIT_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $FLUENTBIT_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $FLUENTBIT_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
 # Deploy Fluent Bit via Helm chart
-helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb  \
-    $versionstring \
-  --values $imageKeysFile \
-  --values logging/fb/fluent-bit_helm_values_opensearch.yaml  \
-  --values $openshiftValuesFile \
-  --values $tracingValuesFile \
-  --values $FB_OPENSEARCH_USER_YAML   \
-  --set fullnameOverride=v4m-fb \
-  $chart2install
+helm $helmDebug upgrade --install --namespace $LOG_NS v4m-fb \
+	$versionstring \
+	--values $imageKeysFile \
+	--values logging/fb/fluent-bit_helm_values_opensearch.yaml \
+	--values $openshiftValuesFile \
+	--values $tracingValuesFile \
+	--values $FB_OPENSEARCH_USER_YAML \
+	--set fullnameOverride=v4m-fb \
+	$chart2install
 
 #pause to allow migration script to complete (if necessary)
 log_debug "Pausing to allow migration script to complete"
@@ -203,7 +201,5 @@
 
 log_info "Fluent Bit deployment completed"
 
-
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
-
diff logging/bin/deploy_opensearch.sh.orig logging/bin/deploy_opensearch.sh
--- logging/bin/deploy_opensearch.sh.orig
+++ logging/bin/deploy_opensearch.sh
@@ -9,7 +9,7 @@
 source bin/tls-include.sh
 source logging/bin/apiaccess-include.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -16,8 +16,8 @@
 ELASTICSEARCH_ENABLE=${ELASTICSEARCH_ENABLE:-true}
 
 if [ "$ELASTICSEARCH_ENABLE" != "true" ]; then
-  log_verbose "Environment variable [ELASTICSEARCH_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenSearch"
-  exit 0
+	log_verbose "Environment variable [ELASTICSEARCH_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenSearch"
+	exit 0
 fi
 
 set -e
@@ -33,14 +33,14 @@
 
 # Confirm namespace exists
 if [ "$(kubectl get ns $LOG_NS -o name 2>/dev/null)" == "" ]; then
-  log_error "Namespace [$LOG_NS] does NOT exist."
-  exit 1
+	log_error "Namespace [$LOG_NS] does NOT exist."
+	exit 1
 fi
 
 #Generate yaml files with all container-related keys
-generateImageKeysFile "$OS_FULL_IMAGE"          "logging/opensearch/os_container_image.template"
-generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE"   "$imageKeysFile"  "OS_SYSCTL_"
-generateImageKeysFile "$OS_FULL_IMAGE"          "logging/opensearch/os_initcontainer_image.template"
+generateImageKeysFile "$OS_FULL_IMAGE" "logging/opensearch/os_container_image.template"
+generateImageKeysFile "$OS_SYSCTL_FULL_IMAGE" "$imageKeysFile" "OS_SYSCTL_"
+generateImageKeysFile "$OS_FULL_IMAGE" "logging/opensearch/os_initcontainer_image.template"
 
 # get credentials
 export ES_ADMIN_PASSWD=${ES_ADMIN_PASSWD}
@@ -49,19 +49,19 @@
 export ES_METRICGETTER_PASSWD=${ES_METRICGETTER_PASSWD}
 
 # Create secrets containing internal user credentials
-create_user_secret internal-user-admin        admin        "$ES_ADMIN_PASSWD"         managed-by=v4m-es-script
-create_user_secret internal-user-kibanaserver kibanaserver "$ES_KIBANASERVER_PASSWD"  managed-by=v4m-es-script
-create_user_secret internal-user-logcollector logcollector "$ES_LOGCOLLECTOR_PASSWD"  managed-by=v4m-es-script
-create_user_secret internal-user-metricgetter metricgetter "$ES_METRICGETTER_PASSWD"  managed-by=v4m-es-script
+create_user_secret internal-user-admin admin "$ES_ADMIN_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-kibanaserver kibanaserver "$ES_KIBANASERVER_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-logcollector logcollector "$ES_LOGCOLLECTOR_PASSWD" managed-by=v4m-es-script
+create_user_secret internal-user-metricgetter metricgetter "$ES_METRICGETTER_PASSWD" managed-by=v4m-es-script
 
 #cert_generator="${CERT_GENERATOR:-openssl}"
 
 # Verify cert generator is available (if necessary)
 if verify_cert_generator $LOG_NS es-transport es-rest es-admin; then
-   log_debug "cert generator check OK [$cert_generator_ok]"
-else
-   log_error "One or more required TLS certs do not exist and the expected certificate generator mechanism [$CERT_GENERATOR] is not available to create the missing certs"
-   exit 1
+	log_debug "cert generator check OK [$cert_generator_ok]"
+else
+	log_error "One or more required TLS certs do not exist and the expected certificate generator mechanism [$CERT_GENERATOR] is not available to create the missing certs"
+	exit 1
 fi
 
 # Create/Get necessary TLS certs
@@ -71,15 +71,15 @@
 sleep 10
 
 # Get subject from admin and transport cert for opensearch.yaml
-if [ ! -f  $TMP_DIR/es-transport.pem ]; then
-   log_debug "Extracting es-transport cert from secret"
-   kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-transport.pem
+if [ ! -f $TMP_DIR/es-transport.pem ]; then
+	log_debug "Extracting es-transport cert from secret"
+	kubectl -n $LOG_NS get secret es-transport-tls-secret -o=jsonpath="{.data.tls\.crt}" | base64 --decode >$TMP_DIR/es-transport.pem
 fi
 node_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-transport.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
 
-if [ ! -f  $TMP_DIR/es-admin.pem ]; then
-   log_debug "Extracting es-admin cert from secret"
-   kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" |base64 --decode > $TMP_DIR/es-admin.pem
+if [ ! -f $TMP_DIR/es-admin.pem ]; then
+	log_debug "Extracting es-admin cert from secret"
+	kubectl -n $LOG_NS get secret es-admin-tls-secret -o=jsonpath="{.data.tls\.crt}" | base64 --decode >$TMP_DIR/es-admin.pem
 fi
 admin_dn=$(openssl x509 -subject -nameopt RFC2253 -noout -in $TMP_DIR/es-admin.pem | sed -e "s/subject=\s*\(\S*\)/\1/" -e "s/^[ \t]*//")
 
@@ -87,54 +87,53 @@
 
 #write cert subjects to secret to be mounted as env var
 kubectl -n $LOG_NS delete secret opensearch-cert-subjects --ignore-not-found
-kubectl -n $LOG_NS create secret generic opensearch-cert-subjects  --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
-kubectl -n $LOG_NS label  secret opensearch-cert-subjects  managed-by=v4m-es-script
+kubectl -n $LOG_NS create secret generic opensearch-cert-subjects --from-literal=node_dn="$node_dn" --from-literal=admin_dn="$admin_dn"
+kubectl -n $LOG_NS label secret opensearch-cert-subjects managed-by=v4m-es-script
 
 # Create ConfigMap for securityadmin script
 kubectl -n $LOG_NS delete configmap run-securityadmin.sh --ignore-not-found
 kubectl -n $LOG_NS create configmap run-securityadmin.sh --from-file logging/opensearch/bin/run_securityadmin.sh
-kubectl -n $LOG_NS label  configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
+kubectl -n $LOG_NS label configmap run-securityadmin.sh managed-by=v4m-es-script search-backend=opensearch
 
 # Need to retrieve these from secrets in case secrets pre-existed
-export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" |base64 --decode)
-export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" |base64 --decode)
-export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" |base64 --decode)
-export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" |base64 --decode)
+export ES_ADMIN_USER=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.username}" | base64 --decode)
+export ES_ADMIN_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-admin -o=jsonpath="{.data.password}" | base64 --decode)
+export ES_METRICGETTER_USER=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.username}" | base64 --decode)
+export ES_METRICGETTER_PASSWD=$(kubectl -n $LOG_NS get secret internal-user-metricgetter -o=jsonpath="{.data.password}" | base64 --decode)
 
 # Generate message about autogenerated admin password
-adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin   -o jsonpath='{.metadata.labels.autogenerated_password}')
-if [ ! -z "$adminpwd_autogenerated"  ]; then
-   # Print info about how to obtain admin password
-   add_notice "                                                                    "
-   add_notice "**The OpenSearch 'admin' Account**"
-   add_notice "Generated 'admin' password:  $ES_ADMIN_PASSWD                       "
-   add_notice "To change the password for the 'admin' account at any time, run the "
-   add_notice "following command:                                                  "
-   add_notice "                                                                    "
-   add_notice "    logging/bin/change_internal_password.sh admin newPassword       "
-   add_notice "                                                                    "
-   add_notice "NOTE: *NEVER* change the password for the 'admin' account from within the"
-   add_notice "OpenSearch Dashboards web-interface.  The 'admin' password should *ONLY* be changed via "
-   add_notice "the change_internal_password.sh script in the logging/bin sub-directory."
-   add_notice "                                                                    "
-
-   LOGGING_DRIVER=${LOGGING_DRIVER:-false}
-   if [ "$LOGGING_DRIVER" != "true" ]; then
-      echo ""
-      display_notices
-      echo ""
-   fi
-fi
-
+adminpwd_autogenerated=$(kubectl -n $LOG_NS get secret internal-user-admin -o jsonpath='{.metadata.labels.autogenerated_password}')
+if [ ! -z "$adminpwd_autogenerated" ]; then
+	# Print info about how to obtain admin password
+	add_notice "                                                                    "
+	add_notice "**The OpenSearch 'admin' Account**"
+	add_notice "Generated 'admin' password:  $ES_ADMIN_PASSWD                       "
+	add_notice "To change the password for the 'admin' account at any time, run the "
+	add_notice "following command:                                                  "
+	add_notice "                                                                    "
+	add_notice "    logging/bin/change_internal_password.sh admin newPassword       "
+	add_notice "                                                                    "
+	add_notice "NOTE: *NEVER* change the password for the 'admin' account from within the"
+	add_notice "OpenSearch Dashboards web-interface.  The 'admin' password should *ONLY* be changed via "
+	add_notice "the change_internal_password.sh script in the logging/bin sub-directory."
+	add_notice "                                                                    "
+
+	LOGGING_DRIVER=${LOGGING_DRIVER:-false}
+	if [ "$LOGGING_DRIVER" != "true" ]; then
+		echo ""
+		display_notices
+		echo ""
+	fi
+fi
 
 # enable debug on Helm via env var
 export HELM_DEBUG="${HELM_DEBUG:-false}"
 
 if [ "$HELM_DEBUG" == "true" ]; then
-  helmDebug="--debug"
-fi
-
-helmRepoAdd opensearch  https://opensearch-project.github.io/helm-charts
+	helmDebug="--debug"
+fi
+
+helmRepoAdd opensearch https://opensearch-project.github.io/helm-charts
 
 ## Commenting out as it might be redundant code
 # log_verbose "Updating Helm repositories"
@@ -142,11 +141,11 @@
 
 # Check for existing OpenSearch helm release
 if [ "$(helm -n $LOG_NS list --filter 'opensearch' -q)" == "opensearch" ]; then
-   log_debug "The Helm release [opensearch] already exists; upgrading the release."
-   existingSearch="true"
-else
-   log_debug "The Helm release [opensearch] does NOT exist; deploying a new release."
-   existingSearch="false"
+	log_debug "The Helm release [opensearch] already exists; upgrading the release."
+	existingSearch="true"
+else
+	log_debug "The Helm release [opensearch] does NOT exist; deploying a new release."
+	existingSearch="false"
 fi
 
 helm2ReleaseCheck odfe-$LOG_NS
@@ -154,138 +153,137 @@
 # Check for existing Open Distro helm release
 if [ "$(helm -n $LOG_NS list --filter 'odfe' -q)" == "odfe" ]; then
 
-   log_info "An existing ODFE-based deployment was detected; migrating to an OpenSearch-based deployment."
-   existingODFE="true"
-
-   #
-   #Migrate Kibana content if upgrading from ODFE 1.7.0
-   #
-   if [ "$(helm -n $LOG_NS list -o yaml --filter odfe |grep app_version)" == "- app_version: 1.8.0" ]; then
-
-      # Prior to our 1.1.0 release we used ODFE 1.7.0
-      log_info "Migrating content from Open Distro for Elasticsearch 1.7.0"
-
-      #export exisiting content from global tenant
-      #KB_GLOBAL_EXPORT_FILE="$TMP_DIR/kibana_global_content.ndjson"
-
-      log_debug "Exporting exisiting content from global tenant to temporary file [$KB_GLOBAL_EXPORT_FILE]."
-
-      set +e
-
-      #Need to connect to existing ODFE instance:
-      #   *unset vars returned by call to get_kb_api_url to force regeneration
-      #   *pass ODFE-specific values to get_kb_api_url
-      unset kb_api_url
-      unset kbpfpid
-      get_kb_api_url "ODFE" "v4m-es-kibana-svc"  "kibana-svc" "v4m-es-kibana-ing" "false"
-
-      #Need to confirm KB URL works...might not if TLS enabled.
-      #If that's the case, reset things and do it again with TLS=true.
-
-      response=$(curl -s -o /dev/null -w  "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
-
-      if [[ $response != 2* ]]; then
-         log_debug "Unable to connect to Kibana using HTTP; will try using HTTPS"
-         stop_kb_portforwarding
-         unset kb_api_url
-         unset kbpfpid
-         get_kb_api_url "ODFE" "v4m-es-kibana-svc"  "kibana-svc" "v4m-es-kibana-ing" "true"
-      else
-         log_debug "Confirmed connection to Kibana"
-      fi
-
-      content2export='{"type": ["config", "url","visualization", "dashboard", "search", "index-pattern"],"excludeExportDetails": false}'
-
-      #The 'kb-xsrf' reference below is correct since we are interacting with ODFE KB
-      response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE  -w  "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export"  -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
-
-      if [[ $response != 2* ]]; then
-         log_warn "There was an issue exporting the existing content from Kibana [$response]"
-         log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
-         #TODO: Exit here?  Display messages as shown?  Add BIG MESSAGE about potential loss of content?
-      else
-         log_info "Content from existing Kibana instance cached for migration. [$response]"
-         log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
-      fi
-
-      #Remove traces of ODFE interaction
-      stop_kb_portforwarding
-      unset kb_api_url
-      unset kbpfpid
-   fi
-
-   #
-   # Upgrade from ODFE to OpenSearch
-   #
-
-   # Remove Fluent Bit Helm release to
-   # avoid losing log messages during transition
-   if helm3ReleaseExists v4m-fb $LOG_NS; then
-      log_debug "Removing the Fluent Bit Helm release"
-      helm -n $LOG_NS delete v4m-fb
-   fi
-
-   # Remove the existing ODFE Helm release
-   log_debug "Removing an existing ODFE Helm release"
-   helm -n $LOG_NS delete odfe
-   sleep 20
-
-   #bypass security setup since 
-   #it was already configured
-   existingSearch=true
-
-   #Migrate PVCs
-   source logging/bin/migrate_odfe_pvcs-include.sh
-else
-   log_debug "No obsolete Helm release of [odfe] was found."
-   existingODFE="false"
-fi
-
+	log_info "An existing ODFE-based deployment was detected; migrating to an OpenSearch-based deployment."
+	existingODFE="true"
+
+	#
+	#Migrate Kibana content if upgrading from ODFE 1.7.0
+	#
+	if [ "$(helm -n $LOG_NS list -o yaml --filter odfe | grep app_version)" == "- app_version: 1.8.0" ]; then
+
+		# Prior to our 1.1.0 release we used ODFE 1.7.0
+		log_info "Migrating content from Open Distro for Elasticsearch 1.7.0"
+
+		#export exisiting content from global tenant
+		#KB_GLOBAL_EXPORT_FILE="$TMP_DIR/kibana_global_content.ndjson"
+
+		log_debug "Exporting exisiting content from global tenant to temporary file [$KB_GLOBAL_EXPORT_FILE]."
+
+		set +e
+
+		#Need to connect to existing ODFE instance:
+		#   *unset vars returned by call to get_kb_api_url to force regeneration
+		#   *pass ODFE-specific values to get_kb_api_url
+		unset kb_api_url
+		unset kbpfpid
+		get_kb_api_url "ODFE" "v4m-es-kibana-svc" "kibana-svc" "v4m-es-kibana-ing" "false"
+
+		#Need to confirm KB URL works...might not if TLS enabled.
+		#If that's the case, reset things and do it again with TLS=true.
+
+		response=$(curl -s -o /dev/null -w "%{http_code}" -XGET "${kb_api_url}/status" -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
+
+		if [[ $response != 2* ]]; then
+			log_debug "Unable to connect to Kibana using HTTP; will try using HTTPS"
+			stop_kb_portforwarding
+			unset kb_api_url
+			unset kbpfpid
+			get_kb_api_url "ODFE" "v4m-es-kibana-svc" "kibana-svc" "v4m-es-kibana-ing" "true"
+		else
+			log_debug "Confirmed connection to Kibana"
+		fi
+
+		content2export='{"type": ["config", "url","visualization", "dashboard", "search", "index-pattern"],"excludeExportDetails": false}'
+
+		#The 'kb-xsrf' reference below is correct since we are interacting with ODFE KB
+		response=$(curl -s -o $KB_GLOBAL_EXPORT_FILE -w "%{http_code}" -XPOST "${kb_api_url}/api/saved_objects/_export" -d "$content2export" -H "kbn-xsrf: true" -H 'Content-Type: application/json' -u $ES_ADMIN_USER:$ES_ADMIN_PASSWD -k)
+
+		if [[ $response != 2* ]]; then
+			log_warn "There was an issue exporting the existing content from Kibana [$response]"
+			log_debug "Failed response details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
+			#TODO: Exit here?  Display messages as shown?  Add BIG MESSAGE about potential loss of content?
+		else
+			log_info "Content from existing Kibana instance cached for migration. [$response]"
+			log_debug "Export details: $(tail -n1 $KB_GLOBAL_EXPORT_FILE)"
+		fi
+
+		#Remove traces of ODFE interaction
+		stop_kb_portforwarding
+		unset kb_api_url
+		unset kbpfpid
+	fi
+
+	#
+	# Upgrade from ODFE to OpenSearch
+	#
+
+	# Remove Fluent Bit Helm release to
+	# avoid losing log messages during transition
+	if helm3ReleaseExists v4m-fb $LOG_NS; then
+		log_debug "Removing the Fluent Bit Helm release"
+		helm -n $LOG_NS delete v4m-fb
+	fi
+
+	# Remove the existing ODFE Helm release
+	log_debug "Removing an existing ODFE Helm release"
+	helm -n $LOG_NS delete odfe
+	sleep 20
+
+	#bypass security setup since
+	#it was already configured
+	existingSearch=true
+
+	#Migrate PVCs
+	source logging/bin/migrate_odfe_pvcs-include.sh
+else
+	log_debug "No obsolete Helm release of [odfe] was found."
+	existingODFE="false"
+fi
 
 # OpenSearch user customizations
 ES_OPEN_USER_YAML="${ES_OPEN_USER_YAML:-$USER_DIR/logging/user-values-opensearch.yaml}"
 if [ ! -f "$ES_OPEN_USER_YAML" ]; then
-  log_debug "[$ES_OPEN_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
-  ES_OPEN_USER_YAML=$TMP_DIR/empty.yaml
+	log_debug "[$ES_OPEN_USER_YAML] not found. Using $TMP_DIR/empty.yaml"
+	ES_OPEN_USER_YAML=$TMP_DIR/empty.yaml
 fi
 
 if [ -z "$(kubectl -n $LOG_NS get secret opensearch-securityconfig -o name 2>/dev/null)" ]; then
 
-   kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
-
-   #Copy OpenSearch Security Configuration files
-   mkdir -p $TMP_DIR/opensearch/securityconfig
-   cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
-   #Overlay OpenSearch security configuration files from USER_DIR (if exists)
-   if [ -d "$USER_DIR/logging/opensearch/securityconfig" ]; then
-      log_debug "OpenSearch Security Configuration directory found w/in USER_DIR [$USER_DIR]"
-
-      if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
-        log_info "Copying OpenSearch Security Configuration files from [$USER_DIR/logging/opensearch/securityconfig]"
-        cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
-      else
-         log_debug "No YAML (*.yml) files found in USER_DIR/opensearch/securityconfig directory"
-      fi
-   fi
-
-   #create secret containing OpenSearch security configuration yaml files
-   #NOTE: whitelist.yml file is only created due to apparent bug in OpenSearch
-   #      which causes an ERROR when securityAdmin.sh is run without it 
-   kubectl -n $LOG_NS create secret generic opensearch-securityconfig    \
-       --from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml  \
-       --from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml      \
-       --from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml      \
-       --from-file $TMP_DIR/opensearch/securityconfig/config.yml         \
-       --from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
-       --from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml       \
-       --from-file $TMP_DIR/opensearch/securityconfig/roles.yml          \
-       --from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml  \
-       --from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
-
-   kubectl -n $LOG_NS label secret opensearch-securityconfig  managed-by=v4m-es-script
-
-else
-   log_verbose "Using existing secret [opensearch-securityconfig] for OpenSearch Security Configuration"
+	kubectl -n $LOG_NS delete secret opensearch-securityconfig --ignore-not-found
+
+	#Copy OpenSearch Security Configuration files
+	mkdir -p $TMP_DIR/opensearch/securityconfig
+	cp logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
+	#Overlay OpenSearch security configuration files from USER_DIR (if exists)
+	if [ -d "$USER_DIR/logging/opensearch/securityconfig" ]; then
+		log_debug "OpenSearch Security Configuration directory found w/in USER_DIR [$USER_DIR]"
+
+		if [ "$(ls $USER_DIR/logging/opensearch/securityconfig/*.yml 2>/dev/null)" ]; then
+			log_info "Copying OpenSearch Security Configuration files from [$USER_DIR/logging/opensearch/securityconfig]"
+			cp $USER_DIR/logging/opensearch/securityconfig/*.yml $TMP_DIR/opensearch/securityconfig
+		else
+			log_debug "No YAML (*.yml) files found in USER_DIR/opensearch/securityconfig directory"
+		fi
+	fi
+
+	#create secret containing OpenSearch security configuration yaml files
+	#NOTE: whitelist.yml file is only created due to apparent bug in OpenSearch
+	#      which causes an ERROR when securityAdmin.sh is run without it
+	kubectl -n $LOG_NS create secret generic opensearch-securityconfig \
+		--from-file $TMP_DIR/opensearch/securityconfig/action_groups.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/allowlist.yml \
+		--from-file whitelist.yml=$TMP_DIR/opensearch/securityconfig/allowlist.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/config.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/internal_users.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/nodes_dn.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/roles.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/roles_mapping.yml \
+		--from-file $TMP_DIR/opensearch/securityconfig/tenants.yml
+
+	kubectl -n $LOG_NS label secret opensearch-securityconfig managed-by=v4m-es-script
+
+else
+	log_verbose "Using existing secret [opensearch-securityconfig] for OpenSearch Security Configuration"
 fi
 
 # OpenSearch
@@ -296,83 +294,79 @@
 
 # Optional workload node placement support
 if [ "$LOG_NODE_PLACEMENT_ENABLE" == "true" ]; then
-  log_verbose "Enabling OpenSearch for workload node placement"
-  wnpValuesFile="logging/node-placement/values-opensearch-wnp.yaml"
-else
-  log_debug "Workload node placement support is disabled for OpenSearch"
-  wnpValuesFile="$TMP_DIR/empty.yaml"
+	log_verbose "Enabling OpenSearch for workload node placement"
+	wnpValuesFile="logging/node-placement/values-opensearch-wnp.yaml"
+else
+	log_debug "Workload node placement support is disabled for OpenSearch"
+	wnpValuesFile="$TMP_DIR/empty.yaml"
 fi
 
 OPENSHIFT_SPECIFIC_YAML=$TMP_DIR/empty.yaml
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-    OPENSHIFT_SPECIFIC_YAML=logging/openshift/values-opensearch-openshift.yaml
-fi
-
+	OPENSHIFT_SPECIFIC_YAML=logging/openshift/values-opensearch-openshift.yaml
+fi
 
 # Get Helm Chart Name
 log_debug "OpenSearch Helm Chart: repo [$OPENSEARCH_HELM_CHART_REPO] name [$OPENSEARCH_HELM_CHART_NAME] version [$OPENSEARCH_HELM_CHART_VERSION]"
 chart2install="$(get_helmchart_reference $OPENSEARCH_HELM_CHART_REPO $OPENSEARCH_HELM_CHART_NAME $OPENSEARCH_HELM_CHART_VERSION)"
-versionstring="$(get_helm_versionstring  $OPENSEARCH_HELM_CHART_VERSION)"
+versionstring="$(get_helm_versionstring $OPENSEARCH_HELM_CHART_VERSION)"
 log_debug "Installing Helm chart from artifact [$chart2install]"
 
-
 # Deploy OpenSearch via Helm chart
 # NOTE: nodeGroup needed to get resource names we want
 helm $helmDebug upgrade --install opensearch \
-    --namespace $LOG_NS \
-    --values "$imageKeysFile" \
-    --values logging/opensearch/opensearch_helm_values.yaml \
-    --values "$wnpValuesFile" \
-    --values "$ES_OPEN_USER_YAML" \
-    --values "$OPENSHIFT_SPECIFIC_YAML" \
-    --set nodeGroup=primary  \
-    --set masterService=v4m-search \
-    --set fullnameOverride=v4m-search \
-    $versionstring \
-    $chart2install
-
-# ODFE => OpenSearch Migration
-if [ "$deploy_temp_masters" == "true" ]; then
-
-   #NOTE: rbac.create set to 'false' since ServiceAccount
-   #      was created during prior Helm chart deployment
-   log_debug "Upgrade from ODFE to OpenSearch detected; creating temporary master-only nodes."
-   helm $helmDebug upgrade --install opensearch-master \
-       --namespace $LOG_NS \
-       --values logging/opensearch/opensearch_helm_values.yaml \
-       --values "$imageKeysFile" \
-       --values "$wnpValuesFile" \
-       --values "$ES_OPEN_USER_YAML" \
-       --values "$OPENSHIFT_SPECIFIC_YAML" \
-       --set nodeGroup=temp_masters  \
-       --set ingress.enabled=false \
-       --set replicas=2 \
-       --set roles={master} \
-       --set rbac.create=false \
-       --set masterService=v4m-search \
-       --set fullnameOverride=v4m-master \
-       $versionstring \
-       $chart2install
-fi
-
+	--namespace $LOG_NS \
+	--values "$imageKeysFile" \
+	--values logging/opensearch/opensearch_helm_values.yaml \
+	--values "$wnpValuesFile" \
+	--values "$ES_OPEN_USER_YAML" \
+	--values "$OPENSHIFT_SPECIFIC_YAML" \
+	--set nodeGroup=primary \
+	--set masterService=v4m-search \
+	--set fullnameOverride=v4m-search \
+	$versionstring \
+	$chart2install
+
+# ODFE => OpenSearch Migration
+if [ "$deploy_temp_masters" == "true" ]; then
+
+	#NOTE: rbac.create set to 'false' since ServiceAccount
+	#      was created during prior Helm chart deployment
+	log_debug "Upgrade from ODFE to OpenSearch detected; creating temporary master-only nodes."
+	helm $helmDebug upgrade --install opensearch-master \
+		--namespace $LOG_NS \
+		--values logging/opensearch/opensearch_helm_values.yaml \
+		--values "$imageKeysFile" \
+		--values "$wnpValuesFile" \
+		--values "$ES_OPEN_USER_YAML" \
+		--values "$OPENSHIFT_SPECIFIC_YAML" \
+		--set nodeGroup=temp_masters \
+		--set ingress.enabled=false \
+		--set replicas=2 \
+		--set roles={master} \
+		--set rbac.create=false \
+		--set masterService=v4m-search \
+		--set fullnameOverride=v4m-master \
+		$versionstring \
+		$chart2install
+fi
 
 # waiting for PVCs to be bound
 declare -i pvcCounter=0
-pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
-until [ "$pvc_status" == "Bound" ] || (( $pvcCounter>90 ));
-do
-   sleep 5
-   pvcCounter=$((pvcCounter+5))
-   pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+until [ "$pvc_status" == "Bound" ] || ((pvcCounter > 90)); do
+	sleep 5
+	pvcCounter=$((pvcCounter + 5))
+	pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
 done
 
 # Confirm PVC is "bound" (matched) to PV
-pvc_status=$(kubectl -n $LOG_NS get pvc  v4m-search-v4m-search-0  -o=jsonpath="{.status.phase}")
-if [ "$pvc_status" != "Bound" ];  then
-      log_error "It appears that the PVC [v4m-search-v4m-search-0] associated with the [v4m-search-0] node has not been bound to a PV."
-      log_error "The status of the PVC is [$pvc_status]"
-      log_error "After ensuring all claims shown as Pending can be satisfied; run the remove_opensearch.sh script and try again."
-      exit 1
+pvc_status=$(kubectl -n $LOG_NS get pvc v4m-search-v4m-search-0 -o=jsonpath="{.status.phase}")
+if [ "$pvc_status" != "Bound" ]; then
+	log_error "It appears that the PVC [v4m-search-v4m-search-0] associated with the [v4m-search-0] node has not been bound to a PV."
+	log_error "The status of the PVC is [$pvc_status]"
+	log_error "After ensuring all claims shown as Pending can be satisfied; run the remove_opensearch.sh script and try again."
+	exit 1
 fi
 log_verbose "The PVC [v4m-search-v4m-search-0] have been bound to PVs"
 
@@ -380,9 +374,8 @@
 log_info "Waiting on OpenSearch pods to be Ready"
 kubectl -n $LOG_NS wait pods v4m-search-0 --for=condition=Ready --timeout=10m
 
-
 # TO DO: Convert to curl command to detect ES is up?
-# hitting https:/host:port -u adminuser:adminpwd --insecure 
+# hitting https:/host:port -u adminuser:adminpwd --insecure
 # returns "OpenDistro Security not initialized." and 503 when up
 log_verbose "Waiting [2] minutes to allow OpenSearch to initialize [$(date)]"
 sleep 120
@@ -390,51 +383,50 @@
 # ODFE => OpenSearch Migration
 if [ "$deploy_temp_masters" == "true" ]; then
 
-   log_verbose "Upgrade to OpenSearch from Open Distro for Elasticsearch processing continues..."
-   log_info "Waiting up to [3] minutes for 'master-only' ES pods to be Ready [$(date)]"
-   kubectl -n $LOG_NS wait pods  -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
-
-   #TODO: Remove 'master-only' nodes from list of 'master-eligible' ES nodes via API call?
-   # get_es_api_url
-   # curl call to remove 'master-only' nodes from list of 'master-eligible' nodes
-   # curl -X POST $es_api_url/_cluster/voting_config_exclusions?node_names=v4m-master-0,v4m-master-1,v4m-master-2
-   # sleep 60
-   # Probably (?) can skip the scale down and just uninstall Helm release
-
-
-   # Scale down master statefulset by 1 (to 1)
-   log_debug "Removing 'master-only' ES nodes needed only during upgrade to OpenSearch"
-
-   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
-   ## wait for 1 minute (probably excessive, but...)
-   sleep 30
-
-   #Scale down master statefulset by 1 (to 0)
-   kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
-   ##wait for 1 minute (probably excessive, but...)
-   sleep 30
-
-   #uninstall the Helm release
-   helm -n $LOG_NS delete opensearch-master
-   ##wait for 30 secs? 1 min?
-   sleep 30
-
-   #Delete "master" PVCs
-   ## Add labels?  Appears labels were overwritten by Helm chart
-   kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
+	log_verbose "Upgrade to OpenSearch from Open Distro for Elasticsearch processing continues..."
+	log_info "Waiting up to [3] minutes for 'master-only' ES pods to be Ready [$(date)]"
+	kubectl -n $LOG_NS wait pods -l app.kubernetes.io/instance=opensearch-master --for=condition=Ready --timeout=3m
+
+	#TODO: Remove 'master-only' nodes from list of 'master-eligible' ES nodes via API call?
+	# get_es_api_url
+	# curl call to remove 'master-only' nodes from list of 'master-eligible' nodes
+	# curl -X POST $es_api_url/_cluster/voting_config_exclusions?node_names=v4m-master-0,v4m-master-1,v4m-master-2
+	# sleep 60
+	# Probably (?) can skip the scale down and just uninstall Helm release
+
+	# Scale down master statefulset by 1 (to 1)
+	log_debug "Removing 'master-only' ES nodes needed only during upgrade to OpenSearch"
+
+	kubectl -n $LOG_NS scale statefulset v4m-master --replicas 1
+	## wait for 1 minute (probably excessive, but...)
+	sleep 30
+
+	#Scale down master statefulset by 1 (to 0)
+	kubectl -n $LOG_NS scale statefulset v4m-master --replicas 0
+	##wait for 1 minute (probably excessive, but...)
+	sleep 30
+
+	#uninstall the Helm release
+	helm -n $LOG_NS delete opensearch-master
+	##wait for 30 secs? 1 min?
+	sleep 30
+
+	#Delete "master" PVCs
+	## Add labels?  Appears labels were overwritten by Helm chart
+	kubectl -n $LOG_NS delete pvc v4m-master-v4m-master-0 v4m-master-v4m-master-1 v4m-master-v4m-master-2 --ignore-not-found
 fi
 
 # Reconcile count of 'data' nodes
 if [ "$existingODFE" == "true" ]; then
 
-   min_data_nodes=$((odfe_data_pvc_count - 1))
-   search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
-
-   if [ "$search_node_count" -gt "0" ] && [ "$min_data_nodes" -gt "0" ] && [ "$search_node_count" -lt "$min_data_nodes" ]; then
-      log_warn "There were insufficient OpenSearch nodes [$search_node_count] configured to handle all of the data from the original ODFE 'data' nodes"
-      log_warn "This OpenSearch cluster has been scaled up to [$min_data_nodes] nodes to ensure no loss of data."
-      kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
-   fi
+	min_data_nodes=$((odfe_data_pvc_count - 1))
+	search_node_count=$(kubectl -n $LOG_NS get statefulset v4m-search -o jsonpath='{.spec.replicas}' 2>/dev/null)
+
+	if [ "$search_node_count" -gt "0" ] && [ "$min_data_nodes" -gt "0" ] && [ "$search_node_count" -lt "$min_data_nodes" ]; then
+		log_warn "There were insufficient OpenSearch nodes [$search_node_count] configured to handle all of the data from the original ODFE 'data' nodes"
+		log_warn "This OpenSearch cluster has been scaled up to [$min_data_nodes] nodes to ensure no loss of data."
+		kubectl -n $LOG_NS scale statefulset v4m-search --replicas=$min_data_nodes
+	fi
 fi
 
 set +e
@@ -442,18 +434,18 @@
 # Run the security admin script on the pod
 # Add some logic to find ES release
 if [ "$existingSearch" == "false" ] && [ "$existingODFE" != "true" ]; then
-  kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
-  # Retrieve log file from security admin script
-  kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
-  if [ "$(tail -n1  $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
-    log_verbose "The run_securityadmin.log script appears to have run successfully; you can review its output below:"
-  else
-    log_warn "There may have been a problem with the run_securityadmin.log script; review the output below:"
-  fi
-  # show output from run_securityadmin.sh script
-  sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
-else
-  log_verbose "Existing OpenSearch release found. Skipping OpenSearch security initialization."
+	kubectl -n $LOG_NS exec v4m-search-0 -c opensearch -- config/run_securityadmin.sh
+	# Retrieve log file from security admin script
+	kubectl -n $LOG_NS cp v4m-search-0:config/run_securityadmin.log $TMP_DIR/run_securityadmin.log -c opensearch
+	if [ "$(tail -n1 $TMP_DIR/run_securityadmin.log)" == "Done with success" ]; then
+		log_verbose "The run_securityadmin.log script appears to have run successfully; you can review its output below:"
+	else
+		log_warn "There may have been a problem with the run_securityadmin.log script; review the output below:"
+	fi
+	# show output from run_securityadmin.sh script
+	sed 's/^/   | /' $TMP_DIR/run_securityadmin.log
+else
+	log_verbose "Existing OpenSearch release found. Skipping OpenSearch security initialization."
 fi
 
 set -e
@@ -460,8 +452,8 @@
 
 #Container Security: Disable serviceAccount Token Automounting
 if [ "$OPENSHIFT_CLUSTER" == "true" ]; then
-   disable_sa_token_automount $LOG_NS v4m-os
-   #NOTE: On other providers, OpenSearch pods linked to the 'default' serviceAccount
+	disable_sa_token_automount $LOG_NS v4m-os
+	#NOTE: On other providers, OpenSearch pods linked to the 'default' serviceAccount
 fi
 
 log_info "OpenSearch has been deployed"
diff logging/bin/deploy_openshift_prereqs.sh.orig logging/bin/deploy_openshift_prereqs.sh
--- logging/bin/deploy_openshift_prereqs.sh.orig
+++ logging/bin/deploy_openshift_prereqs.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 #Fail if not using OpenSearch back-end
 require_opensearch
@@ -17,10 +17,9 @@
 OPENSHIFT_PREREQS_ENABLE=${OPENSHIFT_PREREQS_ENABLE:-true}
 
 if [ "$OPENSHIFT_PREREQS_ENABLE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
-  exit
-fi
-
+	log_info "Environment variable [OPENSHIFT_PREREQS_ENABLE] is not set to 'true'; exiting WITHOUT deploying OpenShift Prerequisites"
+	exit
+fi
 
 # link OpenSearch serviceAccounts to 'privileged' scc
 oc adm policy add-scc-to-user privileged -z v4m-os -n $LOG_NS
@@ -27,16 +26,16 @@
 
 # create the 'v4m-logging-v2' SCC, if it does not already exist
 if oc get scc v4m-logging-v2 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
-else
-   oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-logging-v2]"
+else
+	oc create -f logging/openshift/fb_v4m-logging-v2_scc.yaml
 fi
 
 # create the 'v4m-k8sevents' SCC, if it does not already exist
 if oc get scc v4m-k8sevents 2>/dev/null 1>&2; then
-   log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
-else
-   oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
+	log_info "Skipping scc creation; using existing scc [v4m-k8sevents]"
+else
+	oc create -f logging/openshift/fb_v4m-k8sevents_scc.yaml
 fi
 
 log_info "OpenShift Prerequisites have been deployed."
diff logging/bin/remove_fluentbit_azmonitor.sh.orig logging/bin/remove_fluentbit_azmonitor.sh
--- logging/bin/remove_fluentbit_azmonitor.sh.orig
+++ logging/bin/remove_fluentbit_azmonitor.sh
@@ -5,32 +5,28 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
-
 helm2ReleaseCheck fbaz-$LOG_NS
 
-
 if helm3ReleaseExists fbaz $LOG_NS; then
-  fbRelease=fbaz
+	fbRelease=fbaz
 else
-  fbRelease=v4m-fbaz
+	fbRelease=v4m-fbaz
 fi
 
-
-
 log_info "Removing Fluent Bit (Azure Monitor output) [$fbRelease] components from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_info "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fbaz-dbmigrate-script --ignore-not-found
 
 # Should we leave secret in place?
 log_info "Removing Connection information  (secret)"
diff logging/bin/remove_fluentbit_opensearch.sh.orig logging/bin/remove_fluentbit_opensearch.sh
--- logging/bin/remove_fluentbit_opensearch.sh.orig
+++ logging/bin/remove_fluentbit_opensearch.sh
@@ -5,7 +5,7 @@
 
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -12,22 +12,21 @@
 helm2ReleaseCheck fb-$LOG_NS
 
 if helm3ReleaseExists fb $LOG_NS; then
-  fbRelease=fb
+	fbRelease=fb
 else
-  fbRelease=v4m-fb
+	fbRelease=v4m-fb
 fi
 
-
 log_info "Removing Fluent Bit components [$fbRelease] from the [$LOG_NS] namespace [$(date)]"
 
 helm delete -n $LOG_NS $fbRelease
 
 log_verbose "Removing ConfigMaps"
-kubectl -n $LOG_NS delete configmap fb-fluent-bit-config   --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-parsers        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-viya-tracing        --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-env-vars            --ignore-not-found
-kubectl -n $LOG_NS delete configmap fb-dbmigrate-script    --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-fluent-bit-config --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-parsers --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-viya-tracing --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-env-vars --ignore-not-found
+kubectl -n $LOG_NS delete configmap fb-dbmigrate-script --ignore-not-found
 
 log_debug "Script [$this_script] has completed [$(date)]"
 echo ""
diff logging/bin/remove_openshift_artifacts.sh.orig logging/bin/remove_openshift_artifacts.sh
--- logging/bin/remove_openshift_artifacts.sh.orig
+++ logging/bin/remove_openshift_artifacts.sh
@@ -6,7 +6,7 @@
 cd "$(dirname $BASH_SOURCE)/../.."
 source logging/bin/common.sh
 
-this_script=`basename "$0"`
+this_script=$(basename "$0")
 
 log_debug "Script [$this_script] has started [$(date)]"
 
@@ -14,16 +14,14 @@
 OPENSHIFT_ARTIFACTS_REMOVE=${OPENSHIFT_ARTIFACTS_REMOVE:-true}
 
 if [ "$OPENSHIFT_ARTIFACTS_REMOVE" != "true" ]; then
-  log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
-  exit
+	log_info "Environment variable [OPENSHIFT_ARTIFACTS_REMOVE] is not set to 'true'; exiting WITHOUT removing OpenShift Artifacts"
+	exit
 fi
 
 # remove custom OpenShift SCC
-oc delete scc v4mlogging     --ignore-not-found
+oc delete scc v4mlogging --ignore-not-found
 oc delete scc v4m-logging-v2 --ignore-not-found
-oc delete scc v4m-k8sevents  --ignore-not-found
-
-
+oc delete scc v4m-k8sevents --ignore-not-found
 
 log_info "OpenShift Prerequisites have been removed."
 
diff logging/fb/migrate_fbstate_db.sh.orig logging/fb/migrate_fbstate_db.sh
--- logging/fb/migrate_fbstate_db.sh.orig
+++ logging/fb/migrate_fbstate_db.sh
@@ -9,16 +9,16 @@
 newFile="$newDir/$newFilename"
 
 if [ ! -f "$newFile" ]; then
-   echo "INFO No existing instance of [$newFile] found"
-
-   if [ -f "$oldFile" ]; then
-      echo "INFO Migrating [$oldFile] to [$newFile]"
-      cp $oldFile $newFile
-    else
-       echo "INFO No previous instance of [$oldFile] found"
-   fi
+	echo "INFO No existing instance of [$newFile] found"
+
+	if [ -f "$oldFile" ]; then
+		echo "INFO Migrating [$oldFile] to [$newFile]"
+		cp $oldFile $newFile
+	else
+		echo "INFO No previous instance of [$oldFile] found"
+	fi
 else
-   echo "INFO An existing instance of [$newFile] found"
+	echo "INFO An existing instance of [$newFile] found"
 fi
 
 chown -R 3301:3301 $newDir
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt -s -w filename


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants