Skip to content

Commit

Permalink
#18 Ingress/Service for WS on new Cryptpad version
Browse files Browse the repository at this point in the history
- Added new service port/and ingress path to support new version of Cryptpad (5.4.1 and 5.5.0).
  • Loading branch information
gsautner committed Oct 16, 2023
1 parent c6f73b4 commit d9e0148
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/cryptpad/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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.0.10
version: 0.0.11

# 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
Expand Down
7 changes: 5 additions & 2 deletions charts/cryptpad/templates/cryptpad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ spec:
value: "{{ .Values.http2Disable }}"
{{- end }}
ports:
- name: http
containerPort: 3000
- name: {{ .Values.service.internalPort }}
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
- name: {{ .Values.service.websocket.internalPort }}
containerPort: {{ .Values.service.websocket.containerPort }}
protocol: TCP
livenessProbe:
httpGet:
Expand Down
14 changes: 10 additions & 4 deletions charts/cryptpad/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "cryptpad-helm.fullname" . -}}
{{- $svcPort := .Values.service.externalPort -}}
{{- $svcWsPort := .Values.service.websocket.externalPort -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -30,14 +31,19 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
- path: /
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
- path: /cryptpad_websocket
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcWsPort }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/cryptpad/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ spec:
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: {{ .Values.service.name }}
- port: {{ .Values.service.websocket.externalPort }}
targetPort: {{ .Values.service.websocket.internalPort }}
protocol: TCP
name: {{ .Values.service.websocket.internalPort }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
selector:
{{- include "cryptpad-helm.selectorLabels" . | nindent 4 }}
10 changes: 6 additions & 4 deletions charts/cryptpad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workloadStateful: true
image:
pullPolicy: IfNotPresent
repository: cryptpad/cryptpad
tag: "version-5.4.0"
tag: "version-5.5.0"
# repository: git.xwikisas.com:5050/xwiki-cloud-infrastructure/docker-images/cryptpad
# tag: "latest"

Expand Down Expand Up @@ -155,6 +155,11 @@ service:
type: ClusterIP
externalPort: 80
internalPort: http
containerPort: 3000
websocket:
externalPort: 83
internalPort: ws
containerPort: 3003
# Set an array of externalIPs for the service
externalIPs: []
# - 10.20.30.40
Expand All @@ -172,9 +177,6 @@ ingress:
# kubernetes.io/tls-acme: "true"
hosts:
- host: localhost
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: secret-tls

Expand Down

0 comments on commit d9e0148

Please sign in to comment.