fix wg-easy interface (#1931)

* fix wg-easy interface

* correct device name

* add upgrade strategy
This commit is contained in:
Stavros Kois
2023-12-24 23:13:59 +02:00
committed by GitHub
parent 19d8d03efb
commit 30bd5129f5
5 changed files with 45 additions and 4 deletions

View File

@@ -3,9 +3,9 @@ description: WG-Easy is the easiest way to install & manage WireGuard!
annotations:
title: WG Easy
type: application
version: 2.0.4
version: 2.0.5
apiVersion: v2
appVersion: "7"
appVersion: "8"
kubeVersion: ">=1.16.0-0"
maintainers:
- name: truenas

View File

@@ -111,6 +111,13 @@ questions:
type: int
required: true
default: 0
- variable: deviceName
label: Device Name
description: Ethernet device the wireguard traffic should be forwarded through.
schema:
type: string
required: true
default: eth0
- variable: clientMTU
label: Clients MTU
description: The MTU the clients will use.

View File

@@ -24,6 +24,7 @@ workload:
- SYS_MODULE
env:
WG_PORT: {{ .Values.wgNetwork.udpPort }}
WG_PATH: /etc/wireguard
PORT: {{ .Values.wgNetwork.webPort }}
WG_HOST: {{ .Values.wgConfig.host | quote }}
PASSWORD: {{ .Values.wgConfig.password | quote }}
@@ -31,6 +32,7 @@ workload:
WG_MTU: {{ .Values.wgConfig.clientMTU }}
WG_DEFAULT_ADDRESS: {{ .Values.wgConfig.clientAddressRange }}
WG_DEFAULT_DNS: {{ .Values.wgConfig.clientDNSServer }}
WG_DEVICE: {{ .Values.wgConfig.deviceName | default "eth0" }}
WG_ALLOWED_IPS: {{ join "," .Values.wgConfig.allowedIPs | default "0.0.0.0/0,::/0" | quote }}
fixedEnv:
PUID: 0

View File

@@ -0,0 +1,31 @@
#!/usr/bin/python3
import json
import re
import sys
from catalog_update.upgrade_strategy import semantic_versioning
RE_STABLE_VERSION = re.compile(r'[0-9]+')
def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
version = semantic_versioning(list(tags))
if not version:
return {}
return {
'tags': {key: tags[version]},
'app_version': version,
}
if __name__ == '__main__':
try:
versions_json = json.loads(sys.stdin.read())
except ValueError:
raise ValueError('Invalid json specified')
print(json.dumps(newer_mapping(versions_json)))

View File

@@ -1,7 +1,7 @@
image:
pullPolicy: IfNotPresent
repository: weejewel/wg-easy
tag: "7"
repository: ghcr.io/wg-easy/wg-easy
tag: "8"
resources:
limits:
@@ -24,6 +24,7 @@ wgConfig:
clientMTU: 1420
clientAddressRange: 10.8.0.x
clientDNSServer: "1.1.1.1"
deviceName: eth0
allowedIPs: []
additionalEnvs: []