aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/vid/templates/vid-server-deployment.yaml
blob: 7f9cb653b2dbaede10e65868c34a0c73e9e3a1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#{{ if not .Values.disableVidVidServer }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: vid-server
  name: vid-server
  namespace: "{{ .Values.nsPrefix }}-vid"
spec:
  replicas: {{ .Values.vidServerReplicas }}
  selector:
    matchLabels:
      app: vid-server
  template:
    metadata:
      labels:
        app: vid-server
      name: vid-server
    spec:
      initContainers:
      - command:
        - /root/ready.py
        args:
        - --container-name
        - vid-mariadb
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: {{ .Values.image.readiness }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        name: vid-server-readiness
      containers:
      - env:
        - name: ASDC_CLIENT_REST_HOST
          value: sdc-be.{{ .Values.nsPrefix }}-sdc
        - name: ASDC_CLIENT_REST_AUTH
          value: Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
        - name: ASDC_CLIENT_REST_PORT
          value: "8080"
        - name: VID_AAI_HOST
          value: aai-service.{{ .Values.nsPrefix }}-aai
        - name: VID_AAI_PORT
          value: "8443"
        - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
          value: http://portalapps.{{ .Values.nsPrefix }}-portal:8989/ONAPPORTAL/context
        - name: VID_MSO_SERVER_URL
          value: http://mso.{{ .Values.nsPrefix }}-mso:8080
        - name: VID_MSO_PASS
          value: OBF:1ih71i271vny1yf41ymf1ylz1yf21vn41hzj1icz
        - name: MSO_DME2_SERVER_URL
          value: http://localhost:8081
        - name: MSO_DME2_ENABLED
          value: "false"
        - name: VID_ECOMP_REDIRECT_URL
          value: http://portalapps.{{ .Values.nsPrefix }}-portal:8989/ONAPPORTAL/login.htm
        - name: VID_ECOMP_REST_URL
          value: http://portalapps.{{ .Values.nsPrefix }}-portal:8989/ONAPPORTAL/auxapi
        - name: VID_CONTACT_US_LINK
          value: https://todo_contact_us_link.com
        - name: VID_UEB_URL_LIST
          value: dmaap.{{ .Values.nsPrefix }}-message-router
        - name: VID_MYSQL_HOST
          value: vid-mariadb
        - name: VID_MYSQL_PORT
          value: "3306"
        - name: VID_MYSQL_DBNAME
          value: vid_openecomp_epsdk
        - name: VID_MYSQL_USER
          value: vidadmin
        - name: VID_MYSQL_PASS
          value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
        - name: VID_MYSQL_MAXCONNECTIONS
          value: "5"
        image: {{ .Values.image.vid }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        name: vid-server
        lifecycle:
          postStart:
            exec:
              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/usr/local/tomcat/webapps/vid/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
        ports:
        - containerPort: 8080
        volumeMounts:
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        - mountPath: /var/log/onap
          name: vid-logs
        - mountPath: /tmp/logback.xml
          name: vid-logback
          subPath: logback.xml
        readinessProbe:
          tcpSocket:
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 10
      - image: {{ .Values.image.filebeat }}
        imagePullPolicy: {{ .Values.pullPolicy }}
        name: filebeat-onap
        volumeMounts:
        - mountPath: /usr/share/filebeat/filebeat.yml
          name: filebeat-conf
          subPath: filebeat.yml
        - mountPath: /var/log/onap
          name: vid-logs
        - mountPath: /usr/share/filebeat/data
          name: vid-data-filebeat
      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: filebeat-conf
          configMap:
            name: vid-filebeat-configmap
        - name: vid-logs
          emptyDir: {}
        - name: vid-data-filebeat
          emptyDir: {}
        - name: vid-logback
          configMap:
            name: vid-log-configmap
      imagePullSecrets:
      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}