Compare commits

..

2 Commits

Author SHA1 Message Date
google-labs-jules[bot] 6013081af9 fix: Integrate bjw-s/common library for exporter controller
- Corrected bjw-s/common library repository URL in Chart.yaml to the
  traditional HTTPS URL and ensured dependencies are fetched.
- Renamed exporter template to exporter-controller.yaml.
- Updated exporter-controller.yaml to correctly use
  `bjw-s.common.render.controllers` for rendering.
- Refined the context passed to the common library to include Values, Chart,
  Release, and Capabilities, and initialized expected top-level keys
  (global, defaultPodOptionsStrategy) in the Values.
- Ensured image.tag is defaulted to Chart.AppVersion in the template data
  to pass common library validations.
- Helm lint and template commands now pass successfully for both
  Deployment and DaemonSet configurations of the exporter.
2025-07-01 21:20:43 +00:00
google-labs-jules[bot] 6228177c69 fix: Correct common lib repo URL, rename exporter template
- Reverted common library repository URL in Chart.yaml to
  https://bjw-s-labs.github.io/helm-charts/.
- Ensured helm dependency commands are run after adding repositories.
- Renamed exporter template from exporter-deployment.yaml to
  exporter-controller.yaml to better reflect its new role with common library.

Note: Full helm lint/template validation with dependencies was not possible
in the automated environment due to issues with dependency file persistence
in the sandbox.
2025-07-01 21:00:28 +00:00
3 changed files with 7 additions and 17 deletions

View File

@ -19,16 +19,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0 # Using a specific version, can be updated
- name: Add Helm repositories
run: |
helm repo add bjw-s https://bjw-s-labs.github.io/helm-charts/ --force-update
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts --force-update
helm repo update
- name: Build Helm chart dependencies
run: helm dependency build ./charts/iperf3-monitor
version: v3.10.0
- name: Helm Lint
run: helm lint ./charts/iperf3-monitor

View File

@ -45,7 +45,7 @@ Proceed with modifications only if the exporter controller is defined.
{{- $_ := set $baseExporterEnv "IPERF_SERVER_NAMESPACE" (dict "valueFrom" (dict "fieldRef" (dict "fieldPath" "metadata.namespace"))) -}}
{{- $_ := set $baseExporterEnv "IPERF_TEST_TIMEOUT" ($exporterControllerConfig.appConfig.testTimeout | default "10" | toString) -}}
{{- $serverLabelSelectorDefault := printf "app.kubernetes.io/name=%s,app.kubernetes.io/instance=%s,app.kubernetes.io/component=server" $appName $release.Name -}}
{{- $serverLabelSelector := tpl ($exporterControllerConfig.appConfig.serverLabelSelector | default $serverLabelSelectorDefault) . -}}
{{- $serverLabelSelector := tpl ($exporterControllerConfig.appConfig.serverLabelSelector | default $serverLabelSelectorDefault) (dict "Release" $release "Chart" $chart "Values" $localValues) -}}
{{- $_ := set $baseExporterEnv "IPERF_SERVER_LABEL_SELECTOR" $serverLabelSelector -}}
{{- end -}}
@ -124,6 +124,6 @@ Ensure defaultPodOptionsStrategy exists, as common lib expects it at the root of
Call the common library's main render function for controllers.
This function iterates through all controllers defined under $localValues.controllers
(in our case, just "exporter") and renders them using their specified type and configuration.
The context passed must mirror the global Helm context, including 'Values', 'Chart', 'Release', 'Capabilities', and 'Template'.
The context passed must mirror the global Helm context, including 'Values', 'Chart', 'Release', and 'Capabilities'.
*/}}
{{- include "bjw-s.common.render.controllers" (dict "Values" $localValues "Chart" $chart "Release" $release "Capabilities" .Capabilities "Template" .Template) | nindent 0 -}}
{{- include "bjw-s.common.render.controllers" (dict "Values" $localValues "Chart" $chart "Release" $release "Capabilities" .Capabilities) | nindent 0 -}}

View File

@ -198,8 +198,7 @@ networkPolicy:
# Dependency Configuration (for Prometheus Operator)
dependencies:
# -- Set to false by default. Set to true to install a Prometheus operator dependency (used if serviceMonitor.enabled=true).
# -- If false (default), and serviceMonitor.enabled is true, you must have a compatible Prometheus Operator already running in your cluster.
install: false
# -- If true, use TrueCharts Prometheus Operator instead of kube-prometheus-stack (used if dependencies.install is true).
# -- If true, install Prometheus operator dependency (used if serviceMonitor.enabled=true).
install: true
# -- If true, use TrueCharts Prometheus Operator instead of kube-prometheus-stack.
useTrueChartsPrometheusOperator: false