{{- if .Values.gateway.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "shop-recycle.fullname" . }}-gateway labels: app: {{ include "shop-recycle.fullname" . }}-gateway {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} {{- with .Values.gateway.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.gateway.service.type }} ports: - port: {{ .Values.gateway.service.port }} targetPort: {{ .Values.gateway.service.targetPort }} protocol: {{ .Values.gateway.protocol }} name: http selector: app: {{ include "shop-recycle.fullname" . }}-gateway {{- include "shop-recycle.selectorLabels" . | nindent 4 }} {{- end }} --- {{- if .Values.webFrontend.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "shop-recycle.fullname" . }}-web labels: app: {{ include "shop-recycle.fullname" . }}-web {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} {{- with .Values.webFrontend.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.webFrontend.service.type }} ports: - port: {{ .Values.webFrontend.service.port }} targetPort: {{ .Values.webFrontend.service.targetPort }} protocol: {{ .Values.webFrontend.protocol }} name: http selector: app: {{ include "shop-recycle.fullname" . }}-web {{- include "shop-recycle.selectorLabels" . | nindent 4 }} {{- end }} --- {{- if .Values.orderService.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "shop-recycle.fullname" . }}-order-service labels: app: {{ include "shop-recycle.fullname" . }}-order-service {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} {{- with .Values.orderService.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.orderService.service.type }} ports: - port: {{ .Values.orderService.service.port }} targetPort: {{ .Values.orderService.service.targetPort }} protocol: {{ .Values.orderService.protocol }} name: http selector: app: {{ include "shop-recycle.fullname" . }}-order-service {{- include "shop-recycle.selectorLabels" . | nindent 4 }} {{- end }} --- {{- if .Values.paymentService.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "shop-recycle.fullname" . }}-payment-service labels: app: {{ include "shop-recycle.fullname" . }}-payment-service {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} {{- with .Values.paymentService.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.paymentService.service.type }} ports: - port: {{ .Values.paymentService.service.port }} targetPort: {{ .Values.paymentService.service.targetPort }} protocol: {{ .Values.paymentService.protocol }} name: http selector: app: {{ include "shop-recycle.fullname" . }}-payment-service {{- include "shop-recycle.selectorLabels" . | nindent 4 }} {{- end }}