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