-
Notifications
You must be signed in to change notification settings - Fork 0
Set berserker config via url #95
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
base: main
Are you sure you want to change the base?
Changes from all commits
b1811f8
7ea0587
db0dcc8
1ad4bea
dffc558
20e0b8c
bd96551
3398aa7
b441426
539b3d1
3037952
8beb1e8
b807df8
bdf8975
ccef454
ef1ef36
b45d630
57d6d2b
39c0d04
708f4b9
52bbe98
a5a9456
e338d6b
b7b0526
12ea674
52e0e0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,6 +31,14 @@ on: | |||||||||||||||||||||||||||||||
| kube-burner-config-repo: | ||||||||||||||||||||||||||||||||
| description: The repository where the kube-burner config files can be found | ||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||
| berserker-config-repo: | ||||||||||||||||||||||||||||||||
| description: The repository where the berserker kube-burner config files can be found | ||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||
| default: JoukoVirtanen/kube-burner-ocp | ||||||||||||||||||||||||||||||||
| berserker-config-ref: | ||||||||||||||||||||||||||||||||
| description: Ref of where the berserker kube-burner config files can be found | ||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||
| default: jv-add-berserker-workload-2 | ||||||||||||||||||||||||||||||||
| cluster-with-fake-load-name: | ||||||||||||||||||||||||||||||||
| description: "The name of the long running cluster where the central deployment is run with a sensor that creates its own fake workload. Must comply to the regex: [a-z][a-z0-9-]{1,26}[a-z0-9]" | ||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||
|
|
@@ -46,7 +54,7 @@ env: | |||||||||||||||||||||||||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||||||||||||||||||||||||||
| GH_NO_UPDATE_NOTIFIER: 1 | ||||||||||||||||||||||||||||||||
| TIMEOUT_WAIT_FOR_IMAGES_SECONDS: 3600 | ||||||||||||||||||||||||||||||||
| LONG_RUNNING_CLUSTER_LIFESPAN: "168h" | ||||||||||||||||||||||||||||||||
| LONG_RUNNING_CLUSTER_LIFESPAN: "6h" | ||||||||||||||||||||||||||||||||
| METRICS_COLLECTION_TIME: "30m" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
|
|
@@ -472,6 +480,12 @@ jobs: | |||||||||||||||||||||||||||||||
| repository: stackrox/${{ inputs.kube-burner-config-repo }} | ||||||||||||||||||||||||||||||||
| path: .kube-burner-config | ||||||||||||||||||||||||||||||||
| ref: ${{ needs.parse-refs.outputs.burner-ref }} | ||||||||||||||||||||||||||||||||
| - name: Check out berserker config repository code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| repository: ${{ inputs.berserker-config-repo }} | ||||||||||||||||||||||||||||||||
| path: .berserker-config | ||||||||||||||||||||||||||||||||
| ref: ${{ inputs.berserker-config-ref }} | ||||||||||||||||||||||||||||||||
| # TODO(ROX-29223): Remove once old versions don't use the benchmark-operator | ||||||||||||||||||||||||||||||||
|
Comment on lines
+483
to
489
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win Checkout missing Static analysis (zizmor) flags this checkout for credential persistence via Suggested fix - name: Check out berserker config repository code
uses: actions/checkout@v4
with:
repository: ${{ inputs.berserker-config-repo }}
path: .berserker-config
ref: ${{ inputs.berserker-config-ref }}
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.26.1)[warning] 483-489: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||||||||
| - name: Check out cloud-bulldozer/benchmark-operator code | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
|
|
@@ -501,9 +515,12 @@ jobs: | |||||||||||||||||||||||||||||||
| REGISTRY_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RO_USERNAME }} | ||||||||||||||||||||||||||||||||
| REGISTRY_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RO_PASSWORD }} | ||||||||||||||||||||||||||||||||
| ELASTICSEARCH_URL: "https://${{ secrets.K6_ELASTICSEARCH_USER }}:${{ secrets.K6_ELASTICSEARCH_PASSWORD }}@${{ secrets.K6_ELASTICSEARCH_URL }}" | ||||||||||||||||||||||||||||||||
| BERSERKER_CONFIGMAP_TEMPLATE: "https://raw.githubusercontent.com/${{ inputs.berserker-config-repo }}/${{ inputs.berserker-config-ref }}/cmd/config/berserker-load/berserker-configmap.yml" | ||||||||||||||||||||||||||||||||
| BERSERKER_SERVICE_TEMPLATE: "https://raw.githubusercontent.com/${{ inputs.berserker-config-repo }}/${{ inputs.berserker-config-ref }}/cmd/config/berserker-load/service.yml" | ||||||||||||||||||||||||||||||||
| BERSERKER_CONTAINERS_FILE: "berserker-default-containers.yml" | ||||||||||||||||||||||||||||||||
| uses: ./.actions/release/start-kube-burner | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| kube-burner-config-dir: ./.kube-burner-config/scripts/release-tools/kube-burner-configs/berserker-load | ||||||||||||||||||||||||||||||||
| kube-burner-config-dir: ./.berserker-config/cmd/config/berserker-load | ||||||||||||||||||||||||||||||||
| benchmark-operator-dir: ${{ github.workspace }}/benchmark-operator | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| start-kube-burner-for-central: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,7 +19,26 @@ else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Using ACS pre-4.11 secured cluster setup (version: ${version_major_minor})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Create namespace and image pull secrets BEFORE running sensor.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl create namespace stackrox || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl -n stackrox create secret docker-registry stackrox \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-server=quay.io \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-username="${REGISTRY_USERNAME}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-password="${REGISTRY_PASSWORD}" || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl -n stackrox create secret docker-registry secured-cluster-services-main \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-server=quay.io \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-username="${REGISTRY_USERNAME}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-password="${REGISTRY_PASSWORD}" || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl -n stackrox create secret docker-registry secured-cluster-services-collector \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-server=quay.io \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-username="${REGISTRY_USERNAME}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --docker-password="${REGISTRY_PASSWORD}" || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+22
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Suggested fix-kubectl create namespace stackrox || true
+kubectl create namespace stackrox --dry-run=client -o yaml | kubectl apply -f -
-kubectl -n stackrox create secret docker-registry stackrox \
- --docker-server=quay.io \
- --docker-username="${REGISTRY_USERNAME}" \
- --docker-password="${REGISTRY_PASSWORD}" || true
+kubectl -n stackrox create secret docker-registry stackrox \
+ --docker-server=quay.io \
+ --docker-username="${REGISTRY_USERNAME}" \
+ --docker-password="${REGISTRY_PASSWORD}" \
+ --dry-run=client -o yaml | kubectl apply -f -(repeat for the other two secrets) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "${STACKROX_DIR}/deploy/k8s/sensor.sh" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl -n stackrox create secret generic access-rhacs \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --from-literal="username=${ROX_ADMIN_USERNAME}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --from-literal="password=${ROX_ADMIN_PASSWORD}" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -28,6 +47,9 @@ kubectl -n stackrox create secret generic access-rhacs \ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Create the collector-config ConfigMap in order to enable external IPs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl create -f "${SCRIPT_DIR}/collector-config.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Patch the collector DaemonSet to configure fact container | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl -n stackrox set env daemonset/collector FACT_PATHS="/tmp/data/**/*" FACT_LOGLEVEL="info" -c fact | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Deploying Monitoring..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| monitoring_values_file="${COMMON_DIR}/../charts/monitoring/values.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: stackrox/actions
Length of output: 11515
🏁 Script executed:
Repository: stackrox/actions
Length of output: 6866
Default Berserker inputs should not point to a personal fork/branch. This reusable workflow checks out
inputs.berserker-config-repoand pulls raw templates frominputs.berserker-config-ref, so any caller that omits overrides will useJoukoVirtanen/kube-burner-ocp/jv-add-berserker-workload-2. That makes the shared path depend on a mutable user-owned branch; switch these defaults to a stable org-controlled source or an immutable pin.🤖 Prompt for AI Agents