blob: 9da50025ef85317d830a543dfeb5fde2ad1b3039 [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
94 containers:
95 - name: headscale
96 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
97 imagePullPolicy: {{ .Values.image.pullPolicy }}
98 ports:
99 - name: http
100 containerPort: 8080
101 protocol: TCP
Giorgi Lekveishvili620caa82023-05-21 19:36:58 +0400102 - name: grpc
103 containerPort: 50443
104 protocol: TCP
Giorgi Lekveishvili6e90bee2023-06-15 17:00:30 +0400105 command:
106 - headscale
107 - --config=/headscale/config/config.yaml
108 - serve
109 volumeMounts:
110 - name: data
111 mountPath: /headscale/data
112 readOnly: false
113 - name: config
114 mountPath: /headscale/config
115 readOnly: true
116 - name: headscale-api
117 image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}
118 imagePullPolicy: {{ .Values.api.image.pullPolicy }}
119 ports:
120 - name: http-api
121 containerPort: 9090
122 protocol: TCP
123 command:
124 - headscale-api
125 - --port=9090
126 - --config=/headscale/config/config.yaml
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +0400127 volumeMounts:
128 - name: data
129 mountPath: /headscale/data
130 readOnly: false
131 - name: config
132 mountPath: /headscale/config
133 readOnly: true