Ver Fonte

Update nextcloud service to use library chart

Waqar Ahmed há 4 anos atrás
pai
commit
0651c9fcab
1 ficheiros alterados com 6 adições e 20 exclusões
  1. 6 20
      test/nextcloud/1.1.0/templates/service.yaml

+ 6 - 20
test/nextcloud/1.1.0/templates/service.yaml

@@ -1,20 +1,6 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ template "nextcloud.fullname" . }}
-  labels:
-    app.kubernetes.io/name: {{ include "nextcloud.name" . }}
-    helm.sh/chart: {{ include "nextcloud.chart" . }}
-    app.kubernetes.io/instance: {{ .Release.Name }}
-    app.kubernetes.io/managed-by: {{ .Release.Service }}
-    app.kubernetes.io/component: app
-spec:
-  type: NodePort
-  ports:
-  - port: 80
-    targetPort: http
-    protocol: TCP
-    name: http
-    nodePort: {{ default "" .Values.service.nodePort}}
-  selector:
-    {{- include "nextcloud.selectorLabels" . | nindent 4 }}
+{{ $svc := .Values.service }}
+{{ $ports := list }}
+{{ $ports = mustAppend $ports (dict "name" "http" "port" 80 "nodePort" $svc.nodePort) }}
+{{ $params := . }}
+{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
+{{ include "common.classes.service" $params }}