blob: ec7a1442130164e7c4b239b11973c757aba4f659 [file] [log] [blame]
Giorgi Lekveishvilib59b7c22024-04-03 22:17:50 +04001apiVersion: v1
2kind: Secret
3metadata:
4 name: ssh-key
5type: Opaque
6data:
7 private: {{ .Values.sshPrivateKey }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: port-allocator
13 namespace: {{ .Release.Namespace }}
14spec:
15 type: ClusterIP
16 selector:
17 app: port-allocator
18 ports:
19 - name: http
20 port: 80
21 targetPort: http
22 protocol: TCP
23---
24apiVersion: apps/v1
25kind: Deployment
26metadata:
27 name: port-allocator
28 namespace: {{ .Release.Namespace }}
29spec:
30 selector:
31 matchLabels:
32 app: port-allocator
33 replicas: 1
34 template:
35 metadata:
36 labels:
37 app: port-allocator
38 spec:
39 volumes:
40 - name: ssh-key
41 secret:
42 secretName: ssh-key
43 containers:
44 - name: port-allocator
45 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
46 imagePullPolicy: {{ .Values.image.pullPolicy }}
47 ports:
48 - name: http
49 containerPort: 8080
50 protocol: TCP
51 command:
52 - server
53 - --port=8080
54 - --repo-addr={{ .Values.repoAddr }}
55 - --ssh-key=/pcloud/ssh-key/private
56 - --ingress-nginx-path={{ .Values.ingressNginxPath }}
57 volumeMounts:
58 - name: ssh-key
59 readOnly: true
60 mountPath: /pcloud/ssh-key