| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: "{{ .Values.submarine.server.name }}" |
| labels: |
| run: "{{ .Values.submarine.server.name }}" |
| spec: |
| ports: |
| - port: 8080 |
| targetPort: {{ .Values.submarine.server.servicePort }} |
| protocol: TCP |
| selector: |
| run: "{{ .Values.submarine.server.name }}" |
| |
| --- |
| apiVersion: v1 |
| kind: ServiceAccount |
| metadata: |
| name: "{{ .Values.submarine.server.name }}" |
| --- |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| name: "{{ .Values.submarine.server.name }}" |
| spec: |
| selector: |
| matchLabels: |
| run: "{{ .Values.submarine.server.name }}" |
| replicas: {{ .Values.submarine.server.replicas }} |
| template: |
| metadata: |
| labels: |
| run: "{{ .Values.submarine.server.name }}" |
| annotations: |
| timestamp: {{ now | quote }} |
| spec: |
| serviceAccountName: "{{ .Values.submarine.server.name }}" |
| containers: |
| - name: "{{ .Values.submarine.server.name }}" |
| env: |
| - name: SUBMARINE_SERVER_PORT |
| value: "8080" |
| - name: SUBMARINE_SERVER_PORT_8080_TCP |
| value: "8080" |
| - name: SUBMARINE_SERVER_DNS_NAME |
| value: "{{ .Values.submarine.server.name }}.{{ .Release.Namespace }}" |
| - name: K8S_APISERVER_URL |
| value: "kubernetes.default.svc" |
| |
| image: "{{ .Values.submarine.server.image }}" |
| imagePullPolicy: {{ .Values.submarine.server.imagePullPolicy }} |
| ports: |
| - containerPort: 8080 |
| |