anosulchik commented on code in PR #605:
URL: https://github.com/apache/pulsar-helm-chart/pull/605#discussion_r2073532331


##########
charts/pulsar/templates/oxia-coordinator-podmonitor.yaml:
##########
@@ -19,5 +19,5 @@
 
 # deploy oxia-coordinator PodMonitor only when 
`$.Values.oxia.coordinator.podMonitor.enabled` is true
 {{- if and $.Values.components.oxia 
$.Values.oxia.coordinator.podMonitor.enabled }}
-{{- include "pulsar.podMonitor" (list . "oxia.coordinator" 
"app.kubernetes.io/component: oxia-coordinator" "metrics") }}

Review Comment:
   @lhotari 
   
   It doesn't seem to be working:
   
   ```
    # deploy oxia-server PodMonitor only when 
`$.Values.oxia.server.podMonitor.enabled` is true
    {{- if and $.Values.components.oxia $.Values.oxia.server.podMonitor.enabled 
}}
   {{- include "pulsar.podMonitor" (list . "oxia.server" (printf "component: 
%s-server" .Values.oxia.component)) "metrics" }}
    {{- end }}
   ```
   
   results in error:
   
   ```
   Error: template: pulsar/templates/oxia-server-podmonitor.yaml:22:4: 
executing "pulsar/templates/oxia-server-podmonitor.yaml" at <include>: wrong 
number of args for include: want 2 got 3
   ```
   
   I also see that port param is not included in other podmonitors:
   
   ```
   # deploy bookkeeper PodMonitor only when 
`$.Values.bookkeeper.podMonitor.enabled` is true
   {{- if $.Values.bookkeeper.podMonitor.enabled }}
   {{- include "pulsar.podMonitor" (list . "bookkeeper" (printf "component: %s" 
.Values.bookkeeper.component)) }}
   {{- end }}
   ```
   
   Also, it looks like 4th param is supposed to be optional - it doesn't work 
as expected since adding "metrics" above leads to an error.
   
   ```
   # templates/_monitor.tpl
   ...
   {{- define "pulsar.podMonitor" -}}
   {{- $root := index . 0 }}
   {{- $component := index . 1 }}
   {{- $matchLabel := index . 2 }}
   {{- $portName := "http" }}
   {{- if gt (len .) 3 }}
   {{- $portName = index . 3 }}
   {{- end }}
   
   ...
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to