Skip to content
Closed
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
90 changes: 41 additions & 49 deletions .github/workflows/dev-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,53 @@ on:
workflow_dispatch:

env:
IMAGE_BASE_NAME: kuadrant/console-plugin
REGISTRY: quay.io
IMG_REGISTRY_HOST: quay.io
IMG_REGISTRY_ORG: kuadrant
IMG_REGISTRY_REPO: console-plugin

jobs:
build:
name: Build and Push Multi-Arch Image
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]

runs-on: ubuntu-latest
outputs:
image: ${{ steps.meta.outputs.tags }}
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install QEMU
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Build Image
id: build
uses: redhat-actions/buildah-build@v2
uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to container registry
uses: docker/login-action@v2
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}
tags: latest-${{ matrix.arch }}
archs: ${{ matrix.arch }}
containerfiles: |
./Dockerfile

- name: Push Architecture-Specific Image
uses: redhat-actions/push-to-registry@v2
username: ${{ secrets.IMG_REGISTRY_USERNAME }}
password: ${{ secrets.IMG_REGISTRY_TOKEN }}
registry: ${{ env.IMG_REGISTRY_HOST }}
Comment on lines +27 to +32
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -name "dev-build.yaml" -type f

Repository: Kuadrant/kuadrant-console-plugin

Length of output: 110


🏁 Script executed:

cat -n .github/workflows/dev-build.yaml | head -60

Repository: Kuadrant/kuadrant-console-plugin

Length of output: 2260


🌐 Web query:

docker/login-action@v2 GitHub Actions compatibility current runners 2024 2025

💡 Result:

docker/login-action@v2 is compatible with current GitHub Actions hosted runners as of April 2026, but it is outdated and runs on Node.js 16, which has been deprecated since 2023-2024. Current runners (v2.33x+) support Node 20 (default until June 2026) and Node 24. Node 16 actions like v2 will continue to run with opt-out env vars (ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true), but may fail post-September 2026 when Node 20 is fully removed. Official docs and examples use v4.1.0 (Node 24, requires runner v2.327.1+). Upgrade to v3+ (Node 20, runner v2.308+) or v4+ for full compatibility without warnings or future breakage. In 2024-early 2025, v2 worked fine; by 2025-2026, Dependabot recommends upgrades in projects like actions/runner.

Citations:


🌐 Web query:

actionlint docker/login-action version compatibility warnings

💡 Result:

No specific version compatibility warnings or issues were found between actionlint and docker/login-action. Actionlint performs comprehensive static analysis on GitHub Actions workflows, including checks for popular actions like docker/login-action such as input validation at 'with:', outdated versions at 'uses:', and general syntax/type checks. Docker/login-action is actively maintained with recent releases up to v4.1.0 (as of 2026-04-02), and major version bumps (e.g., v2 to v3, v3 to v4) are handled via Dependabot without actionlint-related complaints in searched issues/PRs. Use the latest versions: actionlint v1.7.12+ and docker/login-action@v4 for optimal compatibility. To verify workflows, run actionlint locally or in CI.

Citations:


Guard this login step and bump docker/login-action to v3 or later.

This login step (line 28) runs unconditionally whilst the build/push step (line 46) is guarded by if: github.repository_owner == 'kuadrant'. For non-Kuadrant forks triggered via workflow_dispatch, the login step will attempt to execute before being skipped, causing failure due to missing registry credentials. Additionally, docker/login-action@v2 runs on Node.js 16, which is deprecated. Upgrade to v3 (Node 20, supported through June 2026) or v4 for forward compatibility.

Suggested patch
       - name: Login to container registry
+        if: github.repository_owner == 'kuadrant'
-        uses: docker/login-action@v2
+        uses: docker/login-action@v3
         with:
           username: ${{ secrets.IMG_REGISTRY_USERNAME }}
           password: ${{ secrets.IMG_REGISTRY_TOKEN }}
           registry: ${{ env.IMG_REGISTRY_HOST }}
🧰 Tools
🪛 actionlint (1.7.12)

