# limitations under the License.
*/}}
-{{- if default false .Values.global.metrics.enabled }}
+{{- if not .Values.global.mariadbGalera.useOperator }}
+{{- if default false .Values.global.metrics.enabled }}
+---
apiVersion: v1
kind: Service
metadata:
port: {{ .Values.metrics.service.port }}
targetPort: tcp-metrics
selector: {{- include "common.matchLabels" . | nindent 4 }}
-{{- end }}
+{{- end }}
+{{- end }}
\ No newline at end of file