Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "Proxy version: $PROXY_VERSION"
echo "Gateway version: $GATEWAY_VERSION"
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup `packer`
uses: hashicorp/setup-packer@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -31,7 +31,7 @@ jobs:
done

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
Expand Down
5 changes: 3 additions & 2 deletions charts/defguard-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v2
name: defguard-gateway
description: Defguard Gateway is a public-facing VPN endpoint.
icon: https://defguard.net/favicon/favicon-512x512.png

type: application
version: 0.5.3
appVersion: 1.6.3
version: 2.0.0
appVersion: 2.0.0
6 changes: 3 additions & 3 deletions charts/defguard-gateway/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{- include "defguard-gateway.labels" . | nindent 4 }}
data:
DEFGUARD_USERSPACE: {{ .Values.userspace | quote }}
DEFGUARD_GRPC_URL: {{ .Values.grpcUrl | quote }}
DEFGUARD_STATS_PERIOD: {{ .Values.statsPeriod | quote }}
DEFGUARD_GRPC_PORT: {{ .Values.service.grpc.port | quote }}
DEFGUARD_LOG_LEVEL: {{ .Values.logLevel | quote }}
DEFGUARD_STATS_PERIOD: {{ .Values.statsPeriod | quote }}
DEFGUARD_USERSPACE: {{ .Values.userspace | quote }}
10 changes: 10 additions & 0 deletions charts/defguard-gateway/templates/grpc-headless-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "defguard-gateway.fullname" . }}-headless
labels:
{{- include "defguard-gateway.labels" . | nindent 4 }}
spec:
clusterIP: None
selector:
{{- include "defguard-gateway.selectorLabels" . | nindent 4 }}
22 changes: 22 additions & 0 deletions charts/defguard-gateway/templates/grpc-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
annotations:
{{- with .Values.service.grpc.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "defguard-gateway.fullname" . }}-grpc
labels:
{{- include "defguard-gateway.labels" . | nindent 4 }}
{{- with .Values.service.grpc.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.grpc.type }}
ports:
- port: {{ .Values.service.grpc.port }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
{{- include "defguard-gateway.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "defguard-gateway.fullname" . }}
labels:
{{- include "defguard-gateway.labels" . | nindent 4 }}
spec:
podManagementPolicy: Parallel
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "defguard-gateway.selectorLabels" . | nindent 6 }}
serviceName: {{ include "defguard-gateway.fullname" . }}-grpc-headless
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -27,24 +29,32 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
{{- if .Values.healthCheck.enabled }}
env:
- name: HEALTH_PORT
value: {{ .Values.healthCheck.port }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "defguard-gateway.fullname" . }}-config
{{- if .Values.additionalEnvFromConfigMap }}
- configMapRef:
name: {{ .Values.additionalEnvFromConfigMap }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: grpc
containerPort: {{ .Values.service.grpc.port }}
protocol: TCP
- name: wireguard
containerPort: {{ .Values.service.wireguard.port }}
protocol: UDP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.healthCheck.enabled }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
livenessProbe:
httpGet:
path: /
Expand All @@ -62,23 +72,9 @@ spec:
timeoutSeconds: {{ .Values.healthCheck.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthCheck.readinessProbe.failureThreshold }}
{{- end }}
{{- if .Values.token }}
env:
- name: DEFGUARD_TOKEN
value: {{ .Values.token }}
{{- else if .Values.existingTokenSecret }}
env:
- name: DEFGUARD_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.existingTokenSecret }}
key: {{ .Values.existingTokenSecretKey }}
{{- end }}
{{- if .Values.healthCheck.enabled }}
env:
- name: HEALTH_PORT
value: {{ .Values.healthCheck.port }}
{{- end }}
volumeMounts:
- name: data
mountPath: /etc/defguard
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -91,3 +87,15 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
{{- with .Values.persistence.storageClassName }}
storageClassName: {{ . }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size }}
109 changes: 77 additions & 32 deletions charts/defguard-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,11 @@
"title": "affinity",
"type": "object"
},
"existingTokenSecret": {
"default": "",
"description": "Secret to get the token from",
"required": [],
"title": "existingTokenSecret",
"type": "string"
},
"existingTokenSecretKey": {
"default": "",
"description": "Key to extract the token from in existingTokenSecret",
"enabled": {
"default": false,
"required": [],
"title": "existingTokenSecretKey",
"type": "string"
"title": "enabled",
"type": "boolean"
},
"fullnameOverride": {
"default": "",
Expand All @@ -38,18 +30,12 @@
"type": "string"
},
"global": {
"additionalProperties": true,
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
"required": [],
"title": "global",
"type": "object"
},
"grpcUrl": {
"default": "",
"description": "Defguard GRPC URL, e.g.: defguard-grpc.mycompany.com",
"required": [],
"title": "grpcUrl",
"type": "string"
},
"healthCheck": {
"additionalProperties": false,
"description": "defguard-gateway health check configuration",
Expand Down Expand Up @@ -211,6 +197,28 @@
"title": "nodeSelector",
"type": "object"
},
"persistence": {
"additionalProperties": false,
"description": "defguard-gateway persistent storage for certificates",
"properties": {
"size": {
"default": "32Mi",
"title": "size",
"type": "string"
},
"storageClassName": {
"default": "",
"title": "storageClassName",
"type": "string"
}
},
"required": [
"size",
"storageClassName"
],
"title": "persistence",
"type": "object"
},
"podAnnotations": {
"additionalProperties": false,
"description": "defguard-gateway pod annotations",
Expand Down Expand Up @@ -303,6 +311,53 @@
"additionalProperties": false,
"description": "defguard-gateway service configuration",
"properties": {
"grpc": {
"additionalProperties": false,
"properties": {
"annotations": {
"additionalProperties": false,
"properties": {
"traefik.ingress.kubernetes.io/service.serversscheme": {
"default": "h2c",
"required": [],
"title": "traefik.ingress.kubernetes.io/service.serversscheme",
"type": "string"
}
},
"required": [
"traefik.ingress.kubernetes.io/service.serversscheme"
],
"title": "annotations",
"type": "object"
},
"labels": {
"additionalProperties": false,
"required": [],
"title": "labels",
"type": "object"
},
"port": {
"default": 50066,
"required": [],
"title": "port",
"type": "integer"
},
"type": {
"default": "ClusterIP",
"required": [],
"title": "type",
"type": "string"
}
},
"required": [
"annotations",
"labels",
"port",
"type"
],
"title": "grpc",
"type": "object"
},
"wireguard": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -378,13 +433,6 @@
"title": "statsPeriod",
"type": "integer"
},
"token": {
"default": "",
"description": "Token from Defguard app to secure gRPC connection, available on network page.\nIt is not recommended to use this. Create a secret yourself and use existingTokenSecret instead",
"required": [],
"title": "token",
"type": "string"
},
"tolerations": {
"description": "defguard-gateway pod tolerations",
"items": {
Expand All @@ -396,18 +444,14 @@
},
"userspace": {
"default": "false",
"description": "yaml-language-server: $schema=values.schema.json\nUse userspace wireguard implementation, useful on systems without native wireguard support. Set to true/false",
"description": "yaml-language-server: $schema=values.schema.json\nUse userspace WireGuard implementation, useful on systems without native wireguard support. Set to true/false",
"required": [],
"title": "userspace",
"type": "string"
}
},
"required": [
"userspace",
"grpcUrl",
"token",
"existingTokenSecret",
"existingTokenSecretKey",
"statsPeriod",
"logLevel",
"fullnameOverride",
Expand All @@ -419,6 +463,7 @@
"tolerations",
"podAnnotations",
"podLabels",
"persistence",
"replicaCount",
"resources",
"podSecurityContext",
Expand All @@ -429,4 +474,4 @@
"serviceAccount"
],
"type": "object"
}
}
Loading
Loading