[error] 28-28: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/dev-build.yaml around lines 27 - 32, The "Login to
container registry" step currently uses docker/login-action@v2 and runs
unconditionally; change it to use docker/login-action@v3 (or v4) and add the
same guard as the build/push step (if: github.repository_owner == 'kuadrant') so
the login only runs for the kuadrant repository and avoids failing on forks
without registry secrets; update the step reference (the step name "Login to
container registry" and the action reference docker/login-action@v2)
accordingly.

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
image: ${{ env.IMAGE_BASE_NAME }}
tags: latest-${{ matrix.arch }}

manifest:
name: Create and Push Multi-Arch Manifest
needs: build
runs-on: ubuntu-22.04
steps:
- name: Install Buildah
run: sudo apt-get update && sudo apt-get install -y buildah

- name: Create Manifest
run: |
buildah manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest-amd64
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest-arm64

- name: Push Multi-Arch Manifest
images: ${{ env.IMG_REGISTRY_HOST }}/${{ env.IMG_REGISTRY_ORG }}/${{ env.IMG_REGISTRY_REPO }}
flavor: |
latest=false
tags: |
# git sha
type=raw,value=${{ github.sha }},enable={{is_default_branch}}
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and Push Image
if: github.repository_owner == 'kuadrant'
id: build-image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/s390x
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
- name: Print Image URL
run: |
buildah manifest push --all ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest \
--creds=${{ secrets.QUAY_USER }}:${{ secrets.QUAY_PASSWORD }}
echo "Image(s) pushed:"
echo "${{ steps.meta.outputs.tags }}"
3 changes: 2 additions & 1 deletion .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
arch: [amd64, arm64, s390x]

steps:
- name: Checkout Code
Expand Down Expand Up @@ -60,6 +60,7 @@ jobs:
buildah manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }}
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }} docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }}-amd64
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }} docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }}-arm64
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }} docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:${{ github.event.release.name }}-s390x

- name: Push Multi-Arch Release Manifest
run: |
Expand Down
16 changes: 16 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ const accessReviews = useAccessReviews(resourceAttributes);
const canRead = accessReviews[0];
```

### 5. Configuration

The plugin supports configurable Topology andPrometheus metrics for gateway traffic monitoring. This allows the console to work with different Gateway API implementations (OpenShift 4.19+, OSSM, etc.).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor typo: missing space.

There's a missing space between "and" and "Prometheus".

📝 Suggested fix
-The plugin supports configurable Topology andPrometheus metrics for gateway traffic monitoring. This allows the console to work with different Gateway API implementations (OpenShift 4.19+, OSSM, etc.).
+The plugin supports configurable Topology and Prometheus metrics for gateway traffic monitoring. This allows the console to work with different Gateway API implementations (OpenShift 4.19+, OSSM, etc.).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The plugin supports configurable Topology andPrometheus metrics for gateway traffic monitoring. This allows the console to work with different Gateway API implementations (OpenShift 4.19+, OSSM, etc.).
The plugin supports configurable Topology and Prometheus metrics for gateway traffic monitoring. This allows the console to work with different Gateway API implementations (OpenShift 4.19+, OSSM, etc.).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 96, Fix the minor typo in the sentence containing
"Topology andPrometheus" by inserting a space so it reads "Topology and
Prometheus"; locate the sentence phrase "Topology andPrometheus metrics for
gateway traffic monitoring" and update it to "Topology and Prometheus metrics
for gateway traffic monitoring".


**Configuration is managed through:**
- `src/utils/configLoader.ts` - Configuration schema and defaults
- `src/utils/metricsQueries.ts` - Query utilities
- Environment variables in deployment manifests

**Example ENV Configuration:**
```yaml
TOPOLOGY_CONFIGMAP_NAME: "topology"
TOPOLOGY_CONFIGMAP_NAMESPACE: "kuadrant-system"
METRICS_WORKLOAD_SUFFIX: "-openshift-default"
```

## Key Components

- **KuadrantOverviewPage**: Main dashboard with gateway health status
Expand Down
7 changes: 7 additions & 0 deletions charts/openshift-console-plugin/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ spec:
- containerPort: {{ .Values.plugin.port }}
protocol: TCP
imagePullPolicy: {{ .Values.plugin.imagePullPolicy }}
env:
- name: TOPOLOGY_CONFIGMAP_NAME
value: {{ .Values.plugin.topologyConfigMapName | default "topology" | quote }}
- name: TOPOLOGY_CONFIGMAP_NAMESPACE
value: {{ .Values.plugin.topologyConfigMapNamespace | default "kuadrant-system" | quote }}
- name: METRICS_WORKLOAD_SUFFIX
value: {{ .Values.plugin.metricsWorkloadSuffix | default "-openshift-default" | quote }}
{{- if and (.Values.plugin.securityContext.enabled) (.Values.plugin.containerSecurityContext) }}
securityContext: {{ tpl (toYaml (omit .Values.plugin.containerSecurityContext "enabled")) $ | nindent 12 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/openshift-console-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ plugin:
create: true
annotations: {}
name: ""
topologyConfigMapName: "topology"
topologyConfigMapNamespace: "kuadrant-system"
metricsWorkloadSuffix: "-openshift-default"
jobs:
patchConsoles:
enabled: true
Expand Down
8 changes: 8 additions & 0 deletions console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
"component": { "$codeRef": "KuadrantOverviewPage" }
}
},
{
"type": "console.page/route",
"properties": {
"exact": true,
"path": "/kuadrant/ns/:ns/overview",
"component": { "$codeRef": "KuadrantOverviewPage" }
}
},
{
"type": "console.page/route",
"properties": {
Expand Down
Loading
Loading