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 | # |
| 16 | # The grafana service |
| 17 | # |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
| 21 | name: grafana |
| 22 | namespace: {{ .Values.global.namespace }} |
| 23 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 24 | spec: |
| 25 | clusterIP: None |
| 26 | selector: |
| 27 | app: grafana |
| 28 | ports: |
| 29 | - name: ui-port |
| 30 | protocol: TCP |
| 31 | port: 8883 |
| 32 | targetPort: 80 |
| 33 | - name: port-2003 |
| 34 | protocol: TCP |
| 35 | port: 2003 |
| 36 | targetPort: 2003 |
| 37 | - name: port-2004 |
| 38 | protocol: TCP |
| 39 | port: 2004 |
| 40 | targetPort: 2004 |
| 41 | - name: port-8126 |
| 42 | protocol: TCP |
| 43 | port: 8126 |
| 44 | targetPort: 8126 |
| 45 | - name: port-8125 |
| 46 | protocol: TCP |
| 47 | port: 8125 |
| 48 | targetPort: 8125 |
| 49 | --- |
| 50 | apiVersion: apps/v1beta1 |
| 51 | kind: Deployment |
| 52 | metadata: |
| 53 | name: grafana |
| 54 | namespace: {{ .Values.global.namespace }} |
| 55 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 56 | spec: |
| 57 | replicas: 1 |
| 58 | template: |
| 59 | metadata: |
| 60 | labels: |
| 61 | app: grafana |
| 62 | spec: |
| 63 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 64 | containers: |
| 65 | - name: grafana |
| 66 | image: {{ .Values.pull_docker_registry }}{{ .Values.images.grafana.repository }}:{{ .Values.images.grafana.tag }} |
| 67 | ports: |
| 68 | - containerPort: 80 |
| 69 | - containerPort: 2003 |
| 70 | - containerPort: 2004 |
| 71 | - containerPort: 8126 |
| 72 | - containerPort: 8125 |
| 73 | env: |
| 74 | - name: GR_SERVER_ROOT_URL |
| 75 | value: "http://localhost:80/grafana/" |