test
This commit is contained in:
23
helm/.helmignore
Normal file
23
helm/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
6
helm/Chart.yaml
Normal file
6
helm/Chart.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: wg-easy
|
||||
description: Helm chart for wg-easy with MetalLB and StatefulSet
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "15.1.0"
|
||||
2
helm/templates/_helpers.tpl
Normal file
2
helm/templates/_helpers.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
{{- define "wg-easy.name" -}}wg-easy{{- end }}
|
||||
{{ define "wg-easy.environment" -}}wg-easy-environment{{- end }}
|
||||
8
helm/templates/configmap.yaml
Normal file
8
helm/templates/configmap.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "wg-easy.environment" . }}
|
||||
data:
|
||||
INSECURE: {{ .Values.environment.INSECURE | default "true" | quote }}
|
||||
PGID: {{ .Values.environment.PGID | default "1000" | quote }}
|
||||
PUID: {{ .Values.environment.PUID | default "1000" | quote }}
|
||||
20
helm/templates/service.yaml
Normal file
20
helm/templates/service.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "wg-easy.name" . }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.loadBalancerIP (ne .Values.service.loadBalancerIP "") }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.uiPort }}
|
||||
targetPort: 51821
|
||||
protocol: TCP
|
||||
- name: wireguard
|
||||
port: {{ .Values.service.wgPort }}
|
||||
targetPort: {{ .Values.service.wgPort }}
|
||||
protocol: UDP
|
||||
selector:
|
||||
app: {{ include "wg-easy.name" . }}
|
||||
78
helm/templates/statefulset.yaml
Normal file
78
helm/templates/statefulset.yaml
Normal file
@@ -0,0 +1,78 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "wg-easy.name" . }}
|
||||
labels:
|
||||
app: {{ include "wg-easy.name" . }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ include "wg-easy.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ include "wg-easy.name" . }}
|
||||
spec:
|
||||
securityContext:
|
||||
sysctls:
|
||||
{{- if .Values.sysctls.ipv4Forward }}
|
||||
- name: net.ipv4.ip_forward
|
||||
value: "1"
|
||||
{{- end }}
|
||||
{{- if .Values.sysctls.ipv6Forward }}
|
||||
- name: net.ipv6.conf.all.forwarding
|
||||
value: "1"
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "wg-easy.name" . }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 51821
|
||||
protocol: TCP
|
||||
- name: wireguard
|
||||
containerPort: {{ .Values.service.wgPort }}
|
||||
protocol: UDP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "wg-easy.environment" . }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add: ["NET_ADMIN", "SYS_MODULE"]
|
||||
volumeMounts:
|
||||
- name: wg-easy-data
|
||||
mountPath: /etc/wireguard
|
||||
{{- if .Values.resources }}
|
||||
resources:
|
||||
{{- if .Values.resources.requests }}
|
||||
requests:
|
||||
{{- if .Values.resources.requests.cpu }}
|
||||
cpu: "{{ .Values.resources.requests.cpu }}"
|
||||
{{- end }}
|
||||
{{- if .Values.resources.requests.memory }}
|
||||
memory: "{{ .Values.resources.requests.memory }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.resources.limits }}
|
||||
limits:
|
||||
{{- if .Values.resources.limits.cpu }}
|
||||
cpu: "{{ .Values.resources.limits.cpu }}"
|
||||
{{- end }}
|
||||
{{- if .Values.resources.limits.memory }}
|
||||
memory: "{{ .Values.resources.limits.memory }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: wg-easy-data
|
||||
spec:
|
||||
accessModes: {{ .Values.persistence.accessModes }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size }}
|
||||
{{- if and .Values.persistence.storageClass (ne .Values.persistence.storageClass "") }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
34
helm/values.yaml
Normal file
34
helm/values.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: ghcr.io/wg-easy/wg-easy
|
||||
tag: "15.1.0"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
persistence:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 1Gi
|
||||
storageClass:
|
||||
|
||||
environment: {}
|
||||
# INSECURE:
|
||||
# PGID:
|
||||
# PUID:
|
||||
|
||||
resources:
|
||||
# requests:
|
||||
# cpu: "100m"
|
||||
# memory: "128Mi"
|
||||
# limits:
|
||||
# cpu: "250m"
|
||||
# memory: "256Mi"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
uiPort: 80
|
||||
wgPort: 51820
|
||||
|
||||
sysctls:
|
||||
ipv4Forward: true
|
||||
ipv6Forward: false
|
||||
Reference in New Issue
Block a user