| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 1 | apiVersion: networking.k8s.io/v1 |
| 2 | kind: Ingress |
| 3 | metadata: |
| 4 | name: ingress |
| 5 | namespace: {{ .Release.Namespace }} |
| Giorgi Lekveishvili | d507be5 | 2023-05-21 11:33:50 +0400 | [diff] [blame] | 6 | annotations: |
| 7 | acme.cert-manager.io/http01-edit-in-place: "true" |
| 8 | cert-manager.io/cluster-issuer: {{ .Values.certificateIssuer}} |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 9 | spec: |
| 10 | ingressClassName: {{ .Values.ingressClassName }} |
| 11 | tls: |
| 12 | - hosts: |
| Giorgi Lekveishvili | ce3c64d | 2023-05-30 13:28:08 +0400 | [diff] [blame] | 13 | - {{ .Values.domain }} |
| 14 | secretName: cert-{{ .Values.domain }} |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 15 | rules: |
| Giorgi Lekveishvili | ce3c64d | 2023-05-30 13:28:08 +0400 | [diff] [blame] | 16 | - host: {{ .Values.domain }} |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 17 | http: |
| 18 | paths: |
| 19 | - path: / |
| 20 | pathType: Prefix |
| 21 | backend: |
| 22 | service: |
| 23 | name: headscale |
| 24 | port: |
| 25 | name: http |
| Giorgi Lekveishvili | b769155 | 2023-05-31 18:13:19 +0400 | [diff] [blame] | 26 | --- |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 27 | apiVersion: v1 |
| 28 | kind: Service |
| 29 | metadata: |
| 30 | name: headscale |
| 31 | namespace: {{ .Release.Namespace }} |
| Giorgi Lekveishvili | c3b2886 | 2023-06-15 10:38:28 +0400 | [diff] [blame] | 32 | annotations: |
| 33 | metallb.universe.tf/address-pool: {{ .Values.ipAddressPool }} |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 34 | spec: |
| 35 | type: LoadBalancer |
| 36 | selector: |
| 37 | app: headscale |
| 38 | ports: |
| 39 | - name: http |
| 40 | port: 80 |
| 41 | targetPort: http |
| 42 | protocol: TCP |
| 43 | --- |
| 44 | apiVersion: v1 |
| Giorgi Lekveishvili | 6e90bee | 2023-06-15 17:00:30 +0400 | [diff] [blame] | 45 | kind: Service |
| 46 | metadata: |
| 47 | name: headscale-api |
| 48 | namespace: {{ .Release.Namespace }} |
| 49 | spec: |
| 50 | type: ClusterIP |
| 51 | selector: |
| 52 | app: headscale |
| 53 | ports: |
| 54 | - name: http |
| 55 | port: 80 |
| 56 | targetPort: http-api |
| 57 | protocol: TCP |
| 58 | --- |
| 59 | apiVersion: v1 |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 60 | kind: PersistentVolumeClaim |
| 61 | metadata: |
| 62 | name: data |
| 63 | namespace: {{ .Release.Namespace }} |
| 64 | spec: |
| 65 | accessModes: |
| 66 | - ReadWriteOnce |
| 67 | resources: |
| 68 | requests: |
| 69 | storage: {{ .Values.storage.size }} |
| 70 | --- |
| 71 | apiVersion: apps/v1 |
| 72 | kind: StatefulSet |
| 73 | metadata: |
| 74 | name: headscale |
| 75 | namespace: {{ .Release.Namespace }} |
| 76 | spec: |
| 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 Lekveishvili | 37181d0 | 2023-06-15 19:00:41 +0400 | [diff] [blame] | 94 | - name: api-socket |
| 95 | emptyDir: {} |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 96 | 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 Lekveishvili | 620caa8 | 2023-05-21 19:36:58 +0400 | [diff] [blame] | 104 | - name: grpc |
| 105 | containerPort: 50443 |
| 106 | protocol: TCP |
| Giorgi Lekveishvili | 6e90bee | 2023-06-15 17:00:30 +0400 | [diff] [blame] | 107 | 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 Lekveishvili | 37181d0 | 2023-06-15 19:00:41 +0400 | [diff] [blame] | 118 | - mountPath: /headscale-api |
| 119 | name: api-socket |
| Giorgi Lekveishvili | 6e90bee | 2023-06-15 17:00:30 +0400 | [diff] [blame] | 120 | - 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 Lekveishvili | 602479d | 2023-06-15 17:59:23 +0400 | [diff] [blame] | 125 | containerPort: {{ .Values.api.port }} |
| Giorgi Lekveishvili | 6e90bee | 2023-06-15 17:00:30 +0400 | [diff] [blame] | 126 | protocol: TCP |
| 127 | command: |
| 128 | - headscale-api |
| Giorgi Lekveishvili | 602479d | 2023-06-15 17:59:23 +0400 | [diff] [blame] | 129 | - --port={{ .Values.api.port }} |
| Giorgi Lekveishvili | 6e90bee | 2023-06-15 17:00:30 +0400 | [diff] [blame] | 130 | - --config=/headscale/config/config.yaml |
| Giorgi Lekveishvili | 08a1941 | 2023-02-04 22:36:01 +0400 | [diff] [blame] | 131 | volumeMounts: |
| 132 | - name: data |
| 133 | mountPath: /headscale/data |
| 134 | readOnly: false |
| 135 | - name: config |
| 136 | mountPath: /headscale/config |
| 137 | readOnly: true |
| Giorgi Lekveishvili | 37181d0 | 2023-06-15 19:00:41 +0400 | [diff] [blame] | 138 | - mountPath: /headscale-api |
| 139 | name: api-socket |