Compare commits

...

5 Commits

Author SHA1 Message Date
Vladislav
510e222b83
Merge 57adf569a26a66efcad7d9f2b94cdb0de2ff54db into 0680b4ff05a4e7b385416f3d87b5e0d234de8e7c 2025-01-10 15:02:56 +05:30
Dmitry Shurupov
0680b4ff05
Merge pull request #293 from ogumemura/patch-1
Fix username validation regex to correctly recognize hyphen (-)
2025-01-10 11:31:42 +07:00
Shobu UMEMURA
8fc518dba8
Fix username validation regex to correctly recognize hyphen (-)
This pull request corrects the regular expression used for username validation to correctly recognize hyphens (-).

Changes Made:
Changed the regex pattern from ^([a-zA-Z0-9_.-@])+$ to ^([a-zA-Z0-9_.\-@])+$.

Reason for Change:
In the previous regex, the hyphen (-) within the character class was interpreted as a range operator, not as a literal character. This caused usernames with hyphens to be incorrectly marked as invalid.
By escaping the hyphen (\-), the regex now correctly recognizes it as a literal character. This ensures that usernames containing hyphens are validated properly.

Points of Verification:
Confirmed that usernames containing hyphens are now correctly recognized and pass the validation.
Verified that other characters (letters, numbers, underscores, dots, and at signs) are still being properly validated.
2024-09-28 17:57:02 +09:00
Vladislav
57adf569a2
Remove unused variable 2022-11-09 23:02:31 +03:00
Vladislav
e7730bc3f4
Added more flexible helm chart 2022-11-09 22:48:08 +03:00
13 changed files with 443 additions and 184 deletions

23
helm/.helmignore Normal file
View 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/

View File

@ -1,2 +1,24 @@
name: ovpn-admin apiVersion: v2
version: 1.0.0 name: ovpn-admin-chart
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

View File

@ -1 +0,0 @@
helm chart example

View File

