5 Commits

Author SHA1 Message Date
8d51afc24e Feat: Add optional TrueCharts Prometheus Operator dependency (#8)
This commit introduces a configurable dependency for the Prometheus Operator,
allowing you to choose between the standard kube-prometheus-stack and
the TrueCharts version of prometheus-operator.

Changes include:

1.  **values.yaml:**
    *   Added a `dependencies` section with the following new values:
        *   `useTrueChartsPrometheusOperator` (boolean, default: false):
            Controls which operator dependency is enabled.
        *   `trueChartsPrometheusOperatorRepository` (string, default:
            "oci://tccr.io/truecharts"): Repository for the TrueCharts operator.
        *   `trueChartsPrometheusOperatorVersion` (string, default: "8.11.1"):
            Chart version for the TrueCharts operator.

2.  **Chart.yaml:**
    *   The `kube-prometheus-stack` dependency condition is updated to
        `"serviceMonitor.enabled, !values.dependencies.useTrueChartsPrometheusOperator"`.
    *   A new dependency for `prometheus-operator` (TrueCharts) is added:
        *   `name: prometheus-operator`
        *   `version: "{{ .Values.dependencies.trueChartsPrometheusOperatorVersion }}"`
        *   `repository: "{{ .Values.dependencies.trueChartsPrometheusOperatorRepository }}"`
        *   `condition: "serviceMonitor.enabled, values.dependencies.useTrueChartsPrometheusOperator"`

This provides you with more flexibility in choosing your Prometheus
Operator stack while using the iperf3-monitor chart.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-06-20 13:25:30 +05:30
a2d57908f6 Merge pull request #7 from malarinv/fix/readme-license-ci-helm
Fix: Final correction for yq command in release workflow
2025-06-20 03:07:58 +05:30
google-labs-jules[bot]
4298031a2d Fix: Final correction for yq command in release workflow
This commit implements a verified yq command syntax in the
`.github/workflows/release.yml` file to ensure correct and reliable
updating of Chart.yaml version and appVersion from Git tags.

The previous attempts faced issues with yq argument parsing and
environment variable substitution. The new commands:
  VERSION=$VERSION yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml
  VERSION=$VERSION yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml
were tested and confirmed to correctly modify
the Chart.yaml file as intended.

This change should resolve the issues where chart versions were being
set incorrectly or to empty strings during the release process.
2025-06-19 21:36:48 +00:00
e6d1a8fb91 Merge pull request #6 from malarinv/fix/readme-license-ci-helm
Fix: Update README, license consistency, and Helm chart configurations
2025-06-20 02:44:04 +05:30
google-labs-jules[bot]
a9f2a49549 Fix: Update README, license consistency, and Helm chart configurations
This commit addresses several issues to improve repository accuracy and CI reliability:

1.  **README.md Updates:**
    *   I corrected the Helm repository URL to `https://malarinv.github.io/iperf3-monitor/`.
    *   I updated the default exporter image name to `ghcr.io/malarinv/iperf3-monitor` in examples.
    *   I revised the License section to accurately reflect the AGPLv3 license present in the `LICENSE` file, removing contradictory statements.

2.  **License Consistency:**
    *   I confirmed `LICENSE` file contains AGPLv3. README now correctly refers to it.

3.  **Helm Chart Adjustments:**
    *   `charts/iperf3-monitor/Chart.yaml`: I removed placeholder comments for clarity. Versioning is handled by the release workflow.
    *   `charts/iperf3-monitor/values.yaml`: I updated `exporter.image.repository` to `ghcr.io/malarinv/iperf3-monitor` to match the CI build image name.

4.  **CI Workflow Verification:**
    *   I verified that `.github/workflows/release.yml` correctly uses `yq` to set chart versions from Git tags and publishes to the correct GitHub Pages URL. This should prevent the previously noted `chart.metadata.version is required` error, which was associated with an older version of the release workflow.

These changes ensure that the documentation is up-to-date, the Helm chart defaults are correct, and the CI pipeline for chart publishing is robust.
2025-06-19 21:13:13 +00:00
4 changed files with 32 additions and 15 deletions

View File

@@ -82,8 +82,8 @@ jobs:
- name: Set Chart Version from Tag - name: Set Chart Version from Tag
run: | run: |
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml VERSION=$VERSION yq e -i '.version = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml
yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml VERSION=$VERSION yq e -i '.appVersion = strenv(VERSION)' ./charts/iperf3-monitor/Chart.yaml
cat ./charts/iperf3-monitor/Chart.yaml # Optional: print updated Chart.yaml cat ./charts/iperf3-monitor/Chart.yaml # Optional: print updated Chart.yaml
- name: Publish Helm chart - name: Publish Helm chart

View File

@@ -37,7 +37,7 @@ This separation of concerns ensures scalability, resilience, and aligns with Kub
1. Add the Helm chart repository (replace with your actual repo URL once published): 1. Add the Helm chart repository (replace with your actual repo URL once published):
```/dev/null/helm-install.sh#L1-1 ```/dev/null/helm-install.sh#L1-1
helm repo add iperf3-monitor https://your-github-org.github.io/iperf3-monitor/ helm repo add iperf3-monitor https://malarinv.github.io/iperf3-monitor/
``` ```
2. Update your Helm repositories: 2. Update your Helm repositories:
@@ -78,7 +78,7 @@ exporter:
# -- Configuration for the exporter container image. # -- Configuration for the exporter container image.
image: image:
# -- The container image repository for the exporter. # -- The container image repository for the exporter.
repository: ghcr.io/my-org/iperf3-prometheus-exporter # Replace with your repo URL repository: ghcr.io/malarinv/iperf3-monitor
# -- The container image tag for the exporter. If not set, the chart's appVersion is used. # -- The container image tag for the exporter. If not set, the chart's appVersion is used.
tag: "" tag: ""
# -- The image pull policy for the exporter container. # -- The image pull policy for the exporter container.
@@ -430,8 +430,4 @@ The project includes a GitHub Actions workflow (`.github/workflows/release.yml`)
## License ## License
This project is licensed under the terms defined in the `LICENSE` file. This project is licensed under the GNU Affero General Public License v3. See the `LICENSE` file for details.
```iperf3-monitor/LICENSE
This project is currently unlicensed. Please see the project's documentation or repository for licensing information when it becomes available.
```

View File

@@ -12,12 +12,12 @@ keywords:
- kubernetes - kubernetes
- prometheus - prometheus
- grafana - grafana
home: https://github.com/malarinv/iperf3-monitor # Replace with your repo URL home: https://github.com/malarinv/iperf3-monitor
sources: sources:
- https://github.com/malarinv/iperf3-monitor # Replace with your repo URL - https://github.com/malarinv/iperf3-monitor
maintainers: maintainers:
- name: Malar Invention # Replace with your name - name: Malar Invention
email: malarkannan.invention@gmail.com # Replace with your email email: malarkannan.invention@gmail.com
icon: https://raw.githubusercontent.com/malarinv/iperf3-monitor/main/icon.png # Optional icon URL icon: https://raw.githubusercontent.com/malarinv/iperf3-monitor/main/icon.png # Optional icon URL
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
@@ -27,4 +27,8 @@ dependencies:
- name: kube-prometheus-stack # Example dependency if you package the whole stack - name: kube-prometheus-stack # Example dependency if you package the whole stack
version: ">=30.0.0" # Specify a compatible version range version: ">=30.0.0" # Specify a compatible version range
repository: https://prometheus-community.github.io/helm-charts repository: https://prometheus-community.github.io/helm-charts
condition: serviceMonitor.enabled # Only include if ServiceMonitor is enabled (assuming Prometheus Operator) condition: "serviceMonitor.enabled, !values.dependencies.useTrueChartsPrometheusOperator"
- name: prometheus-operator
version: "{{ .Values.dependencies.trueChartsPrometheusOperatorVersion }}"
repository: "{{ .Values.dependencies.trueChartsPrometheusOperatorRepository }}"
condition: "serviceMonitor.enabled, values.dependencies.useTrueChartsPrometheusOperator"

View File

@@ -12,7 +12,7 @@ exporter:
# -- Configuration for the exporter container image. # -- Configuration for the exporter container image.
image: image:
# -- The container image repository for the exporter. # -- The container image repository for the exporter.
repository: ghcr.io/malarinv/iperf3-prometheus-exporter # Replace with your repo URL repository: ghcr.io/malarinv/iperf3-monitor
# -- The container image tag for the exporter. If not set, the chart's appVersion is used. # -- The container image tag for the exporter. If not set, the chart's appVersion is used.
tag: "" tag: ""
# -- The image pull policy for the exporter container. # -- The image pull policy for the exporter container.
@@ -118,3 +118,20 @@ networkPolicy:
namespaceSelector: {} namespaceSelector: {}
# -- Specify pod selectors if needed. # -- Specify pod selectors if needed.
podSelector: {} podSelector: {}
# -----------------------------------------------------------------------------
# Dependency Configuration
# -----------------------------------------------------------------------------
dependencies:
# -- Set to true to use the TrueCharts Prometheus Operator instead of kube-prometheus-stack.
# This chart's ServiceMonitor resources require a Prometheus Operator to be functional.
# If serviceMonitor.enabled is true, one of these two dependencies will be pulled based on this flag.
useTrueChartsPrometheusOperator: false
# -- Repository for the TrueCharts Prometheus Operator.
# Only used if dependencies.useTrueChartsPrometheusOperator is true.
trueChartsPrometheusOperatorRepository: "oci://tccr.io/truecharts"
# -- Chart version for the TrueCharts Prometheus Operator.
# Only used if dependencies.useTrueChartsPrometheusOperator is true.
trueChartsPrometheusOperatorVersion: "8.11.1"