feat: Update Helm chart and CI for exporter enhancements
This commit introduces updates to the Helm chart to support log level configuration for the iperf3 exporter, and modifies the CI workflow to improve image tagging for pull requests. Helm Chart Changes (`charts/iperf3-monitor`): - Added `exporter.logLevel` to `values.yaml` (default: "INFO") to allow you to set the exporter's log level. - Updated `templates/exporter-deployment.yaml` to use the `exporter.logLevel` value to set the `LOG_LEVEL` environment variable in the exporter container. CI Workflow Changes (`.github/workflows/ci.yaml`): - Modified the Docker image build process to tag images built from pull requests with `pr-<PR_NUMBER>`. - Ensured that these PR-specific images are pushed to the container registry. - Preserved existing tagging mechanisms (e.g., SHA-based tags).pull/13/head
parent
8887ff6afc
commit
bb9d61ae73
|
|
@ -42,12 +42,21 @@ jobs:
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
# Tag with the PR number if it's a pull request event
|
||||||
|
type=match,pattern=pull_request,value=pr-{{number}}
|
||||||
|
# Tag with the git SHA
|
||||||
|
type=sha,prefix=
|
||||||
|
# Tag with 'latest' if on the main branch (though this workflow only runs on PRs to main)
|
||||||
|
type=ref,event=branch,pattern=main,value=latest
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: ./exporter
|
context: ./exporter
|
||||||
push: false # Do not push on PRs
|
# Push the image if the event is a pull request.
|
||||||
|
# The workflow currently only triggers on pull_request events.
|
||||||
|
push: ${{ github.event_name == 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ spec:
|
||||||
value: "{{ .Values.exporter.testInterval }}"
|
value: "{{ .Values.exporter.testInterval }}"
|
||||||
- name: IPERF_TEST_PROTOCOL
|
- name: IPERF_TEST_PROTOCOL
|
||||||
value: "{{ .Values.exporter.testProtocol }}"
|
value: "{{ .Values.exporter.testProtocol }}"
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: "{{ .Values.exporter.logLevel }}"
|
||||||
- name: IPERF_SERVER_PORT
|
- name: IPERF_SERVER_PORT
|
||||||
value: "5201" # Hardcoded as per server DaemonSet
|
value: "5201" # Hardcoded as per server DaemonSet
|
||||||
- name: IPERF_SERVER_NAMESPACE
|
- name: IPERF_SERVER_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ exporter:
|
||||||
# -- Interval in seconds between complete test cycles (i.e., testing all server nodes).
|
# -- Interval in seconds between complete test cycles (i.e., testing all server nodes).
|
||||||
testInterval: 300
|
testInterval: 300
|
||||||
|
|
||||||
|
# -- Log level for the iperf3 exporter (e.g., DEBUG, INFO, WARNING, ERROR, CRITICAL).
|
||||||
|
logLevel: INFO
|
||||||
|
|
||||||
# -- Timeout in seconds for a single iperf3 test run.
|
# -- Timeout in seconds for a single iperf3 test run.
|
||||||
testTimeout: 10
|
testTimeout: 10
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue