Adding helm chart & documentation for redis-cluster related study ticket
[ric-plt/ric-dep.git] / helm / redis-cluster / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata:
20   name: {{ .Values.assigner.name }}-dep
21   namespace: {{ .Release.Namespace }}
22   labels:
23     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24     release: {{ .Release.Name }}
25 spec:
26   replicas: 1
27   selector:
28     matchLabels:
29       app: {{ .Values.assigner.label }}
30       release: {{ .Release.Name }}
31   template:
32     metadata:
33       labels:
34         app: {{ .Values.assigner.label }}
35         release: {{ .Release.Name }}
36     spec:
37       containers:
38       - name: kubectl
39         hostname: {{ .Values.assigner.label }}
40         image: "bitnami/kubectl:1.18"
41         command: ["/bin/sh"]
42         args: ["-c", "sleep 3000"]
43         env:
44         - name: "POD_LABEL"
45           value: app.kubernetes.io/instance={{ .Release.Name }}
46
47         volumeMounts:
48         - name: conf
49           mountPath: /conf
50           readOnly: false
51       volumes:
52       - name: conf
53         configMap:
54           name: {{ .Values.assigner.name }}-cm
55           defaultMode: 0755
56       serviceAccountName: {{ .Values.assigner.name }}-sa