diff --git a/library/ix-dev/community/mumble/Chart.lock b/library/ix-dev/community/mumble/Chart.lock new file mode 100644 index 0000000000..d9812d95d7 --- /dev/null +++ b/library/ix-dev/community/mumble/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.0.6 +digest: sha256:2f1f31c15fb7f92db141a66adbb8d23a8598727730050a3883a211763a4e5472 +generated: "2023-04-20T17:45:03.548828895+03:00" diff --git a/library/ix-dev/community/mumble/Chart.yaml b/library/ix-dev/community/mumble/Chart.yaml new file mode 100644 index 0000000000..41a665302c --- /dev/null +++ b/library/ix-dev/community/mumble/Chart.yaml @@ -0,0 +1,25 @@ +name: mumble +description: Mumble is a free, open source, low latency, high quality voice chat application. +annotations: + title: Mumble +type: application +version: 1.0.0 +apiVersion: v2 +appVersion: 'v1.4.230' +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ + email: dev@ixsystems.com +dependencies: +- name: common + repository: file://../../../common + version: 1.0.6 +home: https://www.mumble.info/ +icon: https://github.com/mumble-voip/mumble/blob/master/icons/mumble.svg +sources: +- https://github.com/mumble-voip/mumble-docker +- https://github.com/truenas/charts/tree/master/community/mumble +- https://www.mumble.info/ +keywords: +- voice diff --git a/library/ix-dev/community/mumble/README.md b/library/ix-dev/community/mumble/README.md new file mode 100644 index 0000000000..9aca2cb8d0 --- /dev/null +++ b/library/ix-dev/community/mumble/README.md @@ -0,0 +1,16 @@ +# Mumble + +[Mumble](https://www.mumble.info/) is an Open Source, Low Latency, High Quality Voice Chat Home Downloads Documentation Blog Contribute About + +> When application is installed, a container will be launched with **root** privileges. +> This is required in order to apply the correct permissions to the `Mumble` directories. +> Afterward, the `Mumble` container will run as a **non**-root user (`1000`, Cannot change). + +You can change the server configuration by adding additional environment variables. +Prefix the configuration variable with `MUMBLE_CONFIG_` and it will be added to the configuration file. +View the [Mumble Configuration File](https://wiki.mumble.info/wiki/Murmur.ini) for more information. + +For example you can set `autobanAttempts` like this: + +- Name: `MUMBLE_CONFIG_autobanAttempts` +- Value: `5` diff --git a/library/ix-dev/community/mumble/app-readme.md b/library/ix-dev/community/mumble/app-readme.md new file mode 100644 index 0000000000..9aca2cb8d0 --- /dev/null +++ b/library/ix-dev/community/mumble/app-readme.md @@ -0,0 +1,16 @@ +# Mumble + +[Mumble](https://www.mumble.info/) is an Open Source, Low Latency, High Quality Voice Chat Home Downloads Documentation Blog Contribute About + +> When application is installed, a container will be launched with **root** privileges. +> This is required in order to apply the correct permissions to the `Mumble` directories. +> Afterward, the `Mumble` container will run as a **non**-root user (`1000`, Cannot change). + +You can change the server configuration by adding additional environment variables. +Prefix the configuration variable with `MUMBLE_CONFIG_` and it will be added to the configuration file. +View the [Mumble Configuration File](https://wiki.mumble.info/wiki/Murmur.ini) for more information. + +For example you can set `autobanAttempts` like this: + +- Name: `MUMBLE_CONFIG_autobanAttempts` +- Value: `5` diff --git a/library/ix-dev/community/mumble/charts/common-1.0.6.tgz b/library/ix-dev/community/mumble/charts/common-1.0.6.tgz new file mode 100644 index 0000000000..ad2bcf3d3d Binary files /dev/null and b/library/ix-dev/community/mumble/charts/common-1.0.6.tgz differ diff --git a/library/ix-dev/community/mumble/ci/basic-values.yaml b/library/ix-dev/community/mumble/ci/basic-values.yaml new file mode 100644 index 0000000000..a25ceb99fc --- /dev/null +++ b/library/ix-dev/community/mumble/ci/basic-values.yaml @@ -0,0 +1,15 @@ +mumbleConfig: + serverPassword: supersecret + superUserPassword: superuser + iceSecretRead: letmelook + iceSecretWrite: letmechangestuff + welcomeText: Welcome to Mumble Test! + +mumbleStorage: + data: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/data + +# Enable probes on CI runs only, +# so we can check if the container is ready +ci: true diff --git a/library/ix-dev/community/mumble/ci/cert-values.yaml b/library/ix-dev/community/mumble/ci/cert-values.yaml new file mode 100644 index 0000000000..b6bddb0346 --- /dev/null +++ b/library/ix-dev/community/mumble/ci/cert-values.yaml @@ -0,0 +1,104 @@ +mumbleConfig: + serverPassword: supersecret + superUserPassword: superuser + iceSecretRead: letmelook + iceSecretWrite: letmechangestuff + welcomeText: Welcome to Mumble Test! + +mumbleStorage: + data: + type: hostPath + hostPath: /mnt/{{ .Release.Name }}/data + +mumbleNetwork: + certificateID: 1 + +ixCertificates: + "1": + certificate: | + -----BEGIN CERTIFICATE----- + MIIEdjCCA16gAwIBAgIDYFMYMA0GCSqGSIb3DQEBCwUAMGwxDDAKBgNVBAMMA2Fz + ZDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxCzAJBgNVBAcMAmFmMQ0wCwYD + VQQKDARhc2RmMQwwCgYDVQQLDANhc2QxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w + HhcNMjEwODMwMjMyMzU0WhcNMjMxMjAzMjMyMzU0WjBuMQswCQYDVQQDDAJhZDEL + MAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxDTALBgNVBAcMBGFzZGYxDTALBgNV + BAoMBGFkc2YxDTALBgNVBAsMBGFzZGYxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w + ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7+1xOHRQyOnQTHFcrdasX + Zl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/AbkH7oVFWC1 + P973W1+ArF5sA70f7BZgqRKJTIisuIFIlRETgfnP2pfQmHRZtGaIJRZI4vQCdYgW + 2g0KOvvNcZJCVq1OrhKiNiY1bWCp66DGg0ic6OEkZFHTm745zUNQaf2dNgsxKU0H + PGjVLJI//yrRFAOSBUqgD4c50krnMF7fU/Fqh+UyOu8t6Y/HsySh3urB+Zie331t + AzV6QV39KKxRflNx/yuWrtIEslGTm+xHKoCYJEk/nZ3mX8Y5hG6wWAb7A/FuDVg3 + AgMBAAGjggEdMIIBGTAnBgNVHREEIDAehwTAqAADhwTAqAAFhwTAqAC2hwTAqACB + hwTAqACSMB0GA1UdDgQWBBQ4G2ff4tgZ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9XYL+Fb2rlkA0O2d + 2No34DQLgqSmST/LAvPM7Cbp6knYgnKmGr1nETCXasg1cueHLnWWTvps2HiPp2D/ + +Fq0uqcZLu4Mdo0CPs4e5sHRyldEnRSKh0DVLprq9zr/GMipmPLJUsT5Jed3sj0w + M7Y3vwxshpo= + -----END CERTIFICATE----- + privatekey: | + -----BEGIN PRIVATE KEY----- + MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC7+1xOHRQyOnQT + HFcrdasXZl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/Abk + H7oVFWC1P973W1+ArF5sA70f7BZgqRKJTIisuIFIlRETgfnP2pfQmHRZtGaIJRZI + 4vQCdYgW2g0KOvvNcZJCVq1OrhKiNiY1bWCp66DGg0ic6OEkZFHTm745zUNQaf2d + NgsxKU0HPGjVLJI//yrRFAOSBUqgD4c50krnMF7fU/Fqh+UyOu8t6Y/HsySh3urB + +Zie331tAzV6QV39KKxRflNx/yuWrtIEslGTm+xHKoCYJEk/nZ3mX8Y5hG6wWAb7 + A/FuDVg3AgMBAAECggEAapt30rj9DitGTtxAt13pJMEhyYxvvD3WkvmJwguF/Bbu + eW0Ba1c668fMeRCA54FWi1sMqusPS4HUqqUvk+tmyAOsAF4qgD/A4MMSC7uJSVI5 + N/JWhJWyhCY94/FPakiO1nbPbVw41bcqtzU2qvparpME2CtxSCbDiqm7aaag3Kqe + EF0fGSUdZ+TYl9JM05+eIyiX+UY19Fg0OjTHMn8nGpxcNTfDBdQ68TKvdo/dtIKL + PLKzJUNNdM8odC4CvQtfGMqaslwZwXkiOl5VJcW21ncj/Y0ngEMKeD/i65ZoqGdR + 0FKCQYEAGtM2FvJcZQ92Wsw7yj2bK2MSegVUyLK32QKBgQDe8syVCepPzRsfjfxA + 6TZlWcGuTZLhwIx97Ktw3VcQ1f4rLoEYlv0xC2VWBORpzIsJo4I/OLmgp8a+Ga8z + FkVRnq90dV3t4NP9uJlHgcODHnOardC2UUka4olBSCG6zmK4Jxi34lOxhGRkshOo + L4IBeOIB5g+ZrEEXkzfYJHESRQKBgQDX2YhFhGIrT8BAnC5BbXbhm8h6Bhjz8DYL + d+qhVJjef7L/aJxViU0hX9Ba2O8CLK3FZeREFE3hJPiJ4TZSlN4evxs5p+bbNDcA + 0mhRI/o3X4ac6IxdRebyYnCOB/Cu94/MzppcZcotlCekKNike7eorCcX4Qavm7Pu + MUuQ+ifmSwKBgEnchoqZzlbBzMqXb4rRuIO7SL9GU/MWp3TQg7vQmJerTZlgvsQ2 + wYsOC3SECmhCq4117iCj2luvOdihCboTFsQDnn0mpQe6BIF6Ns3J38wAuqv0CcFd + DKsrge1uyD3rQilgSoAhKzkUc24o0PpXQurZ8YZPgbuXpbj5vPaOnCdBAoGACYc7 + wb3XS4wos3FxhUfcwJbM4b4VKeeHqzfu7pI6cU/3ydiHVitKcVe2bdw3qMPqI9Wc + nvi6e17Tbdq4OCsEJx1OiVwFD9YdO3cOTc6lw/3+hjypvZBRYo+/4jUthbu96E+S + dtOzehGZMmDvN0uSzupSi3ZOgkAAUFpyuIKickMCgYAId0PCRjonO2thn/R0rZ7P + //L852uyzYhXKw5/fjFGhQ6LbaLgIRFaCZ0L2809u0HFnNvJjHv4AKP6j+vFQYYY + qQ+66XnfsA9G/bu4MDS9AX83iahD9IdLXQAy8I19prAbpVumKegPbMnNYNB/TYEc + 3G15AKCXo7jjOUtHY01DCQ== + -----END PRIVATE KEY----- + +# Enable probes on CI runs only, +# so we can check if the container is ready +ci: true diff --git a/library/ix-dev/community/mumble/item.yaml b/library/ix-dev/community/mumble/item.yaml new file mode 100644 index 0000000000..c74e8e29c3 --- /dev/null +++ b/library/ix-dev/community/mumble/item.yaml @@ -0,0 +1,3 @@ +icon_url: https://github.com/mumble-voip/mumble/blob/master/icons/mumble.svg +categories: + - voice diff --git a/library/ix-dev/community/mumble/metadata.yaml b/library/ix-dev/community/mumble/metadata.yaml new file mode 100644 index 0000000000..0707a5b397 --- /dev/null +++ b/library/ix-dev/community/mumble/metadata.yaml @@ -0,0 +1,8 @@ +runAsContext: + - userName: mumble + groupName: mumble + gid: 1000 + uid: 1000 + description: Mumble runs as non-root user. +capabilities: [] +hostMounts: [] diff --git a/library/ix-dev/community/mumble/questions.yaml b/library/ix-dev/community/mumble/questions.yaml new file mode 100644 index 0000000000..d00fe56f3b --- /dev/null +++ b/library/ix-dev/community/mumble/questions.yaml @@ -0,0 +1,189 @@ +groups: + - name: Mumble Configuration + description: Configure Mumble + - name: Network Configuration + description: Configure Network for Mumble + - name: Storage Configuration + description: Configure Storage for Mumble + - name: Resources Configuration + description: Configure Resources for Mumble + +questions: + - variable: mumbleConfig + label: "" + group: Mumble Configuration + schema: + type: dict + attrs: + - variable: serverPassword + label: Server Password + description: The password for the Mumble Server. + schema: + type: string + empty: false + required: true + private: true + - variable: superUserPassword + label: Super User Password + description: The password for the Mumble Super User. + schema: + type: string + empty: false + required: true + private: true + - variable: iceSecretRead + label: Ice Secret Read + description: The Ice Secret for Read Operations. + schema: + type: string + empty: false + required: true + private: true + - variable: iceSecretWrite + label: Ice Secret Write + description: The Ice Secret for Write Operations. + schema: + type: string + empty: false + required: true + private: true + - variable: users + label: Users + description: The maximum number of users for the Mumble Server. + schema: + type: int + default: 100 + required: true + - variable: welcomeText + label: Welcome Text + description: The welcome text for the Mumble Server. + schema: + type: string + default: Welcome to Mumble! + required: true + - variable: additionalEnvs + label: Additional Environment Variables + description: Configure additional environment variables for Mumble. + schema: + type: list + default: [] + items: + - variable: env + label: Environment Variable + schema: + type: dict + attrs: + - variable: name + label: Name + schema: + type: string + required: true + - variable: value + label: Value + schema: + type: string + required: true + + - variable: mumbleNetwork + label: "" + group: Network Configuration + schema: + type: dict + attrs: + - variable: serverPort + label: Server Port + description: The port for the Mumble Server (UDP & TCP). + schema: + type: int + default: 30000 + min: 9000 + max: 65535 + required: true + - variable: icePort + label: Ice Port + description: The port for the Ice. + schema: + type: int + default: 30001 + min: 9000 + max: 65535 + required: true + - variable: certificateID + label: Certificate + description: The certificate to use for Mumble + schema: + type: int + "null": true + $ref: + - "definitions/certificate" + + - variable: mumbleStorage + label: "" + group: Storage Configuration + schema: + type: dict + attrs: + - variable: data + label: Mumble Data Storage + description: The path to store Mumble Data. + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system. + schema: + type: string + required: true + default: ixVolume + enum: + - value: hostPath + description: Host Path (Path that already exists on the system) + - value: ixVolume + description: ixVolume (Dataset created automatically by the system) + - variable: datasetName + label: Dataset Name + schema: + type: string + show_if: [["type", "=", "ixVolume"]] + required: true + hidden: true + immutable: true + default: data + $ref: + - "normalize/ixVolume" + - variable: hostPath + label: Host Path + schema: + type: hostpath + show_if: [["type", "=", "hostPath"]] + immutable: true + required: true + + - variable: resources + label: Resources Configuration + group: Resources Configuration + schema: + type: dict + attrs: + - variable: limits + label: Limits + schema: + type: dict + attrs: + - variable: cpu + label: CPU + description: CPU limit for Mumble. + schema: + type: string + default: 4000m + required: true + - variable: memory + label: Memory + description: Memory limit for Mumble. + schema: + type: string + default: 8Gi + required: true diff --git a/library/ix-dev/community/mumble/templates/NOTES.txt b/library/ix-dev/community/mumble/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/library/ix-dev/community/mumble/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/library/ix-dev/community/mumble/templates/_configuration.tpl b/library/ix-dev/community/mumble/templates/_configuration.tpl new file mode 100644 index 0000000000..3d9b976266 --- /dev/null +++ b/library/ix-dev/community/mumble/templates/_configuration.tpl @@ -0,0 +1,25 @@ +{{- define "mumble.configuration" -}} + +{{/* Configmaps */}} +configmap: + mumble-config: + enabled: true + data: + {{ if .Values.mumbleNetwork.certificateID }} + MUMBLE_CONFIG_sslCert: /certs/public.crt + MUMBLE_CONFIG_sslKey: /certs/private.key + {{ end }} + MUMBLE_CONFIG_database: /data/mumble-server.sqlite + MUMBLE_CONFIG_port: {{ .Values.mumbleNetwork.serverPort | quote }} + MUMBLE_CONFIG_welcometext: {{ .Values.mumbleConfig.welcomeText }} + MUMBLE_CONFIG_users: {{ .Values.mumbleConfig.users | quote }} + MUMBLE_CONFIG_ice: {{ printf "tcp -h 127.0.0.1 -p %v" .Values.mumbleNetwork.icePort }} +secret: + mumble-secret: + enabled: true + data: + MUMBLE_SUPERUSER_PASSWORD: {{ .Values.mumbleConfig.superUserPassword | quote }} + MUMBLE_CONFIG_serverpassword: {{ .Values.mumbleConfig.serverPassword | quote }} + MUMBLE_CONFIG_icesecretread: {{ .Values.mumbleConfig.iceSecretRead }} + MUMBLE_CONFIG_icesecretwrite: {{ .Values.mumbleConfig.iceSecretWrite }} +{{- end -}} diff --git a/library/ix-dev/community/mumble/templates/_mumble.tpl b/library/ix-dev/community/mumble/templates/_mumble.tpl new file mode 100644 index 0000000000..f4b5762abf --- /dev/null +++ b/library/ix-dev/community/mumble/templates/_mumble.tpl @@ -0,0 +1,119 @@ +{{- define "mumble.workload" -}} +workload: + mumble: + enabled: true + primary: true + type: Deployment + podSpec: + hostNetwork: false + containers: + mumble: + enabled: true + primary: true + imageSelector: image + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + envFrom: + - configMapRef: + name: mumble-config + - secretRef: + name: mumble-secret + {{ with .Values.mumbleConfig.additionalEnvs }} + envList: + {{ range $env := . }} + - name: {{ $env.name }} + value: {{ $env.value }} + {{ end }} + {{ end }} + probes: + # Probes are disabled because it fills the logs with + # "connection attemps" + liveness: + enabled: {{ .Values.ci }} + type: tcp + port: "{{ .Values.mumbleNetwork.serverPort }}" + readiness: + enabled: {{ .Values.ci }} + type: tcp + port: "{{ .Values.mumbleNetwork.serverPort }}" + startup: + enabled: {{ .Values.ci }} + type: tcp + port: "{{ .Values.mumbleNetwork.serverPort }}" + initContainers: + {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions" + "UID" 1000 + "GID" 1000 + "mode" "check" + "type" "install") | nindent 8 }} + +{{/* Service */}} +service: + mumble: + enabled: true + primary: true + type: NodePort + targetSelector: mumble + ports: + tcp: + enabled: true + primary: true + port: {{ .Values.mumbleNetwork.serverPort }} + nodePort: {{ .Values.mumbleNetwork.serverPort }} + targetSelector: mumble + udp: + enabled: true + port: {{ .Values.mumbleNetwork.serverPort }} + nodePort: {{ .Values.mumbleNetwork.serverPort }} + protocol: udp + targetSelector: mumble + ice: + enabled: true + type: NodePort + targetSelector: mumble + ports: + ice: + enabled: true + primary: true + port: {{ .Values.mumbleNetwork.icePort }} + nodePort: {{ .Values.mumbleNetwork.icePort }} + targetSelector: mumble + +{{/* Persistence */}} +persistence: + data: + enabled: true + type: {{ .Values.mumbleStorage.data.type }} + datasetName: {{ .Values.mumbleStorage.data.datasetName | default "" }} + hostPath: {{ .Values.mumbleStorage.data.hostPath | default "" }} + targetSelector: + mumble: + mumble: + mountPath: /data + 01-permissions: + mountPath: /mnt/directories/data + + {{- if .Values.mumbleNetwork.certificateID }} + cert: + enabled: true + type: secret + objectName: mumble-cert + defaultMode: "0600" + items: + - key: tls.key + path: private.key + - key: tls.crt + path: public.crt + targetSelector: + mumble: + mumble: + mountPath: /certs + readOnly: true + +scaleCertificate: + mumble-cert: + enabled: true + id: {{ .Values.mumbleNetwork.certificateID }} + {{- end -}} +{{- end -}} diff --git a/library/ix-dev/community/mumble/templates/common.yaml b/library/ix-dev/community/mumble/templates/common.yaml new file mode 100644 index 0000000000..df732cd288 --- /dev/null +++ b/library/ix-dev/community/mumble/templates/common.yaml @@ -0,0 +1,7 @@ +{{- include "ix.v1.common.loader.init" . -}} + +{{/* Merge the templates with Values */}} +{{- $_ := mustMergeOverwrite .Values (include "mumble.configuration" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "mumble.workload" $ | fromYaml) -}} + +{{- include "ix.v1.common.loader.apply" . -}} diff --git a/library/ix-dev/community/mumble/upgrade_info.json b/library/ix-dev/community/mumble/upgrade_info.json new file mode 100644 index 0000000000..767388094a --- /dev/null +++ b/library/ix-dev/community/mumble/upgrade_info.json @@ -0,0 +1 @@ +{"filename": "values.yaml", "keys": ["image"]} diff --git a/library/ix-dev/community/mumble/upgrade_strategy b/library/ix-dev/community/mumble/upgrade_strategy new file mode 100755 index 0000000000..8d55579f9a --- /dev/null +++ b/library/ix-dev/community/mumble/upgrade_strategy @@ -0,0 +1,31 @@ +#!/usr/bin/python3 +import json +import re +import sys + +from catalog_update.upgrade_strategy import semantic_versioning + + +RE_STABLE_VERSION = re.compile(r'v[0-9]\.[0-9]\.[0-9]+') + + +def newer_mapping(image_tags): + key = list(image_tags.keys())[0] + tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} + version = semantic_versioning(list(tags)) + if not version: + return {} + + return { + 'tags': {key: tags[version]}, + 'app_version': version, + } + + +if __name__ == '__main__': + try: + versions_json = json.loads(sys.stdin.read()) + except ValueError: + raise ValueError('Invalid json specified') + + print(json.dumps(newer_mapping(versions_json))) diff --git a/library/ix-dev/community/mumble/values.yaml b/library/ix-dev/community/mumble/values.yaml new file mode 100644 index 0000000000..1cff314570 --- /dev/null +++ b/library/ix-dev/community/mumble/values.yaml @@ -0,0 +1,29 @@ +image: + repository: mumblevoip/mumble-server + pullPolicy: IfNotPresent + tag: v1.4.230 + +resources: + limits: + cpu: 4000m + memory: 8Gi + +ci: false + +mumbleConfig: + serverPassword: '' + superUserPassword: '' + iceSecretRead: '' + iceSecretWrite: '' + users: 100 + welcomeText: Welcome to Mumble! + additionalEnvs: [] +mumbleNetwork: + serverPort: 30000 + icePort: 30001 + certificateID: 0 +mumbleStorage: + data: + type: ixVolume + hostPath: '' + datasetName: data