First version of service exposure
[nonrtric.git] / service-exposure / rapps-keycloak-mgr.yaml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2022 Nordix Foundation.
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 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19 #
20 apiVersion: apps/v1
21 kind: Deployment
22 metadata:
23   name: rapps-keycloak-mgr-deployment
24   namespace: default
25   labels:
26     app: rapps-keycloak-mgr
27 spec:
28   selector:
29     matchLabels:
30       app: rapps-keycloak-mgr
31   template:
32     metadata:
33       labels:
34         app: rapps-keycloak-mgr 
35         version: v1
36     spec:
37       containers:
38       - name: rapps-keycloak-mgr
39         image: ktimoney/rapps-keycloak-mgr
40         imagePullPolicy: IfNotPresent
41         ports:
42         - containerPort: 9000 
43         resources:
44           limits:
45             memory: 256Mi
46             cpu: "250m"
47           requests:
48             memory: 128Mi
49             cpu: "80m"
50         volumeMounts:
51         - name: certsdir
52           mountPath: /certs
53           readOnly: true
54       volumes:
55       - name: certsdir
56         hostPath:
57           # Ensure the file directory is created.
58            path: /var/rapps/certs
59            type: DirectoryOrCreate
60       serviceAccountName: helm-app
61   replicas: 1 
62 ---
63 apiVersion: v1
64 kind: Service
65 metadata:
66   name: rapps-keycloak-mgr
67   namespace: default
68 spec:
69   selector:
70     app: rapps-keycloak-mgr
71   ports:
72     - protocol: TCP
73       port: 80 
74       targetPort: 9000 
75       nodePort: 31600
76   type: NodePort