blob: b71362d1e58e51ac07d42581a28b8b20ee412bc8 [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 Lekveishvili08a19412023-02-04 22:36:01 +040026apiVersion: v1
27kind: Service
28metadata:
29 name: headscale
30 namespace: {{ .Release.Namespace }}
31spec:
32 type: LoadBalancer
33 selector:
34 app: headscale
35 ports:
36 - name: http
37 port: 80
38 targetPort: http
39 protocol: TCP
40---
41apiVersion: v1
42kind: PersistentVolumeClaim
43metadata:
44 name: data
45 namespace: {{ .Release.Namespace }}
46spec:
47 accessModes:
48 - ReadWriteOnce
49 resources:
50 requests:
51 storage: {{ .Values.storage.size }}
52---
53apiVersion: apps/v1
54kind: StatefulSet
55metadata:
56 name: headscale
57 namespace: {{ .Release.Namespace }}
58spec:
59 selector:
60 matchLabels:
61 app: headscale
62 serviceName: headscale
63 replicas: 1
64 template:
65 metadata:
66 labels:
67 app: headscale
68 spec:
69 volumes:
70 - name: data
71 persistentVolumeClaim:
72 claimName: data
73 - name: config
74 configMap:
75 name: config
76 containers:
77 - name: headscale
78 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
79 imagePullPolicy: {{ .Values.image.pullPolicy }}
80 ports:
81 - name: http
82 containerPort: 8080
83 protocol: TCP
Giorgi Lekveishvili620caa82023-05-21 19:36:58 +040084 - name: grpc
85 containerPort: 50443
86 protocol: TCP
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040087 command: ["headscale", "--config=/headscale/config/config.yaml", "serve"]
88 resources:
89 # requests:
90 # memory: "10Mi"
91 # cpu: "10m"
92 # limits:
93 # memory: "20Mi"
94 # cpu: "100m"
95 # tolerations:
96 # - key: "pcloud"
97 # operator: "Equal"
98 # value: "role"
99 # effect: "NoSchedule"
100 volumeMounts:
101 - name: data
102 mountPath: /headscale/data
103 readOnly: false
104 - name: config
105 mountPath: /headscale/config
106 readOnly: true