Refactor Helm management
[nonrtric/plt/sme.git] / capifcore / configs / capif.yaml
diff --git a/capifcore/configs/capif.yaml b/capifcore/configs/capif.yaml
new file mode 100644 (file)
index 0000000..f85ff6b
--- /dev/null
@@ -0,0 +1,67 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: helm-app
+  namespace: default
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: helm-app
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+  - kind: ServiceAccount
+    name: helm-app
+    namespace: default
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: capif-deployment
+  namespace: default
+  labels:
+    app: capif
+spec:
+  selector:
+    matchLabels:
+      app: capif
+  template:
+    metadata:
+      labels:
+        app: capif
+        version: v1
+    spec:
+      containers:
+      - name: capif
+        image: o-ran-sc.org/nonrtric/plt/capifcore
+        imagePullPolicy: IfNotPresent
+        ports:
+        - containerPort: 8090
+        resources:
+          limits:
+            memory: 256Mi
+            cpu: "250m"
+          requests:
+            memory: 128Mi
+            cpu: "80m"
+        args: ["-chartMuseumUrl", "http://chartmuseum:8080"]
+      serviceAccountName: helm-app
+  replicas: 1
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: capif
+  namespace: default
+spec:
+  selector:
+    app: capif
+  ports:
+    - protocol: TCP
+      port: 80
+      targetPort: 8090
+      nodePort: 31570
+  type: NodePort