FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ROX-19064: Scanner V4 DB CI - PVC Storage Class (#19833) · stackrox/stackrox@c90df9a · GitHub

Commit c90df9a

Browse files
authored
ROX-19064: Scanner V4 DB CI - PVC Storage Class (#19833)
1 parent e07a85c commit c90df9a

13 files changed

Lines changed: 45 additions & 1 deletion

‎deploy/common/k8sbased.sh‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function launch_central {
231231
{ command -v oc >/dev/null && pkill -f oc'.*port-forward.*'; } || true # terminate stale port forwarding from earlier runs
232232
{ command -v oc >/dev/null && pkill -9 -f oc'.*port-forward.*'; } || true
233233

234-
if [[ "${STORAGE_CLASS}" == "faster" ]]; then
234+
if [[ "${STORAGE_CLASS}" == "faster" || "${SCANNER_V4_DB_STORAGE_CLASS}" == "faster" ]]; then
235235
kubectl apply -f "${common_dir}/ssd-storageclass.yaml"
236236
fi
237237

@@ -464,6 +464,10 @@ function launch_central {
464464
helm_args+=(-f "${COMMON_DIR}/ci-values.yaml")
465465
fi
466466

467+
if [[ -n "${SCANNER_V4_DB_STORAGE_CLASS}" ]]; then
468+
helm_args+=(--set "scannerV4.db.persistence.persistentVolumeClaim.storageClass=${SCANNER_V4_DB_STORAGE_CLASS}")
469+
fi
470+
467471
# Add a custom values file to Helm
468472
if [[ -n "$ROX_CENTRAL_EXTRA_HELM_VALUES_FILE" ]]; then
469473
helm_args+=(
@@ -523,6 +527,14 @@ function launch_central {
523527
if [[ -x "${unzip_dir}/scanner-v4/scripts/setup.sh" ]]; then
524528
"${unzip_dir}/scanner-v4/scripts/setup.sh"
525529
fi
530+
if [[ -n "${SCANNER_V4_DB_STORAGE_CLASS}" ]]; then
531+
pvc_file="${unzip_dir}/scanner-v4/02-scanner-v4-06-db-pvc.yaml"
532+
if [[ -f "${pvc_file}" ]]; then
533+
sed -i "s|^spec:$|spec:\n storageClassName: ${SCANNER_V4_DB_STORAGE_CLASS}|" "${pvc_file}"
534+
else
535+
echo >&2 "WARNING: SCANNER_V4_DB_STORAGE_CLASS is set but ${pvc_file} not found; storage class will not be applied."
536+
fi
537+
fi
526538
launch_service "${unzip_dir}" scanner-v4
527539

528540
if [[ -n "$CI" ]]; then

‎scripts/ci/jobs/gke_nongroovy_compatibility_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# set required test parameters
1414
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
15+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"
1516

1617
# Run supported central and sensor version tuples against QaE2eGoCompatibilityTest (nongroovy compatibility tests)
1718
run_compatibility_tests(QaE2eGoCompatibilityTest, "nongroovy-compat-test")

‎scripts/ci/jobs/gke_nongroovy_e2e_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# set required test parameters
1414
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
15+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"
1516

1617
# delegated scanning support in the secured cluster
1718
os.environ["SENSOR_SCANNER_SUPPORT"] = "true"

‎scripts/ci/jobs/gke_qa_e2e_tests.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
os.environ["GCP_IMAGE_TYPE"] = "cos_containerd"
1313
os.environ["OUTPUT_FORMAT"] = "helm"
1414

15+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"
16+
1517
os.environ["ROX_RISK_REPROCESSING_INTERVAL"] = "15s"
1618
os.environ["ROX_SENSOR_CONNECTION_RETRY_MAX_INTERVAL"] = "30s"
1719

‎scripts/ci/jobs/gke_race_condition_qa_e2e_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# set test parameters
1111
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
1212
os.environ["GCP_IMAGE_TYPE"] = "cos_containerd"
13+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"
1314

1415
# use -rcd image for stackrox/main
1516
os.environ["MAIN_IMAGE_TAG"] = os.environ["STACKROX_BUILD_TAG"] + "-rcd"

‎scripts/ci/jobs/gke_scale_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
os.environ["OUTPUT_FORMAT"] = "helm"
1616
os.environ["STORAGE"] = "pvc"
1717
os.environ["STORAGE_CLASS"] = "faster"
18+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"
1819
os.environ["STORAGE_SIZE"] = "100"
1920
os.environ["STORE_METRICS"] = os.environ["COMPARISON_METRICS"]
2021
os.environ["ROX_BASELINE_GENERATION_DURATION"] = "5m"

‎scripts/ci/jobs/gke_sensor_integration_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# set required test parameters
1313
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
14+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"
1415

1516
ClusterTestRunner(
1617
pre_test=PreSystemTests(run_poll_for_system_test_images=False),

‎scripts/ci/jobs/gke_ui_e2e_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# Override test env defaults here:
1717
# (for defaults see: tests/e2e/lib.sh export_test_environment())
1818
os.environ["OUTPUT_FORMAT"] = "helm"
19+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"
1920
os.environ["SENSOR_SCANNER_SUPPORT"] = "true"
2021

2122
ClusterTestRunner(

‎scripts/ci/jobs/gke_upgrade_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from post_tests import PostClusterTest, FinalPost
1212

1313
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
14+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "faster"
1415

1516
ClusterTestRunner(
1617
cluster=GKECluster("upgrade-test", machine_type="e2-standard-8"),

‎scripts/ci/jobs/gke_version_compatibility_tests.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# set required test parameters
1414
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"
15+
os.environ["SCANNER_V4_DB_STORAGE_CLASS"] = "stackrox-gke-ssd"
1516

1617
# Run supported central and sensor version tuples against QaE2eTestCompatibility (groovy compatibility tests)
1718
run_compatibility_tests(QaE2eTestCompatibility, "compat-test")

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL