From 24bbbe0bec9a38587e2b1f0c0ca35b99a8fa242d Mon Sep 17 00:00:00 2001 From: WrenIX Date: Thu, 22 Aug 2024 21:27:11 +0200 Subject: [PATCH] fix(headscale-ui): update appVersion --- headscale-ui/Chart.yaml | 2 +- headscale-ui/README.adoc | 27 ++++++++++++++++- headscale-ui/templates/networkpolicy.yaml | 37 +++++++++++++++++++++++ headscale-ui/values.yaml | 12 ++++++++ 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 headscale-ui/templates/networkpolicy.yaml diff --git a/headscale-ui/Chart.yaml b/headscale-ui/Chart.yaml index 962ad45..5ce6be0 100644 --- a/headscale-ui/Chart.yaml +++ b/headscale-ui/Chart.yaml @@ -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.5 +version: 0.2.0 # renovate: image=ghcr.io/gurucomputing/headscale-ui appVersion: "2024.02.24-beta1" maintainers: diff --git a/headscale-ui/README.adoc b/headscale-ui/README.adoc index 847af6a..cf34c93 100644 --- a/headscale-ui/README.adoc +++ b/headscale-ui/README.adoc @@ -2,7 +2,7 @@ = headscale-ui -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-0.2.0-informational?style=flat-square[Version: 0.2.0] 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 @@ -152,6 +152,31 @@ helm uninstall headscale-ui-release | `""` | +| networkPolicy.egress.enabled +| bool +| `true` +| activate egress no networkpolicy + +| networkPolicy.egress.extra +| list +| `[]` +| egress rules + +| networkPolicy.enabled +| bool +| `false` +| + +| networkPolicy.ingress.http +| list +| `[]` +| ingress for http port (e.g. ingress-controller) + +| networkPolicy.ingress.https +| list +| `[]` +| + | nodeSelector | object | `{}` diff --git a/headscale-ui/templates/networkpolicy.yaml b/headscale-ui/templates/networkpolicy.yaml new file mode 100644 index 0000000..0a01ab1 --- /dev/null +++ b/headscale-ui/templates/networkpolicy.yaml @@ -0,0 +1,37 @@ +{{- if .Values.networkPolicy.enabled }} +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "headscale-ui.fullname" . }} + labels: + {{- include "headscale-ui.labels" . | nindent 4 }} +spec: + podSelector: + matchLabels: + {{- include "headscale-ui.selectorLabels" . | nindent 6 }} + policyTypes: + - Ingress + {{- if .Values.networkPolicy.egress.enabled }} + - Egress + {{- end }} + ingress: + {{- with .Values.networkPolicy.ingress.http }} + - ports: + - port: {{ $.Values.service.port.http }} + protocol: TCP + from: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.networkPolicy.ingress.https }} + - ports: + - port: {{ $.Values.service.port.https }} + protocol: TCP + from: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.networkPolicy.egress }} + egress: + {{- toYaml .extra | nindent 4 }} + {{- end }} +{{- end }} diff --git a/headscale-ui/values.yaml b/headscale-ui/values.yaml index c0f8a23..47015d1 100644 --- a/headscale-ui/values.yaml +++ b/headscale-ui/values.yaml @@ -47,6 +47,18 @@ service: http: 8080 https: 8443 +networkPolicy: + enabled: false + ingress: + # -- ingress for http port (e.g. ingress-controller) + http: [] + https: [] + egress: + # -- activate egress no networkpolicy + enabled: true + # -- egress rules + extra: [] + ingress: enabled: false className: ""