changed to unmaintained
[aaf/authz.git] / auth / helm / aaf / templates / aaf-service.yaml
1 #########
2 ##  ============LICENSE_START====================================================
3 ##  org.onap.aaf
4 ##  ===========================================================================
5 ##  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
6 ##  ===========================================================================
7 ##  Licensed under the Apache License, Version 2.0 (the "License");
8 ##  you may not use this file except in compliance with the License.
9 ##  You may obtain a copy of the License at
10 ##
11 ##       http://www.apache.org/licenses/LICENSE-2.0
12 ##
13 ##  Unless required by applicable law or agreed to in writing, software
14 ##  distributed under the License is distributed on an "AS IS" BASIS,
15 ##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 ##  See the License for the specific language governing permissions and
17 ##  limitations under the License.
18 ##  ============LICENSE_END====================================================
19 ##
20 ###
21 ### AAF-SERVICE
22 ###
23 kind: Service
24 apiVersion: v1
25 metadata:
26   name: aaf-service
27 spec:
28   type: NodePort
29   selector:
30     app: aaf-service
31   ports:
32     - name: {{.Values.services.service.fqdn}}
33       protocol: TCP
34       nodePort: {{.Values.services.service.public_port}}
35       port: {{.Values.services.service.internal_port}}
36 ---
37 apiVersion: apps/v1
38 kind: Deployment
39 metadata:
40   name: aaf-service
41   labels:
42     app: aaf-service
43 spec:
44   replicas: {{ .Values.services.service.replicas }}
45   selector:
46     matchLabels:
47       app: aaf-service
48   template:
49     metadata:
50       labels:
51         app: aaf-service
52     spec:
53       volumes:
54       - name: aaf-config-vol
55         persistentVolumeClaim:
56           claimName: aaf-config-pvc
57       - name: aaf-status-vol
58         persistentVolumeClaim:
59           claimName: aaf-status-pvc
60       initContainers:
61         - command:
62             - /bin/sh
63             - -c
64             - |
65               chmod -R 775 /opt/app/aaf/status
66               chown -R 1000:1000 /opt/app/aaf/status
67               chmod -R 775 /opt/app/osaaf
68               chown -R 1000:1000 /opt/app/osaaf
69           image: busybox:1.28
70           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71           name: init-sysctl
72           volumeMounts:
73           - mountPath: /opt/app/aaf/status
74             name: aaf-status-vol
75           - mountPath: /opt/app/osaaf
76             name: aaf-config-vol
77         - name: aaf-config-container
78           image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }}
79           imagePullPolicy: IfNotPresent
80           command: ["bash","-c","/opt/app/aaf_config/bin/agent.sh"]
81           volumeMounts:
82             - mountPath: "/opt/app/osaaf"
83               name: aaf-config-vol
84             - mountPath: "/opt/app/aaf/status"
85               name: aaf-status-vol
86           env:
87             - name: aaf_env
88               value: "{{ .Values.services.aaf_env }}"
89             - name: aaf_id
90               value: "{{ .Values.services.aaf_id }}"
91             - name: aaf_locate_url
92               value: "https://aaf-locate.{{.Release.Namespace }}:{{.Values.services.locate.internal_port}}"
93             - name: aaf_locator_container
94               value: "helm"
95             - name: aaf_locator_container_ns
96               value: "{{ .Release.Namespace }}"
97             - name: aaf_locator_fqdn
98               value: "{{.Values.services.fqdn}}"
99             - name: aaf_locator_public_fqdn
100               value: "{{.Values.services.public_fqdn}}"
101             - name: cadi_latitude
102               value: "{{ .Values.services.cadi_latitude }}"
103             - name: cadi_longitude
104               value: "{{ .Values.services.cadi_longitude }}"
105             - name: cm_always_ignore_ips
106               value: "true"
107             - name: CASSANDRA_CLUSTER
108               value: "{{.Values.services.cass.fqdn}}.{{.Release.Namespace }}"
109 #            - name: CASSANDRA_USER
110 #              value: ""
111 #            - name: CASSANDRA_PASSWORD
112 #              value: ""
113 #           - name: CASSANDRA_PORT
114 #              value: ""
115 ###
116 ### AAF-SERVICE
117 ###
118       containers:
119       - name: aaf-service
120         image: {{ .Values.image.repository }}onap/aaf/aaf_core:{{ .Values.image.version }}
121         imagePullPolicy: IfNotPresent
122         command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-service nc aaf-cass.{{ .Release.Namespace }} {{ .Values.services.cass.native_trans_port }} aaf-cass && exec bin/service"]
123         volumeMounts:
124         -  mountPath: "/opt/app/osaaf"
125            name: aaf-config-vol
126         -  mountPath: "/opt/app/aaf/status"
127            name: aaf-status-vol
128         ports:
129         - name: service
130           protocol: TCP
131           containerPort: {{.Values.services.service.internal_port}}
132