DBaaS standalone and HA version update
[ric-plt/ric-dep.git] / helm / dbaas / templates / service.yaml
similarity index 86%
rename from helm/dbaasha/templates/service.yaml
rename to helm/dbaas/templates/service.yaml
index 4aab7be..f4f476e 100644 (file)
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
-
+---
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.servicename.dbaasha.tcp" . }}
+  name: {{ include "common.servicename.dbaas.tcp" . }}
   labels:
-    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,13 +29,15 @@ spec:
   clusterIP: None
   ports:
   - name: server
-    port: {{ include "common.serviceport.dbaasha.redis" . }}
+    port: {{ include "common.serviceport.dbaas.redis" . }}
     protocol: TCP
     targetPort: redis
+{{- if $.Values.dbaas.enableHighAvailability }}
   - name: sentinel
-    port: {{ include "common.serviceport.dbaasha.sentinel" . }}
+    port: {{ include "common.serviceport.dbaas.sentinel" . }}
     protocol: TCP
     targetPort: sentinel
+{{- end }}
   selector:
     release: {{ .Release.Name }}
-    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}