Add docker-compose file for odu-app
[nonrtric.git] / helm-manager / helm-manager.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2020 Nordix Foundation. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 apiVersion: v1
19 kind: Service
20 metadata:
21   name: helmmanagerservice
22   namespace: nonrtric
23   labels:
24     run: helmmanagerservice
25 spec:
26   type: NodePort
27   ports:
28   - port: 8080
29     targetPort: 8083
30     protocol: TCP
31     name: http
32   - port: 8443
33     targetPort: 8443
34     protocol: TCP
35     name: https
36   selector:
37     run: helmmanagerservice
38
39 ---
40
41 apiVersion: v1
42 kind: Pod
43 metadata:
44   name: helmmanagerservice
45   namespace: nonrtric
46   labels:
47     run: helmmanagerservice
48 spec:
49   serviceAccountName: helm-manager-sa
50   containers:
51   - name: helmmanagerservice
52     image: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-helm-manager:1.1.0
53     imagePullPolicy: Always
54     ports:
55     - name: http
56       containerPort: 8083
57     - name: https
58       containerPort: 8443
59     volumeMounts:
60     - mountPath: /var/helm-manager-service
61       name: helm-manager-service-pv
62   volumes:
63   - name: helm-manager-service-pv
64     persistentVolumeClaim:
65       claimName: helm-manager-service-pvc
66   initContainers:
67   - name: change-ownership-container
68     image: busybox:latest
69     command: ["sh","-c","chown -R 999:1000 /var/helm-manager-service"]
70     resources: {}
71     volumeMounts:
72     - mountPath: /var/helm-manager-service
73       name: helm-manager-service-pv
74 ---
75
76 apiVersion: v1
77 kind: PersistentVolume
78 metadata:
79   name: helm-manager-service-pv
80   labels:
81     run: helm-manager-service
82 spec:
83   storageClassName: helm-manager-service-standard
84   capacity:
85     storage: 10Mi
86   accessModes:
87     - ReadWriteOnce
88   persistentVolumeReclaimPolicy: Delete
89   hostPath:
90     path: "/tmp/helm-manager-service"
91
92 ---
93
94 apiVersion: v1
95 kind: PersistentVolumeClaim
96 metadata:
97   name: helm-manager-service-pvc
98   namespace: nonrtric
99   labels:
100     run: helm-manager-service
101 spec:
102   accessModes:
103   - ReadWriteOnce
104   resources:
105     requests:
106       storage: 10Mi
107   storageClassName: helm-manager-service-standard
108   volumeMode: Filesystem