blob: 6b383454b750ac3107fd321aad8bf42b8c2ce8da [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
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +040045kind: Service
46metadata:
47 name: headscale-api
48 namespace: {{ .Release.Namespace }}
49spec:
50 type: ClusterIP
51 selector:
52 app: headscale
53 ports:
54 - name: http
55 port: 80
56 targetPort: http-api
57 protocol: TCP
58---
59apiVersion: v1
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040060kind: PersistentVolumeClaim
61metadata:
62 name: data
63 namespace: {{ .Release.Namespace }}
64spec:
65 accessModes:
66 - ReadWriteOnce
67 resources:
68 requests:
69 storage: {{ .Values.storage.size }}
70---
71apiVersion: apps/v1
72kind: StatefulSet
73metadata:
74 name: headscale
75 namespace: {{ .Release.Namespace }}
76spec:
77 selector:
78 matchLabels:
79 app: headscale
80 serviceName: headscale
81 replicas: 1
82 template:
83 metadata:
84 labels:
85 app: headscale
86 spec:
87 volumes:
88 - name: data
89 persistentVolumeClaim:
90 claimName: data
91 - name: config
92 configMap:
93 name: config
Giorgi Lekveishvili37181d02023-06-15 19:00:41 +040094 - name: api-socket
95 emptyDir: {}
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +040096 containers:
97 - name: headscale
98 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
99 imagePullPolicy: {{ .Values.image.pullPolicy }}
100 ports:
101 - name: http
102 containerPort: 8080
103 protocol: TCP
Giorgi Lekveishvili620caa82023-05-21 19:36:58 +0400104 - name: grpc
105 containerPort: 50443
106 protocol: TCP
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +0400107 command:
108 - headscale
109 - --config=/headscale/config/config.yaml
110 - serve
111 volumeMounts:
112 - name: data
113 mountPath: /headscale/data
114 readOnly: false
115 - name: config
116 mountPath: /headscale/config
117 readOnly: true
Giorgi Lekveishvili37181d02023-06-15 19:00:41 +0400118 - mountPath: /headscale-api
119 name: api-socket
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +0400120 - name: headscale-api
121 image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}
122 imagePullPolicy: {{ .Values.api.image.pullPolicy }}
123 ports:
124 - name: http-api
Giorgi Lekveishvili602479d2023-06-15 17:59:23 +0400125 containerPort: {{ .Values.api.port }}
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +0400126 protocol: TCP
127 command:
128 - headscale-api
Giorgi Lekveishvili602479d2023-06-15 17:59:23 +0400129 - --port={{ .Values.api.port }}
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +0400130 - --config=/headscale/config/config.yaml
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +0400131 volumeMounts:
132 - name: data
133 mountPath: /headscale/data
134 readOnly: false
135 - name: config
136 mountPath: /headscale/config
137 readOnly: true
Giorgi Lekveishvili37181d02023-06-15 19:00:41 +0400138 - mountPath: /headscale-api
139 name: api-socket