#!/bin/bash

millisecond=1
second=$(( 1000 * millisecond ))
minute=$(( 60 * second ))

LOGGING_NS="openshift-logging"

gather_logging_resources() {
  set +e
  local LOGGING_NS=$1
  local outdir=${2:-$ARTIFACT_DIR}
  local runtime=${3:-$(date +%s)}
  outdir=$outdir/$runtime
  mkdir -p $outdir ||:
  oc adm must-gather --image=${IMAGE_CLUSTER_LOGGING_OPERATOR:-quay.io/openshift/origin-cluster-logging-operator:latest} --dest-dir=$outdir -- /usr/bin/gather > $outdir/must-gather.log 2>&1
  set -e
}