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 27 commits into
base: main
Choose a base branch
from
Open

Fbnoroot2 #704

wants to merge 27 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
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.

1 participant