Skip to content

Commit 7a92dc6

Browse files
authored
Use labels and annotations; update to Defguard 1.5.1 (#92)
1 parent a722e3a commit 7a92dc6

28 files changed

+155
-92
lines changed

charts/defguard-gateway/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: defguard-gateway
33
description: Defguard gateway is a public-facing VPN endpoint.
44

55
type: application
6-
version: 0.2.0
7-
appVersion: 1.5.0
6+
version: 0.3.0
7+
appVersion: 1.5.1

charts/defguard-gateway/templates/NOTES.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
{{- range $host := .Values.ingress.hosts }}
44
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}/
55
{{- end }}
6-
{{- else if contains "NodePort" .Values.service.type }}
6+
{{- else if contains "NodePort" .Values.service.grpc.type }}
77
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "defguard-gateway.fullname" . }})
88
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
99
echo http://$NODE_IP:$NODE_PORT
10-
{{- else if contains "LoadBalancer" .Values.service.type }}
10+
{{- else if contains "LoadBalancer" .Values.service.grpc.type }}
1111
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
1212
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "defguard-gateway.fullname" . }}'
1313
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "defguard-gateway.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
14-
echo http://$SERVICE_IP:{{ .Values.service.port }}
15-
{{- else if contains "ClusterIP" .Values.service.type }}
14+
echo http://$SERVICE_IP:{{ .Values.service.grpc.port }}
15+
{{- else if contains "ClusterIP" .Values.service.grpc.type }}
1616
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "defguard-gateway.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
1717
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
1818
echo "Visit http://127.0.0.1:8080 to use your application"

charts/defguard-gateway/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
imagePullPolicy: {{ .Values.image.pullPolicy }}
4141
ports:
4242
- name: grpc
43-
containerPort: {{ .Values.service.ports.grpc }}
43+
containerPort: {{ .Values.service.grpc.port }}
4444
protocol: UDP
4545
resources:
4646
{{- toYaml .Values.resources | nindent 12 }}

charts/defguard-gateway/templates/grpc-service.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
annotations:
5-
traefik.ingress.kubernetes.io/service.serversscheme: h2c
5+
{{- with .Values.service.grpc.annotations }}
6+
{{- toYaml . | nindent 4 }}
7+
{{- end }}
68
name: {{ include "defguard-gateway.fullname" . }}-grpc
79
labels:
810
{{- include "defguard-gateway.labels" . | nindent 4 }}
11+
{{- with .Values.service.grpc.labels }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
914
spec:
10-
type: {{ .Values.service.type }}
15+
type: {{ .Values.service.grpc.type }}
1116
ports:
12-
- port: {{ .Values.service.ports.grpc }}
17+
- port: {{ .Values.service.grpc.port }}
1318
targetPort: grpc
1419
protocol: UDP
1520
name: grpc

charts/defguard-gateway/templates/ingress-grpc.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ metadata:
1717
name: {{ $fullName }}-grpc
1818
labels:
1919
{{- include "defguard-gateway.labels" . | nindent 4 }}
20+
{{- with .Values.ingress.grpc.labels }}
21+
{{- toYaml . | nindent 4 }}
22+
{{- end }}
2023
{{- with .Values.ingress.grpc.annotations }}
2124
annotations:
2225
{{- toYaml . | nindent 4 }}
@@ -44,9 +47,9 @@ spec:
4447
service:
4548
name: {{ $fullName }}-grpc
4649
port:
47-
number: {{ .Values.service.ports.grpc }}
50+
number: {{ .Values.service.grpc.port }}
4851
{{- else }}
4952
serviceName: {{ $fullName }}-grpc
50-
servicePort: {{ .Values.service.ports.grpc }}
53+
servicePort: {{ .Values.service.grpc.port }}
5154
{{- end }}
5255
{{- end }}

charts/defguard-gateway/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ingress:
3232
className: ""
3333
enabled: true
3434
host: defguard-gateway-grpc.local
35+
labels: {}
3536
tls: false
3637
# defguard-gateway pod affinity configuration
3738
affinity: {}
@@ -55,9 +56,12 @@ securityContext: {}
5556
additionalEnvFromConfigMap: ""
5657
# defguard-gateway service configuration
5758
service:
58-
ports:
59-
grpc: 50051
60-
type: ClusterIP
59+
grpc:
60+
annotations:
61+
traefik.ingress.kubernetes.io/service.serversscheme: h2c
62+
labels: {}
63+
port: 50051
64+
type: ClusterIP
6165
# defguard-gateway serviceaccount configuration
6266
serviceAccount:
6367
annotations: {}

charts/defguard-proxy/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: defguard-proxy
3-
description: Defguard proxy is a public-facing proxy for core defguard service
3+
description: Defguard proxy is a public-facing proxy for core Defguard service
44

55
type: application
6-
version: 0.6.0
7-
appVersion: 1.5.0
6+
version: 0.7.0
7+
appVersion: 1.5.1

charts/defguard-proxy/templates/NOTES.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
{{- range $host := .Values.ingress.hosts }}
44
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}/
55
{{- end }}
6-
{{- else if contains "NodePort" .Values.service.type }}
6+
{{- else if contains "NodePort" .Values.service.web.type }}
77
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "defguard-proxy.fullname" . }})
88
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
99
echo http://$NODE_IP:$NODE_PORT
10-
{{- else if contains "LoadBalancer" .Values.service.type }}
10+
{{- else if contains "LoadBalancer" .Values.service.web.type }}
1111
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
1212
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "defguard-proxy.fullname" . }}'
1313
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "defguard-proxy.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
14-
echo http://$SERVICE_IP:{{ .Values.service.port }}
15-
{{- else if contains "ClusterIP" .Values.service.type }}
14+
echo http://$SERVICE_IP:{{ .Values.service.web.port }}
15+
{{- else if contains "ClusterIP" .Values.service.web.type }}
1616
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "defguard-proxy.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
1717
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
1818
echo "Visit http://127.0.0.1:8080 to use your application"

charts/defguard-proxy/templates/config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ metadata:
55
labels:
66
{{- include "defguard-proxy.labels" . | nindent 4 }}
77
data:
8-
DEFGUARD_PROXY_HTTP_PORT: {{ .Values.service.ports.http | quote }}
9-
DEFGUARD_PROXY_GRPC_PORT: {{ .Values.service.ports.grpc | quote }}
8+
DEFGUARD_PROXY_HTTP_PORT: {{ .Values.service.web.port | quote }}
9+
DEFGUARD_PROXY_GRPC_PORT: {{ .Values.service.grpc.port | quote }}
1010
DEFGUARD_PROXY_URL: {{ .Values.publicUrl | quote }}
11-

charts/defguard-proxy/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ spec:
4242
imagePullPolicy: {{ .Values.image.pullPolicy }}
4343
ports:
4444
- name: http
45-
containerPort: {{ .Values.service.ports.http }}
45+
containerPort: {{ .Values.service.web.port }}
4646
protocol: TCP
4747
- name: grpc
48-
containerPort: {{ .Values.service.ports.grpc }}
48+
containerPort: {{ .Values.service.web.port }}
4949
protocol: TCP
5050
livenessProbe:
5151
httpGet:

0 commit comments

Comments
 (0)