-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial version of ejabberd chart (#64)
- Loading branch information
1 parent
4fc107a
commit 4f2d829
Showing
6 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
charts/*/charts/ | ||
.idea/ | ||
charts/*/output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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/ | ||
# helm-docs templates | ||
*.gotmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: v2 | ||
name: ejabberd | ||
description: Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server) | ||
type: application | ||
version: 0.1.0 | ||
# renovate: image=ghcr.io/juniorjpdj/containers/ejabberd-captcha | ||
appVersion: 24.02-r1 | ||
kubeVersion: ">=1.22.0-0" | ||
keywords: | ||
- ejabberd | ||
- jabber | ||
- xmpp | ||
- communication | ||
- IM | ||
- instant-messenger | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 3.1.0 | ||
sources: | ||
- https://github.com/processone/ejabberd | ||
- https://github.com/JuniorJPDJ/containers | ||
- https://github.com/JuniorJPDJ/charts/tree/master/charts/ejabberd | ||
annotations: | ||
artifacthub.io/links: |- | ||
- name: App Source | ||
url: https://github.com/processone/ejabberd | ||
- name: Dockerfile Source | ||
url: https://github.com/JuniorJPDJ/containers | ||
- name: Chart Source | ||
url: https://github.com/JuniorJPDJ/charts/tree/master/charts/ejabberd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- include "bjw-s.common.loader.init" . }} | ||
{{- $dot := . }} | ||
{{- range $name, $v := .Values.certificates }} | ||
{{- if dig "enabled" true $v }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ include "bjw-s.common.lib.chart.names.fullname" $dot }}-{{ $name }} | ||
spec: | ||
dnsNames: | ||
{{- toYaml $v.dnsNames | nindent 4 }} | ||
issuerRef: | ||
{{- toYaml $v.issuerRef | nindent 4 }} | ||
secretName: {{ include "bjw-s.common.lib.chart.names.fullname" $dot }}-{{ $name }}-cert | ||
--- | ||
|
||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{{/* Preprocess values and prepare config file */}} | ||
{{- include "bjw-s.common.loader.init" . }} | ||
{{- define "ejabberd.preprocess" -}} | ||
controllers: | ||
main: | ||
containers: | ||
main: | ||
image: | ||
{{- toYaml .Values.image | nindent 10 }} | ||
|
||
persistence: | ||
{{- $dot := . }} | ||
{{- range $name, $v := .Values.certificates }} | ||
{{- if dig "enabled" true $v }} | ||
{{- printf "%s-cert" $name | nindent 2 }}: | ||
type: secret | ||
name: {{ include "bjw-s.common.lib.chart.names.fullname" $dot }}-{{ $name }}-cert | ||
globalMounts: | ||
- path: /home/ejabberd/conf/certs/{{ $name }} | ||
readOnly: true | ||
{{- end }} | ||
{{- end }} | ||
|
||
configMaps: | ||
config: | ||
data: | ||
{{- range $name, $cfg := .Values.configs }} | ||
{{ quote $name }}: |- | ||
{{- toYaml $cfg | nindent 8 }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* Template for generating certfiles from certificates */}} | ||
{{- define "ejabberd.dynamic_certfiles" -}} | ||
{{- range $name, $v := .Values.certificates }} | ||
{{- if dig "enabled" true $v }} | ||
- /home/ejabberd/conf/certs/{{ $name }}/tls.crt | ||
- /home/ejabberd/conf/certs/{{ $name }}/tls.key | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* Concatenate certfiles from certificates and provided by user */}} | ||
{{- $ejabberdyml := get .Values.configs "ejabberd.yml" }} | ||
{{- $certfiles := concat (dig "certfiles" (list) $ejabberdyml) (include "ejabberd.dynamic_certfiles" . | fromYamlArray) }} | ||
{{- $_ := set $ejabberdyml "certfiles" (default (list) $certfiles) }} | ||
{{- $_ = set .Values.configs "ejabberd.yml" $ejabberdyml }} | ||
|
||
{{/* Merge values provided by user with those generated by preprocessing */}} | ||
{{- $_ = mustMerge .Values (include "ejabberd.preprocess" . | fromYaml) -}} | ||
|
||
{{/* Render the templates */}} | ||
{{- include "bjw-s.common.loader.all" . }} |
Oops, something went wrong.