Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions qa-tests-backend/scripts/images-to-prefetch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ quay.io/rhacs-eng/qa-multi-arch:nginx-204a9a8e65061b10b92ad361dd6f406248404fe60e
quay.io/rhacs-eng/qa-multi-arch:nginx-1-15-4-alpine
quay.io/rhacs-eng/qa-multi-arch:nginx-1-17-1
quay.io/rhacs-eng/qa-multi-arch:nginx-1-19-alpine
quay.io/rhacs-eng/qa-multi-arch:nginx-1.12
quay.io/rhacs-eng/qa-multi-arch:nginx-1.12@sha256:72daaf46f11cc753c4eab981cbf869919bd1fee3d2170a2adeac12400f494728
quay.io/rhacs-eng/qa-multi-arch:nginx-1.21.1

# gcr.io images (filtered out on non-GKE clusters by scripts/ci/lib.sh:image_prefetcher_start_set)
us.gcr.io/acs-san-stackroxci/qa-multi-arch:nginx-1.12
us.gcr.io/acs-san-stackroxci/qa/registry-image:0.3

quay.io/rhacs-eng/qa-multi-arch:nginx-2.0.3
quay.io/rhacs-eng/qa-multi-arch:nginx-3.21-1
quay.io/rhacs-eng/qa-multi-arch:nginx-latest
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ create_cluster() {
POD_SECURITY_POLICIES="${POD_SECURITY_POLICIES:-false}"
GKE_RELEASE_CHANNEL="${GKE_RELEASE_CHANNEL:-stable}"
MACHINE_TYPE="${MACHINE_TYPE:-e2-standard-4}"
DISK_SIZE_GB=${DISK_SIZE_GB:-80}
DISK_SIZE_GB=${DISK_SIZE_GB:-200}

echo "Creating ${NUM_NODES} node cluster with image type \"${GCP_IMAGE_TYPE}\" and ${DISK_SIZE_GB}GB disks."

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/aks_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "aks"

os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/aro_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
Comment thread
porridge marked this conversation as resolved.
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"

os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/eks_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "eks"

os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_external_pg_17_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# set test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["POSTGRES_VERSION"] = "17"
os.environ["BYODB_TEST"] = "true"

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_nongroovy_compatibility_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"

# Run supported central and sensor version tuples against QaE2eGoCompatibilityTest (nongroovy compatibility tests)
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_nongroovy_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"

# delegated scanning support in the secured cluster
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_operator_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from post_tests import PostClusterTest, FinalPost

os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"

ClusterTestRunner(
cluster=GKECluster("operator-e2e-test", num_nodes=4),
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# set test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["GCP_IMAGE_TYPE"] = "cos_containerd"
os.environ["OUTPUT_FORMAT"] = "helm"

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_race_condition_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# set test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["GCP_IMAGE_TYPE"] = "cos_containerd"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_scale_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

os.environ["COMPARISON_METRICS"] = "scale-test/gke"
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["OUTPUT_FORMAT"] = "helm"
os.environ["STORAGE"] = "pvc"
os.environ["STORAGE_CLASS"] = "faster"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_scanner_v4_install_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from post_tests import PostClusterTest, FinalPost

os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["STORE_METRICS"] = "true"
os.environ["ROX_BASELINE_GENERATION_DURATION"] = "5m"
os.environ["ROX_SCANNER_V4"] = "true"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_sensor_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"

ClusterTestRunner(
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_ui_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"

# Override test env defaults here:
# (for defaults see: tests/e2e/lib.sh export_test_environment())
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_upgrade_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from post_tests import PostClusterTest, FinalPost

os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"

ClusterTestRunner(
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/gke_version_compatibility_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
os.environ["KUBERNETES_PROVIDER"] = "gke"
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"

# Run supported central and sensor version tuples against QaE2eTestCompatibility (groovy compatibility tests)
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ibmcloudz_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["LOAD_BALANCER"] = "route"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
os.environ["USE_MIDSTREAM_IMAGES"] = "true"
os.environ["REMOTE_CLUSTER_ARCH"] = "s390x"
os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_compliance_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["INSTALL_COMPLIANCE_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
os.environ["ROX_COMPLIANCE_ENHANCEMENTS"] = "true"

ClusterTestRunner(
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_nongroovy_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# set required test parameters
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"

# delegated scanning support in the secured cluster
os.environ["SENSOR_SCANNER_SUPPORT"] = "true"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_operator_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from post_tests import PostClusterTest, FinalPost

os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"

ClusterTestRunner(
cluster=AutomationFlavorsCluster(),
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# set required test parameters
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
# Workload identities are only set up for `openshift-4` infra clusters.
if 'openshift-4' in os.environ.get('CLUSTER_FLAVOR_VARIANT', ''):
os.environ["SETUP_WORKLOAD_IDENTITIES"] = "true"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_scanner_v4_install_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from post_tests import PostClusterTest, FinalPost

os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
os.environ["STORE_METRICS"] = "true"
os.environ["ROX_BASELINE_GENERATION_DURATION"] = "5m"
os.environ["ROX_SCANNER_V4"] = "true"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_sensor_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"

Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/ocp_ui_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["INSTALL_COMPLIANCE_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"

ClusterTestRunner(
cluster=AutomationFlavorsCluster(),
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/osd_aws_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# set required test parameters
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"

os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/osd_gcp_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# set required test parameters
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"

os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/powervs_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["LOAD_BALANCER"] = "route"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
os.environ["USE_MIDSTREAM_IMAGES"] = "true"
os.environ["REMOTE_CLUSTER_ARCH"] = "ppc64le"
os.environ["COLLECTION_METHOD"] = "ebpf"
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/jobs/rosa_qa_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
os.environ["DEPLOY_STACKROX_VIA_OPERATOR"] = "true"
os.environ["LOAD_BALANCER"] = "route"
os.environ["ORCHESTRATOR_FLAVOR"] = "openshift"
os.environ["KUBERNETES_PROVIDER"] = "ocp"
Comment thread
porridge marked this conversation as resolved.
os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
if "-hcp-" in os.environ["JOB_NAME"]:
Expand Down
26 changes: 22 additions & 4 deletions scripts/ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -694,20 +694,28 @@ image_prefetcher_start_set() {
local manifest
manifest=$(mktemp)

case "${ORCHESTRATOR_FLAVOR}" in
k8s)
local kubelet_image_creds
case "${KUBERNETES_PROVIDER}" in
gke)
flavor=vanilla
kubelet_image_creds=GKE
;;
openshift)
eks|aks)
flavor=vanilla
kubelet_image_creds="" # i.e. disabled
Comment thread
porridge marked this conversation as resolved.
;;
ocp)
flavor=ocp
kubelet_image_creds="" # i.e. disabled
;;
*)
die "unsupported ORCHESTRATOR: ${ORCHESTRATOR_FLAVOR}"
die "unsupported KUBERNETES_PROVIDER: ${KUBERNETES_PROVIDER}"
;;
esac

# daemonset, etc
${image_prefetcher_deploy_bin} \
--use-kubelet-image-credential-integration="${kubelet_image_creds}" \
--version="${image_prefetcher_version}" \
--k8s-flavor="$flavor" \
--secret=stackrox \
Expand All @@ -719,6 +727,16 @@ image_prefetcher_start_set() {
local image_list
image_list=$(mktemp)
populate_prefetcher_image_list "$name" "${image_list}"

# Filter out gcr.io images on non-GKE clusters (they require GKE-specific credentials)
if [[ "${KUBERNETES_PROVIDER}" != "gke" ]]; then
local filtered_image_list
filtered_image_list=$(mktemp)
info "Filtering out *.gcr.io images for non-GKE cluster"
grep -v -E '^([^/]+\.)?gcr\.io/' "${image_list}" > "${filtered_image_list}" || true
mv "${filtered_image_list}" "${image_list}"
fi

echo "---" >> "$manifest"
kubectl create --dry-run=client -o yaml configmap "$name" --from-file="images.txt=$image_list" >> "$manifest"

Expand Down
2 changes: 1 addition & 1 deletion tools/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.25

require (
github.com/jstemmer/go-junit-report/v2 v2.1.0
github.com/stackrox/image-prefetcher/deploy v0.4.3
github.com/stackrox/image-prefetcher/deploy v0.5.0
github.com/stackrox/prometheus-metric-parser v0.0.0-20240718111853-be492d554cd5
)

Expand Down
4 changes: 2 additions & 2 deletions tools/test/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading