fix(headscale-ui): improve networking
This commit is contained in:
parent
3d1999fd7a
commit
5cb8591591
7 changed files with 30 additions and 29 deletions
|
@ -3,7 +3,7 @@ name: headscale-ui
|
|||
description: A simple Headscale web UI for small-scale deployments.
|
||||
icon: https://raw.githubusercontent.com/gurucomputing/headscale-ui/master/static/favicon.png
|
||||
type: application
|
||||
version: 0.1.4
|
||||
version: 0.1.5
|
||||
# renovate: image=ghcr.io/gurucomputing/headscale-ui
|
||||
appVersion: "2024.02.24-beta1"
|
||||
maintainers:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
= headscale-ui
|
||||
|
||||
image::https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square[Version: 0.1.4]
|
||||
image::https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square[Version: 0.1.5]
|
||||
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
|
||||
image::https://img.shields.io/badge/AppVersion-2024.02.24-beta1-informational?style=flat-square[AppVersion: 2024.02.24-beta1]
|
||||
== Maintainers
|
||||
|
@ -187,9 +187,14 @@ helm uninstall headscale-ui-release
|
|||
| `{}`
|
||||
|
|
||||
|
||||
| service.port
|
||||
| service.port.http
|
||||
| int
|
||||
| `80`
|
||||
| `8080`
|
||||
|
|
||||
|
||||
| service.port.https
|
||||
| int
|
||||
| `8443`
|
||||
|
|
||||
|
||||
| service.type
|
||||
|
|
|
@ -38,9 +38,17 @@ spec:
|
|||
image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: "HTTP_PORT"
|
||||
value: {{ .Values.service.port.http | quote }}
|
||||
- name: "HTTPS_PORT"
|
||||
value: {{ .Values.service.port.https | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
containerPort: {{ .Values.service.port.http }}
|
||||
protocol: TCP
|
||||
- name: https
|
||||
containerPort: {{ .Values.service.port.https }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "headscale-ui.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
|
@ -23,8 +11,8 @@ metadata:
|
|||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- with .Values.ingress.className }}
|
||||
ingressClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -43,19 +31,12 @@ spec:
|
|||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -7,9 +7,13 @@ metadata:
|
|||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
- port: {{ .Values.service.port.http }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.service.port.https }}
|
||||
targetPort: https
|
||||
protocol: TCP
|
||||
name: https
|
||||
selector:
|
||||
{{- include "headscale-ui.selectorLabels" . | nindent 4 }}
|
||||
|
|
|
@ -43,7 +43,9 @@ securityContext: {}
|
|||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
port:
|
||||
http: 8080
|
||||
https: 8443
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
|
|
|
@ -14,6 +14,7 @@ ct lint # || exit 1
|
|||
for p in * ; do
|
||||
if \
|
||||
[ ! -d $p ] || \
|
||||
[ "$p" == "matrix-authentication-service" ] || \
|
||||
[ ! -f $p/Chart.yaml ] \
|
||||
; then
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue