| giolekva | ef76a3e | 2022-01-10 12:22:28 +0400 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: torrent |
| 5 | namespace: {{ .Release.Namespace }} |
| 6 | spec: |
| 7 | type: ClusterIP |
| 8 | selector: |
| 9 | app: torrent |
| 10 | ports: |
| 11 | - name: http |
| 12 | port: 80 |
| 13 | targetPort: http |
| 14 | protocol: TCP |
| 15 | - name: bittorrent-tcp |
| 16 | port: {{ .Values.bittorrent.port }} |
| 17 | targetPort: bittorrent |
| 18 | protocol: TCP |
| 19 | - name: bittorrent-udp |
| 20 | port: {{ .Values.bittorrent.port }} |
| 21 | targetPort: bittorrent |
| 22 | protocol: UDP |
| 23 | --- |
| 24 | apiVersion: networking.k8s.io/v1 |
| 25 | kind: Ingress |
| 26 | metadata: |
| 27 | name: ingress |
| 28 | namespace: {{ .Release.Namespace }} |
| 29 | spec: |
| 30 | ingressClassName: {{ .Values.ingress.className }} |
| 31 | tls: |
| 32 | - hosts: |
| 33 | - {{ .Values.ingress.domain }} |
| 34 | rules: |
| 35 | - host: {{ .Values.ingress.domain }} |
| 36 | http: |
| 37 | paths: |
| 38 | - path: / |
| 39 | pathType: Prefix |
| 40 | backend: |
| 41 | service: |
| 42 | name: torrent |
| 43 | port: |
| 44 | name: http |
| 45 | --- |
| 46 | apiVersion: apps/v1 |
| 47 | kind: Deployment |
| 48 | metadata: |
| 49 | name: torrent |
| 50 | namespace: {{ .Release.Namespace }} |
| 51 | spec: |
| 52 | selector: |
| 53 | matchLabels: |
| 54 | app: torrent |
| 55 | replicas: 1 |
| 56 | template: |
| 57 | metadata: |
| 58 | labels: |
| 59 | app: torrent |
| 60 | spec: |
| 61 | volumes: |
| 62 | - name: data |
| 63 | persistentVolumeClaim: |
| 64 | claimName: data |
| 65 | containers: |
| 66 | - name: torrent |
| 67 | image: {{ .Values.image.repository }}:{{ .Values.image.tag }} |
| 68 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 69 | ports: |
| 70 | - name: http |
| 71 | containerPort: {{ .Values.webui.port }} |
| 72 | protocol: TCP |
| 73 | - name: bittorrent |
| 74 | containerPort: {{ .Values.bittorrent.port }} |
| 75 | volumeMounts: |
| 76 | - name: data |
| 77 | mountPath: /downloads |
| 78 | readOnly: false |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 79 | # nodeSelector: |
| 80 | # "kubernetes.io/hostname": rpi05 |
| giolekva | ef76a3e | 2022-01-10 12:22:28 +0400 | [diff] [blame] | 81 | # command: |
| 82 | # - torrent |
| 83 | # - --port=8080 |
| 84 | # resources: |
| 85 | # requests: |
| 86 | # memory: "10Mi" |
| 87 | # cpu: "10m" |
| 88 | # limits: |
| 89 | # memory: "20Mi" |
| 90 | # cpu: "100m" |