@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "ovpn-admin-chart.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ovpn-admin-chart.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ovpn-admin-chart.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "ovpn-admin-chart.labels" -}}
helm.sh/chart: {{ include "ovpn-admin-chart.chart" . }}
{{ include "ovpn-admin-chart.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "ovpn-admin-chart.selectorLabels" -}}
app.kubernetes.io/name: {{ include "ovpn-admin-chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "ovpn-admin-chart.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "ovpn-admin-chart.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -1,117 +1,125 @@
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: openvpn name: {{ include "ovpn-admin-chart.fullname" . }}
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
app: openvpn {{- include "ovpn-admin-chart.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels: labels:
app: openvpn {{- include "ovpn-admin-chart.selectorLabels" . | nindent 8 }}
spec: spec:
{{- if .Values.openvpn.nodeSelector }} {{- with .Values.imagePullSecrets }}
nodeSelector: imagePullSecrets:
{{- .Values.openvpn.nodeSelector | toYaml | indent 8 | printf "\n%s" }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.openvpn.tolerations }} serviceAccountName: {{ include "ovpn-admin-chart.serviceAccountName" . }}
tolerations: securityContext:
{{- .Values.openvpn.tolerations | toYaml | indent 8 | printf "\n%s" }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 0
serviceAccountName: openvpn
containers: containers:
- name: ovpn-admin - name: openvpn
image: {{ .Values.ovpnAdmin.image }} securityContext:
command: {{- toYaml .Values.openvpnSecurityContext | nindent 12 }}
- /bin/sh image: "{{ .Values.openvpn.image.repository }}:{{ .Values.openvpn.image.tag | default .Chart.AppVersion }}"
- -c imagePullPolicy: {{ .Values.openvpn.image.pullPolicy }}
- /app/ovpn-admin command: [ '/entrypoint.sh' ]
ports:
- name: openvpn-tcp
protocol: TCP
containerPort: 1194
volumeMounts:
- name: tmp
mountPath: /tmp
- name: dev-net
mountPath: /dev/net
- name: certs
mountPath: /etc/openvpn/certs
- name: ccd
mountPath: /etc/openvpn/ccd
- name: config
mountPath: /etc/openvpn/openvpn.conf
subPath: openvpn.conf
readOnly: true
- name: entrypoint
mountPath: /entrypoint.sh
subPath: entrypoint.sh
readOnly: true
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.openvpnAdminSecurityContext | nindent 12 }}
image: "{{ .Values.openvpnAdmin.image.repository }}:{{ .Values.openvpnAdmin.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.openvpnAdmin.image.pullPolicy }}
command:
- /bin/sh
- -c
- /app/ovpn-admin
--storage.backend="kubernetes.secrets" --storage.backend="kubernetes.secrets"
--listen.host="0.0.0.0" --listen.host="0.0.0.0"
--listen.port="8000" --listen.port="8000"
--role="master" --role="master"
{{- if hasKey .Values.openvpn "inlet" }} {{- if eq .Values.service.openvpn.connectionType "LoadBalancer" }}
{{- if eq .Values.openvpn.inlet "LoadBalancer" }}
--ovpn.server.behindLB --ovpn.server.behindLB
--ovpn.service="openvpn-external" --ovpn.service="openvpn-external"
{{- end }}
{{- end }} {{- end }}
--mgmt=main="127.0.0.1:8989" --mgmt=main="127.0.0.1:8989"
--ccd --ccd.path="/mnt/ccd" --ccd --ccd.path="/mnt/ccd"
--easyrsa.path="/mnt/certs" --easyrsa.path="/mnt/certs"
{{- $externalHost := "" }} {{- $externalHost := "" }}
{{- if hasKey .Values.openvpn "inlet" }} {{- if eq .Values.service.openvpn.connectionType "ExternalIP" }}{{ $externalHost = .Values.service.openvpn.externalIP }}{{- end }}
{{- if eq .Values.openvpn.inlet "ExternalIP" }}{{ $externalHost = .Values.openvpn.externalIP }}{{- end }} {{- if ((.Values.service.openvpn).externalHost) }}{{ $externalHost = .Values.service.openvpn.externalHost }}{{- end }}
{{- end }}
{{- if hasKey .Values.openvpn "externalHost" }}{{ $externalHost = .Values.openvpn.externalHost }}{{- end }}
{{- if ne $externalHost "" }} {{- if ne $externalHost "" }}
--ovpn.server="{{ $externalHost }}:{{ .Values.openvpn.externalPort | default 5416 | quote }}:tcp" --ovpn.server="{{ $externalHost }}:{{ .Values.openvpn.externalPort | default 5416 | quote }}:tcp"
{{- end }} {{- end }}
ports: ports:
- name: ovpn-admin - name: http
protocol: TCP containerPort: 8000
containerPort: 8000 protocol: TCP
volumeMounts: volumeMounts:
- name: certs - name: certs
mountPath: /mnt/certs mountPath: /mnt/certs
- name: ccd - name: ccd
mountPath: /mnt/ccd mountPath: /mnt/ccd
- name: openvpn resources:
image: {{ .Values.openvpn.image }} {{- toYaml .Values.resources | nindent 12 }}
command: [ '/entrypoint.sh' ]
# imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_ADMIN
- NET_RAW
- MKNOD
- SETGID
- SETUID
drop:
- ALL
ports:
- name: openvpn-tcp
protocol: TCP
containerPort: 1194
{{- if eq .Values.openvpn.inlet "HostPort" }}
hostPort: {{ .Values.openvpn.hostPort }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
- name: dev-net
mountPath: /dev/net
- name: certs
mountPath: /etc/openvpn/certs
- name: ccd
mountPath: /etc/openvpn/ccd
- name: config
mountPath: /etc/openvpn/openvpn.conf
subPath: openvpn.conf
readOnly: true
- name: entrypoint
mountPath: /entrypoint.sh
subPath: entrypoint.sh
readOnly: true
volumes: volumes:
- name: tmp - name: tmp
emptyDir: {} emptyDir: {}
- name: dev-net - name: dev-net
emptyDir: {} emptyDir: {}
- name: certs - name: certs
emptyDir: {} emptyDir: {}
- name: ccd - name: ccd
emptyDir: {} emptyDir: {}
- name: config - name: config
configMap: configMap:
name: openvpn name: openvpn
defaultMode: 0644 defaultMode: 0644
- name: entrypoint - name: entrypoint
configMap: configMap:
name: openvpn name: openvpn
defaultMode: 0755 defaultMode: 0755
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

28
helm/templates/hpa.yaml Normal file
View File

@ -0,0 +1,28 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "ovpn-admin-chart.fullname" . }}
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "ovpn-admin-chart.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@ -1,39 +1,66 @@
--- {{- if .Values.ingress.enabled -}}
{{- $fullName := include "ovpn-admin-chart.fullname" . -}}
{{- $svcPort := .Values.openvpnAdmin.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 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 kind: Ingress
metadata: metadata:
name: ovpn-admin name: {{ $fullName }}
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations: annotations:
kubernetes.io/ingress.class: nginx {{- if .Values.ingress.basicAuth.enabled -}}
nginx.ingress.kubernetes.io/backend-protocol: HTTP
nginx.ingress.kubernetes.io/auth-type: basic nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required" nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
nginx.ingress.kubernetes.io/auth-secret: basic-auth nginx.ingress.kubernetes.io/auth-secret: {{ include "ovpn-admin-chart.fullname" . }}-basic-auth
{{- end -}}
{{- toYaml . | nindent 4 }}
{{- end }}
spec: spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls: tls:
- hosts: {{- range .Values.ingress.tls }}
- {{ .Values.domain }} - hosts:
secretName: ingress-tls {{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules: rules:
- host: {{ .Values.domain }} {{- range .Values.ingress.hosts }}
http: - host: {{ .host | quote }}
paths: http:
- path: / paths:
pathType: Prefix {{- range .paths }}
backend: - path: {{ .path }}
service: {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
name: ovpn-admin pathType: {{ .pathType }}
port: {{- end }}
name: http backend:
--- {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
apiVersion: cert-manager.io/v1 service:
kind: Certificate name: {{ $fullName }}
metadata: port:
name: ovpn-admin number: {{ $svcPort }}
spec: {{- else }}
secretName: ingress-tls serviceName: {{ $fullName }}
dnsNames: servicePort: {{ $svcPort }}
- {{ .Values.domain }} {{- end }}
issuerRef: {{- end }}
name: letsencrypt {{- end }}
kind: ClusterIssuer {{- end }}

View File

@ -1,13 +1,7 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: openvpn
---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: openvpn name: {{ include "ovpn-admin-chart.serviceAccountName" . }}
rules: rules:
- apiGroups: - apiGroups:
- "" - ""
@ -26,11 +20,11 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
name: openvpn name: {{ include "ovpn-admin-chart.serviceAccountName" . }}
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
kind: Role kind: Role
name: openvpn name: {{ include "ovpn-admin-chart.serviceAccountName" . }}
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: openvpn name: {{ include "ovpn-admin-chart.serviceAccountName" . }}

View File

@ -1,8 +1,10 @@
--- ---
{{- if .Values.ingress.basicAuth.enabled -}}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: basic-auth name: {{ include "ovpn-admin-chart.fullname" . }}-basic-auth
type: Opaque type: Opaque
data: data:
auth: {{ print .Values.ovpnAdmin.basicAuth.user ":{PLAIN}" .Values.ovpnAdmin.basicAuth.password | b64enc | quote }} auth: {{ print .Values.ovpnAdmin.basicAuth.user ":{PLAIN}" .Values.ovpnAdmin.basicAuth.password | b64enc | quote }}
{{- end -}}

View File

@ -1,57 +1,56 @@
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: ovpn-admin name: {{ include "ovpn-admin-chart.fullname" . }}
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
spec: spec:
clusterIP: None type: {{ .Values.service.openvpnAdmin.type }}
ports: ports:
- name: http - port: {{ .Values.service.openvpnAdmin.port }}
port: 8000 targetPort: http
protocol: TCP protocol: TCP
targetPort: 8000 name: http
selector: selector:
app: openvpn {{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
---
{{- if hasKey .Values.openvpn "inlet" }}
{{- if eq .Values.openvpn.inlet "LoadBalancer" }} {{- if eq .Values.service.openvpn.connectionType "LoadBalancer"}}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: openvpn-external name: openvpn-external
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
spec: spec:
externalTrafficPolicy: Local externalTrafficPolicy: Local
type: LoadBalancer type: {{ .Values.service.openvpn.type }}
ports: ports:
- name: openvpn-tcp - port: {{ .Values.service.openvpn.port }}
protocol: TCP
port: {{ .Values.openvpn.externalPort | default 1194 }}
targetPort: openvpn-tcp targetPort: openvpn-tcp
protocol: TCP
name: openvpn-tcp
selector: selector:
app: openvpn {{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
{{- else if eq .Values.openvpn.inlet "ExternalIP" }}
{{- else if eq .Values.service.openvpn.connectionType "ExternalIP" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: openvpn-external name: openvpn-external
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
spec: spec:
externalTrafficPolicy: Local
type: ClusterIP type: ClusterIP
externalIPs: externalIPs:
- {{ .Values.openvpn.externalIP }} - {{ .Values.service.openvpn.externalIP }}
ports: ports:
- name: openvpn-tcp - port: {{ .Values.service.openvpn.externalPort }}
port: {{ .Values.openvpn.externalPort | default 1194 }} targetPort: openvpn-tcp
protocol: TCP protocol: TCP
targetPort: openvpn-tcp name: openvpn-tcp
selector: selector:
app: openvpn {{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
{{- else if eq .Values.openvpn.inlet "HostPort" }} {{- end -}}
---
{{- else }}
{{- cat "Unsupported inlet type" .inlet | fail }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "ovpn-admin-chart.serviceAccountName" . }}
labels:
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -1,26 +1,109 @@
domain: changeme # Default values for ovpn-admin-chart.
ovpnAdmin: # This is a YAML-formatted file.
image: changeme # Declare variables to be passed into your templates.
replicaCount: 1
openvpnAdmin:
image:
repository: changeme
pullPolicy: IfNotPresent
tag: ""
openvpn:
subnet: 172.16.200.0/255.255.255.0
image:
repository: changeme
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
openvpnSecurityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_ADMIN
- NET_RAW
- MKNOD
- SETGID
- SETUID
drop:
- ALL
openvpnAdminSecurityContext: {}
service:
openvpn:
connectionType: ExternalIP # Choose what type of connection you want ClusterIP / LoadBalancer / ExternalIP
#externalHost: 1.2.3.4
externalIP: 1.2.3.4
externalPort: 2234
type: ClusterIP
port: 1194
openvpnAdmin:
type: ClusterIP
port: 8000
ingress:
enabled: false
className: ""
basicAuth: basicAuth:
enabled: false
user: admin user: admin
password: changeme password: changeme
openvpn: annotations: {}
image: changeme # kubernetes.io/ingress.class: nginx
subnet: 172.16.200.0/255.255.255.0 # kubernetes.io/tls-acme: "true"
# nodeSelector: hosts:
# node-role.kubernetes.io/master: "" - host: chart-example.local
# tolerations: paths:
# - effect: NoSchedule - path: /
# key: node-role.kubernetes.io/master pathType: ImplementationSpecific
# tls: []
# // LoadBalancer or ExternalIP or HostPort # - secretName: chart-example-tls
inlet: HostPort # hosts:
# # - chart-example.local
# If inlet: ExternalIP
# externalIP: 1.2.3.4 resources: {}
# externalPort: 1194 # We usually recommend not to specify default resources and to leave this as a conscious
# # choice for the user. This also increases chances charts run on environments with little
# If inlet: HostPort # resources, such as Minikube. If you do want to specify resources, uncomment the following
hostPort: 1194 # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# Domain or ip for connect to OpenVPN server # limits:
# externalHost: 1.2.3.4 # cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}

View File

@ -34,7 +34,7 @@ import (
) )
const ( const (
usernameRegexp = `^([a-zA-Z0-9_.-@])+$` usernameRegexp = `^([a-zA-Z0-9_.\-@])+$`
passwordMinLength = 6 passwordMinLength = 6
certsArchiveFileName = "certs.tar.gz" certsArchiveFileName = "certs.tar.gz"
ccdArchiveFileName = "ccd.tar.gz" ccdArchiveFileName = "ccd.tar.gz"