[MARIADB][COMMON] Add support for mariadb-operator
[oom.git] / kubernetes / common / mariadb-galera / templates / service.yaml
index 6af9135..4cabde1 100644 (file)
 # limitations under the License.
 */}}
 
+{{- if not .Values.global.mariadbGalera.useOperator }}
 {{ include "common.service" . }}
 ---
 {{ include "common.headlessService" . }}
+{{- end }}
 {{- if (include "common.onServiceMesh" .) }}
-{{- if eq (default "istio" .Values.global.serviceMesh.engine) "istio" }}
+{{-   if eq (default "istio" .Values.global.serviceMesh.engine) "istio" }}
 ---
 apiVersion: security.istio.io/v1beta1
 kind: PeerAuthentication
@@ -29,9 +31,9 @@ metadata:
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: {{ include "common.servicename" . }}
+      app: {{ include "common.servicename" . }}
   portLevelMtls:
     '{{ .Values.service.internalPort }}':
       mode: DISABLE
-{{- end}}
-{{- end}}
+{{-   end }}
+{{- end }}