blob: a4a99b9e404dc7c0f7891d7f4f06e7051de698fe [file] [log] [blame]
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +04001apiVersion: networking.k8s.io/v1
2kind: Ingress
3metadata:
4 name: ingress
5 namespace: {{ .Release.Namespace }}
Giorgi Lekveishvilid507be52023-05-21 11:33:50 +04006 annotations:
7 acme.cert-manager.io/http01-edit-in-place: "true"
8 cert-manager.io/cluster-issuer: {{ .Values.certificateIssuer}}
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +04009spec:
10 ingressClassName: {{ .Values.ingressClassName }}
11 tls:
12 - hosts:
Giorgi Lekveishvilice3c64d2023-05-30 13:28:08 +040013 - {{ .Values.domain }}
14 secretName: cert-{{ .Values.domain }}
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040015 rules:
Giorgi Lekveishvilice3c64d2023-05-30 13:28:08 +040016 - host: {{ .Values.domain }}
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040017 http:
18 paths:
19 - path: /
20 pathType: Prefix
21 backend:
22 service:
23 name: headscale
24 port:
25 name: http
Giorgi Lekveishvilib7691552023-05-31 18:13:19 +040026---
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040027apiVersion: v1
28kind: Service
29metadata:
30 name: headscale
31 namespace: {{ .Release.Namespace }}
32spec:
33 type: LoadBalancer
34 selector:
35 app: headscale
36 ports:
37 - name: http
38 port: 80
39 targetPort: http
40 protocol: TCP
41---
42apiVersion: v1
43kind: PersistentVolumeClaim
44metadata:
45 name: data
46 namespace: {{ .Release.Namespace }}
47spec:
48 accessModes:
49 - ReadWriteOnce
50 resources:
51 requests:
52 storage: {{ .Values.storage.size }}
53---
54apiVersion: apps/v1
55kind: StatefulSet
56metadata:
57 name: headscale
58 namespace: {{ .Release.Namespace }}
59spec:
60 selector:
61 matchLabels:
62 app: headscale
63 serviceName: headscale
64 replicas: 1
65 template:
66 metadata:
67 labels:
68 app: headscale
69 spec:
70 volumes:
71 - name: data
72 persistentVolumeClaim:
73 claimName: data
74 - name: config
75 configMap:
76 name: config
77 containers:
78 - name: headscale
79 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
80 imagePullPolicy: {{ .Values.image.pullPolicy }}
81 ports:
82 - name: http
83 containerPort: 8080
84 protocol: TCP
Giorgi Lekveishvili620caa82023-05-21 19:36:58 +040085 - name: grpc
86 containerPort: 50443
87 protocol: TCP
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040088 command: ["headscale", "--config=/headscale/config/config.yaml", "serve"]
89 resources:
90 # requests:
91 # memory: "10Mi"
92 # cpu: "10m"
93 # limits:
94 # memory: "20Mi"
95 # cpu: "100m"
96 # tolerations:
97 # - key: "pcloud"
98 # operator: "Equal"
99 # value: "role"
100 # effect: "NoSchedule"
101 volumeMounts:
102 - name: data
103 mountPath: /headscale/data
104 readOnly: false
105 - name: config
106 mountPath: /headscale/config
107 readOnly: true