Skip to content

Commit c4cffd1

Browse files
eliranwclaude
andauthored
fix: skip KWOK PrometheusRule when CRD is not available (#171)
## Summary - Add Capabilities.APIVersions check to the KWOK PrometheusRule template - Prevents Helm from rendering the PrometheusRule on clusters without the Prometheus Operator CRD installed - Fixes integration test failures --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 63b4db4 commit c4cffd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deploy/fake-gpu-operator/templates/status-exporter/kwok-prometheusrule.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.statusExporter.enabled (ne (.Values.statusExporter.kwok.prometheusRule.enabled | toString) "false") -}}
1+
{{- if and .Values.statusExporter.enabled (ne (.Values.statusExporter.kwok.prometheusRule.enabled | toString) "false") (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") -}}
22
apiVersion: monitoring.coreos.com/v1
33
kind: PrometheusRule
44
metadata:

0 commit comments

Comments
 (0)