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