Skip to content

fix: skip component_image_tags for components outside the kubescape-operator chart - #91

Merged
matthyx merged 1 commit into
mainfrom
fix/skip-image-tag-for-non-chart-components
Sep 1, 2026
Merged

matthyx merged 1 commit into
mainfrom
fix/skip-image-tag-for-non-chart-components

Conversation

@matthyx

@matthyx matthyx commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • incluster-comp-pr-merged.yaml unconditionally sent client_payload[component_image_tags]=<COMPONENT_NAME>-tag=<tag> on every Helm E2E dispatch, even for components that aren't part of the kubescape-operator chart (http-request, prometheus-exporter).
  • Since armosec/system-tests#1236 (merged 2026-08-31) started fail-closing on unrecognised *-tag overrides, every release of those non-chart components now fails ks_microservice_on_demand with unknown component image tag kwargs ['http-request-tag'] — expected one of [...], which blocks create-release-and-retag.
  • Fix: only append component_image_tags when COMPONENT_NAME is one of the chart's known components (kubescape, operator, kubevuln, kollector, gateway, storage, nodeAgent).

Root cause

Full trace: kubescape/http-request#29 merged → incluster-comp-pr-merged.yaml dispatched component_image_tags=http-request-tag=... to armosec/shared-workflowsarmosec/system-tests's tests_scripts/helm/base_helm.py:get_in_cluster_tags() rejects it as unknown (allowlist is systest_utils/statics.py:COMPONENT_TAGS, which has no http-request entry — http-request isn't in kubescape/helm-charts either). Failing run: https://github.com/armosec/shared-workflows/actions/runs/33526635646/job/99921734558

Before armosec/system-tests#1236, the unrecognised kwarg was silently dropped (extract_tag_from_kwargs), so this was a latent no-op bug, not a failure. prometheus-exporter has the identical HELM_E2E_TEST: true + non-chart COMPONENT_NAME setup and is very likely broken the same way.

Verified safe

armosec/shared-workflows/.github/workflows/helm-e2e-receiver.yaml:60 already does COMPONENT_IMAGE_TAGS: ${{ github.event.client_payload.component_image_tags || '' }} — omitting the payload key entirely degrades to the same empty-string default it already handles. No change needed on the receiving side, and chart-component consumers (operator, kubevuln, storage, nodeAgent, ...) are unaffected.

Test plan

  • YAML validated (python3 -c "import yaml; yaml.safe_load(...)")
  • Re-run/merge a component whose COMPONENT_NAME is in the chart allowlist (e.g. storage) and confirm component_image_tags is still sent and its E2E test still passes
  • Re-run kubescape/http-request's release (or dispatch manually) and confirm ks_microservice_on_demand no longer fails with unknown component image tag kwargs

🤖 Generated with Claude Code

AI-skills: armosec-shared-rules:investigate-system-test-failure

…perator chart

incluster-comp-pr-merged.yaml unconditionally appended
client_payload[component_image_tags]=<COMPONENT_NAME>-tag=<tag> to every
Helm E2E dispatch. That's only meaningful for the seven components the
kubescape-operator chart actually has a "<name>-tag" value for
(kubescape, operator, kubevuln, kollector, gateway, storage, nodeAgent).

Consumers like http-request and prometheus-exporter aren't chart
components, so their "-tag" override was silently dropped by
armosec/system-tests until PR armosec/system-tests#1236 (merged
2026-08-31) added a fail-closed check for unrecognised "-tag" kwargs.
Since then, every http-request/prometheus-exporter release has failed
ks_microservice_on_demand with:

  unknown component image tag kwargs ['http-request-tag'] — expected
  one of ['gateway-tag', 'kollector-tag', 'kubescape-tag',
  'kubevuln-tag', 'nodeAgent-tag', 'operator-tag', 'storage-tag']

blocking create-release-and-retag (see
https://github.com/armosec/shared-workflows/actions/runs/33526635646/job/99921734558,
triggered by kubescape/http-request#29).

Now the override is only sent when COMPONENT_NAME is one of the chart's
known components; the receiver already defaults
component_image_tags to '' when absent
(armosec/shared-workflows/.github/workflows/helm-e2e-receiver.yaml:60),
so this is a no-op for the existing chart-component consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@matthyx matthyx added the ai-assisted Created through Armosec AI tooling (armosec-shared-rules plugin) label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: failure

1 similar comment
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Summary:

  • License scan: failure
  • Credentials scan: failure
  • Vulnerabilities scan: failure
  • Unit test: success
  • Go linting: failure

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 16facc82-3be3-4889-a33a-3a566a29c73f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@matthyx
matthyx merged commit b9dd939 into main Sep 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Created through Armosec AI tooling (armosec-shared-rules plugin)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant