deployment.yaml 2.16 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}"
  namespace: "{{ .Values.k8sNamespace }}"
  labels:
    app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
spec:
  selector:
    matchLabels:
      app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
  replicas: {{ .Values.k8sReplicas}}
  template:
    metadata:
      labels:
        app: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
        group: "{{ .Values.k8sGroupName }}"
        environment: "{{ .Values.k8sEnvironment }}"
    spec:
      containers:
21
        - name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-app"
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
          image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
          # image: guenterh/oaimemobase:latest
          imagePullPolicy: Always
          ports:
            - containerPort: {{ .Values.k8sPort }}
              name: http
              protocol: TCP
          resources:
            requests:
              cpu: "{{ .Values.k8sRequestsCpu }}"
              memory: "{{ .Values.k8sRequestsMemory }}"
            limits:
              cpu: "{{ .Values.k8sLimitsCpu }}"
              memory: "{{ .Values.k8sLimitsMemory }}"
          volumeMounts:
            - mountPath: "{{ .Values.oaiConfPath }}"
              name: oaiconf
            - mountPath: "{{ .Values.secoreConfPath }}"
              name: secureconf
          envFrom:
            - configMapRef:
                name: "{{ .Values.elasticHostConfigs }}"
            - configMapRef:
                name: "{{ .Values.elasticIndexConfigs }}"
            - configMapRef:
                name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment}}-config"
      restartPolicy: Always
      volumes:
        - name: oaiconf
          configMap:
            name: "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-oai-config"
        - name: secureconf
          configMap:
            name:  "{{ .Values.k8sGroupId }}-{{ .Values.k8sName }}-{{ .Values.k8sEnvironment }}-secure-config"