github.com/verrazzano/verrazzano@v1.7.1/tests/e2e/config/scripts/get_verrazzano_image.sh (about)

     1  #!/bin/bash
     2  #
     3  # Copyright (c) 2020, 2021, Oracle and/or its affiliates.
     4  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     5  #
     6  
     7  SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P)
     8  WORKSPACE_ROOT=${SCRIPT_DIR}/../../../..
     9  IMG_LIST_FILE=$1
    10  
    11  if [ -z "${KUBECONFIG}" ] ; then
    12      echo "KUBECONFIG env var must be set!"
    13      exit 1
    14  fi
    15  
    16  # get image list from cluster and persist to output file
    17  podlist=$(kubectl get pods -n $1 -o jsonpath="{..image}" |\tr -s '[[:space:]]' '\n' |\sort |\uniq | grep verrazzano | grep / | cut -d/ -f2- | grep -v fluentd)
    18  
    19  printf '%s\n' "${podlist[@]}"