diff --git a/charts/pulsar/templates/autorecovery-podmonitor.yaml b/charts/pulsar/templates/autorecovery-podmonitor.yaml index a141b37c..2683baee 100644 --- a/charts/pulsar/templates/autorecovery-podmonitor.yaml +++ b/charts/pulsar/templates/autorecovery-podmonitor.yaml @@ -17,7 +17,7 @@ # under the License. # -# deploy autorecovery PodMonitor only when `$.Values.autorecovery.podMonitor.enabled` is true -{{- if and $.Values.autorecovery.podMonitor.enabled (not $.Values.standalone.enabled) }} +# deploy autorecovery PodMonitor only when the autorecovery component and `$.Values.autorecovery.podMonitor.enabled` are both enabled +{{- if and $.Values.components.autorecovery $.Values.autorecovery.podMonitor.enabled (not $.Values.standalone.enabled) }} {{- include "pulsar.podMonitor" (list . "autorecovery" (printf "component: %s" .Values.autorecovery.component)) }} {{- end }} \ No newline at end of file diff --git a/charts/pulsar/templates/bookkeeper-podmonitor.yaml b/charts/pulsar/templates/bookkeeper-podmonitor.yaml index 005e22b4..08fb7bf3 100644 --- a/charts/pulsar/templates/bookkeeper-podmonitor.yaml +++ b/charts/pulsar/templates/bookkeeper-podmonitor.yaml @@ -17,7 +17,7 @@ # under the License. # -# deploy bookkeeper PodMonitor only when `$.Values.bookkeeper.podMonitor.enabled` is true -{{- if and $.Values.bookkeeper.podMonitor.enabled (not $.Values.standalone.enabled) }} +# deploy bookkeeper PodMonitor only when the bookkeeper component and `$.Values.bookkeeper.podMonitor.enabled` are both enabled +{{- if and $.Values.components.bookkeeper $.Values.bookkeeper.podMonitor.enabled (not $.Values.standalone.enabled) }} {{- include "pulsar.podMonitor" (list . "bookkeeper" (printf "component: %s" .Values.bookkeeper.component)) }} {{- end }} \ No newline at end of file diff --git a/charts/pulsar/templates/broker-hpa.yaml b/charts/pulsar/templates/broker-hpa.yaml index d165c33c..aec40615 100644 --- a/charts/pulsar/templates/broker-hpa.yaml +++ b/charts/pulsar/templates/broker-hpa.yaml @@ -17,7 +17,7 @@ # under the License. # -{{- if and .Values.broker.autoscaling.enabled (not .Values.standalone.enabled) }} +{{- if and .Values.components.broker .Values.broker.autoscaling.enabled (not .Values.standalone.enabled) }} {{- if (semverCompare "<1.23-0" .Capabilities.KubeVersion.Version) }} apiVersion: autoscaling/v2beta2 {{- else }} diff --git a/charts/pulsar/templates/broker-podmonitor.yaml b/charts/pulsar/templates/broker-podmonitor.yaml index 16e332d2..f041f60e 100644 --- a/charts/pulsar/templates/broker-podmonitor.yaml +++ b/charts/pulsar/templates/broker-podmonitor.yaml @@ -17,7 +17,7 @@ # under the License. # -# deploy broker PodMonitor only when `$.Values.broker.podMonitor.enabled` is true -{{- if and $.Values.broker.podMonitor.enabled (not $.Values.standalone.enabled) }} +# deploy broker PodMonitor only when the broker component and `$.Values.broker.podMonitor.enabled` are both enabled +{{- if and $.Values.components.broker $.Values.broker.podMonitor.enabled (not $.Values.standalone.enabled) }} {{- include "pulsar.podMonitor" (list . "broker" (printf "component: %s" .Values.broker.component)) }} {{- end }} \ No newline at end of file diff --git a/charts/pulsar/templates/proxy-hpa.yaml b/charts/pulsar/templates/proxy-hpa.yaml index b190560a..106a26af 100644 --- a/charts/pulsar/templates/proxy-hpa.yaml +++ b/charts/pulsar/templates/proxy-hpa.yaml @@ -17,7 +17,7 @@ # under the License. # -{{- if .Values.proxy.autoscaling.enabled }} +{{- if and .Values.components.proxy .Values.proxy.autoscaling.enabled }} {{- if (semverCompare "<1.23-0" .Capabilities.KubeVersion.Version) }} apiVersion: autoscaling/v2beta2 {{- else }} diff --git a/charts/pulsar/templates/proxy-podmonitor.yaml b/charts/pulsar/templates/proxy-podmonitor.yaml index e4e7b237..4c611232 100644 --- a/charts/pulsar/templates/proxy-podmonitor.yaml +++ b/charts/pulsar/templates/proxy-podmonitor.yaml @@ -17,7 +17,7 @@ # under the License. # -# deploy proxy PodMonitor only when `$.Values.proxy.podMonitor.enabled` is true -{{- if $.Values.proxy.podMonitor.enabled }} +# deploy proxy PodMonitor only when the proxy component and `$.Values.proxy.podMonitor.enabled` are both enabled +{{- if and $.Values.components.proxy $.Values.proxy.podMonitor.enabled }} {{- include "pulsar.podMonitor" (list . "proxy" (printf "component: %s" .Values.proxy.component) "sts-http") }} {{- end }} \ No newline at end of file