| Giorgi Lekveishvili | b59b7c2 | 2024-04-03 22:17:50 +0400 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Secret |
| 3 | metadata: |
| 4 | name: ssh-key |
| 5 | type: Opaque |
| 6 | data: |
| 7 | private: {{ .Values.sshPrivateKey }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: port-allocator |
| 13 | namespace: {{ .Release.Namespace }} |
| 14 | spec: |
| 15 | type: ClusterIP |
| 16 | selector: |
| 17 | app: port-allocator |
| 18 | ports: |
| 19 | - name: http |
| 20 | port: 80 |
| 21 | targetPort: http |
| 22 | protocol: TCP |
| 23 | --- |
| 24 | apiVersion: apps/v1 |
| 25 | kind: Deployment |
| 26 | metadata: |
| 27 | name: port-allocator |
| 28 | namespace: {{ .Release.Namespace }} |
| 29 | spec: |
| 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 |