diff --git a/charts/ejabberd/.helmignore b/charts/ejabberd/.helmignore new file mode 100644 index 0000000..f56cea6 --- /dev/null +++ b/charts/ejabberd/.helmignore @@ -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 diff --git a/charts/ejabberd/Chart.yaml b/charts/ejabberd/Chart.yaml new file mode 100644 index 0000000..7647cd6 --- /dev/null +++ b/charts/ejabberd/Chart.yaml @@ -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.0.4 +sources: + - https://github.com/processone/ejabberd + - https://github.com/JuniorJPDJ/containers + - https://github.com/JuniorJPDJ/charts +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 diff --git a/charts/ejabberd/templates/common.yaml b/charts/ejabberd/templates/common.yaml new file mode 100644 index 0000000..9b90c02 --- /dev/null +++ b/charts/ejabberd/templates/common.yaml @@ -0,0 +1,13 @@ +{{/* Preprocess values and prepare config file */}} +{{- define "ejabberd.preprocess" -}} +controllers: + main: + containers: + main: + image: + {{- toYaml .Values.image | nindent 10 }} +{{- end -}} +{{- $_ := merge .Values (include "ejabberd.preprocess" . | fromYaml) -}} + +{{/* Render the templates */}} +{{- include "bjw-s.common.loader.all" . }} diff --git a/charts/ejabberd/values.yaml b/charts/ejabberd/values.yaml new file mode 100644 index 0000000..7d02347 --- /dev/null +++ b/charts/ejabberd/values.yaml @@ -0,0 +1,78 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml +# + +config: + ejabberd.yml: + # This config uses envsubst internally to replace ${ENV_VARS} with environment variable values + # The ${CAPTCHA_CMD} variable is always provided using entrypoint script and points to the captcha-ng.sh script + +envs: + +image: + repository: ghcr.io/juniorjpdj/containers/ejabberd-captcha + pullPolicy: Always + tag: 24.02-r1 + +persistence: + config: + type: persistentVolumeClaim + accessMode: ReadWriteOnce + retain: true + size: 100Mi + globalMounts: + - path: /config + readOnly: false + data: + type: persistentVolumeClaim + accessMode: ReadWriteOnce + retain: true + globalMounts: + - path: /data + readOnly: false + size: 10Gi + +defaultPodOptions: + securityContext: + fsGroup: 9000 + fsGroupChangePolicy: Always + +controllers: + main: + type: statefulset + containers: + main: + # image: + securityContext: + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 9000 + runAsGroup: 9000 + +service: + main: + type: ClusterIP + controller: main + ports: + http: + port: 8112 + protocol: HTTP + rtc: + port: 58846 + protocol: TCP + torrent: + type: ClusterIP + controller: main + ports: + tcp: + port: 6881 + protocol: TCP + udp: + port: 6881 + procotol: UDP