From e63bf370f70fa21fd1a5630ca94a25aa5e9163da Mon Sep 17 00:00:00 2001 From: kqmaverick <121722567+kqmaverick@users.noreply.github.com> Date: Sat, 12 Aug 2023 03:08:09 -0700 Subject: [PATCH] migrate(stun-turn-server): Migrate to New Common (#11431) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Migrate ⚒️ Fixes # **⚙️ Type of change** - [X] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/stun-turn-server/Chart.yaml | 4 +- .../incubator/stun-turn-server/questions.yaml | 22 ++--- .../stun-turn-server/templates/NOTES.txt | 1 + .../stun-turn-server/templates/common.yaml | 3 +- charts/incubator/stun-turn-server/values.yaml | 83 +++++++++++-------- 5 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 charts/incubator/stun-turn-server/templates/NOTES.txt diff --git a/charts/incubator/stun-turn-server/Chart.yaml b/charts/incubator/stun-turn-server/Chart.yaml index 92f5f6f79e1..8a02d91af7b 100644 --- a/charts/incubator/stun-turn-server/Chart.yaml +++ b/charts/incubator/stun-turn-server/Chart.yaml @@ -7,7 +7,7 @@ appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 14.0.1 deprecated: false description: "This is a Basic STUN & TURN server that was mainly created for Nextcloud Talk." home: https://truecharts.org/charts/incubator/stun-turn-server @@ -24,4 +24,4 @@ name: stun-turn-server sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/stun-turn-server type: application -version: 2.0.9 +version: 3.0.0 diff --git a/charts/incubator/stun-turn-server/questions.yaml b/charts/incubator/stun-turn-server/questions.yaml index 12eb27c8935..50f9a2f048a 100644 --- a/charts/incubator/stun-turn-server/questions.yaml +++ b/charts/incubator/stun-turn-server/questions.yaml @@ -109,19 +109,19 @@ questions: description: "Specify your state or province." schema: type: string - default: "None" + default: "" - variable: CA_LOCALITY label: "CA_LOCALITY" description: "Specify your locality." schema: type: string - default: "None" + default: "" - variable: CA_ORGANIZATION label: "CA_ORGANIZATION" description: "Specify your organiszation." schema: type: string - default: "None" + default: "" - variable: DH_LENGTH label: "DH_LENGTH" description: "Enter your preferred key length (the higher the value the longer it takes to generate the key)." @@ -140,12 +140,6 @@ questions: schema: type: string default: "0.0.0.0" - - variable: UMASK - label: "UMASK" - description: "Container Variable 000" - schema: - type: string - default: "000" - variable: DATA_PERM label: "DATA_PERM" description: "Container Variable DATAPERM" @@ -177,7 +171,7 @@ questions: default: 5349 required: true - variable: udpports - label: 'udpports service' + label: 'UDP Service Port Configuration' description: "UDP Port" schema: additional_attrs: true @@ -186,7 +180,7 @@ questions: # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: udpports - label: "udpports Service Port Configuration" + label: "UDP Service Port Configuration" schema: additional_attrs: true type: dict @@ -202,9 +196,9 @@ questions: # Include{serviceExpert} # Include{serviceList} # Include{persistenceRoot} - - variable: containerpath - label: "containerpath Storage" - description: "Container Path stun-turn" + - variable: config + label: "App Config Storage" + description: "Stores the Application Data." schema: additional_attrs: true type: dict diff --git a/charts/incubator/stun-turn-server/templates/NOTES.txt b/charts/incubator/stun-turn-server/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/stun-turn-server/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/stun-turn-server/templates/common.yaml b/charts/incubator/stun-turn-server/templates/common.yaml index cbf66c20818..b51394e00a4 100644 --- a/charts/incubator/stun-turn-server/templates/common.yaml +++ b/charts/incubator/stun-turn-server/templates/common.yaml @@ -1,2 +1 @@ -{{/* Render the templates */}} -{{ include "tc.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/stun-turn-server/values.yaml b/charts/incubator/stun-turn-server/values.yaml index 8d8b998c771..0157f948203 100644 --- a/charts/incubator/stun-turn-server/values.yaml +++ b/charts/incubator/stun-turn-server/values.yaml @@ -1,46 +1,16 @@ -env: - CA_COUNTRY: "" - CA_LOCALITY: None - CA_ORGANIZATION: None - CA_STATE_PROV: None - CERT_FILE: cert.pem - CERT_LENGTH: "2048" - CERT_VALID_DAYS: "3650" - CIPHER_LIST: ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384 - CLI_PASSWORD: "" - DATA_PERM: "770" - DH_FILE: dhparam.pem - DH_LENGTH: "2048" - DISPLAY_SECRETS: "true" - EXTRA_PARAMS: "" - LISTENING_IP: 0.0.0.0 - MAX_BPS: "0" - PORT: "5349" - PRIVKEY_FILE: privkey.pem - REALM: "" - SECRET: "" - TOTAL_QUOTA: "100" - UMASK: "000" image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/stun-turn-server tag: latest@sha256:7ec1d59d34be6cf49342d5524b7cb24c3a24bced8ca88093fa0bdee38abfe2bc -persistence: - containerpath: - enabled: true - mountPath: /stun-turn -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 -securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + service: main: + enabled: true ports: main: + enabled: true port: 5349 - protocol: TCP + protocol: tcp targetPort: 5349 udpports: enabled: true @@ -48,8 +18,49 @@ service: udpports: enabled: true port: 5349 - protocol: UDP + protocol: udp targetPort: 5349 +persistence: + config: + enabled: true + mountPath: "/stun-turn" + +securityContext: + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + +workload: + main: + podSpec: + containers: + main: + env: + CA_COUNTRY: "" + CA_LOCALITY: "" + CA_ORGANIZATION: "" + CA_STATE_PROV: "" + CERT_FILE: cert.pem + CERT_LENGTH: "2048" + CERT_VALID_DAYS: "3650" + CIPHER_LIST: ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384 + CLI_PASSWORD: "" + DATA_PERM: "770" + DH_FILE: dhparam.pem + DH_LENGTH: "2048" + DISPLAY_SECRETS: "true" + EXTRA_PARAMS: "" + LISTENING_IP: 0.0.0.0 + MAX_BPS: "0" + PORT: "5349" + PRIVKEY_FILE: privkey.pem + REALM: "" + SECRET: "" + TOTAL_QUOTA: "100" + portal: - enabled: true + open: + enabled: true