Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | apiVersion: v1 |
| 16 | kind: Service |
| 17 | metadata: |
| 18 | name: vcli |
| 19 | namespace: {{ .Values.global.namespace }} |
| 20 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 21 | labels: |
| 22 | name: vcli |
| 23 | spec: |
| 24 | type: NodePort |
| 25 | ports: |
| 26 | - name: ssh |
| 27 | port: 5022 |
| 28 | targetPort: 22 |
| 29 | nodePort: {{ .Values.node_ports.vcli_port }} |
| 30 | selector: |
| 31 | app: vcli |
| 32 | --- |
| 33 | apiVersion: apps/v1beta1 |
| 34 | kind: Deployment |
| 35 | metadata: |
| 36 | name: vcli |
| 37 | namespace: {{ .Values.global.namespace }} |
| 38 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 39 | spec: |
| 40 | replicas: 2 |
| 41 | template: |
| 42 | metadata: |
| 43 | labels: |
| 44 | app: vcli |
| 45 | annotations: |
| 46 | cni: "weave" |
| 47 | spec: |
| 48 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 49 | containers: |
| 50 | - name: vcli |
| 51 | image: {{ .Values.pull_docker_registry }}{{ .Values.images.vcli.repository }}:{{ .Values.images.vcli.tag }} |
| 52 | env: |
| 53 | - name: POD_IP |
| 54 | valueFrom: |
| 55 | fieldRef: |
| 56 | fieldPath: status.podIP |
| 57 | - name: NAMESPACE |
| 58 | valueFrom: |
| 59 | fieldRef: |
| 60 | fieldPath: metadata.namespace |
| 61 | args: |
| 62 | {{ toYaml .Values.vcli_args | indent 12 }} |
| 63 | ports: |
| 64 | - containerPort: 22 |
| 65 | name: ssh-port |
| 66 | imagePullPolicy: {{ .Values.image_pull_policy }} |
| 67 | |
| 68 | |