Skip to content

Commit

Permalink
New chart (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
moubctez authored Jan 24, 2024
1 parent c98890b commit e1b6f6d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 11 deletions.
17 changes: 17 additions & 0 deletions charts/defguard-proxy/templates/grpc-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
annotations:
traefik.ingress.kubernetes.io/service.serversscheme: h2c
name: {{ include "defguard-proxy.fullname" . }}-grpc
labels:
{{- include "defguard-proxy.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.ports.grpc }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
{{- include "defguard-proxy.selectorLabels" . | nindent 4 }}
17 changes: 17 additions & 0 deletions charts/defguard-proxy/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,21 @@ spec:
serviceName: {{ $fullName }}
servicePort: {{ .Values.service.ports.http }}
{{- end }}
- host: {{ .Values.ingress.hosts.grpc | quote }}
http:
paths:
- path: /
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}-grpc
port:
number: {{ .Values.service.ports.grpc }}
{{- else }}
serviceName: {{ $fullName }}-grpc
servicePort: {{ .Values.service.ports.grpc }}
{{- end }}
{{- end }}
4 changes: 0 additions & 4 deletions charts/defguard-proxy/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.ports.grpc }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
{{- include "defguard-proxy.selectorLabels" . | nindent 4 }}
8 changes: 4 additions & 4 deletions charts/defguard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: defguard
description: Defguard is an open-source identity management system

type: application
version: 0.5.0
appVersion: 0.8.0
version: 0.6.0
appVersion: 0.9.0

dependencies:
- name: postgresql
version: 12.11.1
version: 12.13.2
repository: https://charts.bitnami.com/bitnami
- name: defguard-proxy
condition: defguard-proxy.enabled
version: 0.2.0
version: 0.3.0
repository: https://defguard.github.io/deployment
11 changes: 9 additions & 2 deletions charts/defguard/templates/defguard-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ metadata:
labels:
{{- include "defguard.labels" . | nindent 4 }}
data:
DEFGUARD_DB_HOST: {{ include "defguard.fullname" . }}-postgresql
{{- if .Values.cookie.domain }}
DEFGUARD_COOKIE_DOMAIN: {{ .Values.cookie.domain }}
{{- end }}
DEFGUARD_COOKIE_INSECURE: {{ .Values.cookie.insecure | quote }}
DEFGUARD_DB_HOST: {{ include "defguard.fullname" . }}-postgresql
DEFGUARD_DB_NAME: {{ .Values.postgresql.auth.database }}
DEFGUARD_DB_USER: {{ .Values.postgresql.auth.username }}
DEFGUARD_GRPC_PORT: {{ .Values.service.ports.grpc | quote }}
DEFGUARD_ENROLLMENT_URL: {{ index .Values "defguard-proxy" "publicUrl" }}
{{- if .Values.proxyUrl }}
DEGUARD_PROXY_URL: {{ .Values.proxyUrl }}
{{- end }}
DEFGUARD_URL: {{ .Values.publicUrl }}
DEFGUARD_WEBAUTHN_RP_ID: {{ .Values.ingress.hosts.web }}
DEFGUARD_ENROLLMENT_URL: {{ index .Values "defguard-proxy" "publicUrl" }}
{{- if .Values.ldap.enabled }}
DEFGUARD_LDAP_ADMIN_GROUP: {{ .Values.ldap.admin_group | quote }}
DEFGUARD_LDAP_BIND_PASSWORD: {{ .Values.ldap.bind_password | quote }}
Expand Down
6 changes: 5 additions & 1 deletion charts/defguard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
cookie:
domain: ""
insecure: false
fullnameOverride: ""
image:
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -38,6 +41,7 @@ postgresql:
database: defguard
existingSecret: postgres-password
username: defguard
proxyUrl: ""
publicUrl: "http://defguard.local"
replicaCount: 1
resources: {}
Expand All @@ -54,8 +58,8 @@ tolerations: []
# sub-chart defguard-proxy
defguard-proxy:
enabled: false
upstreamGrpcUrl: "http://defguard-grpc.local"
publicUrl: "http://enrollment.local"
ingress:
hosts:
grpc: defguard-proxy-grpc.local
web: enrollment.local

0 comments on commit e1b6f6d

Please sign in to comment.