From 72ee00ca06a8749bba26e6d7834893fa1355932a Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Tue, 30 May 2023 14:31:22 -0400 Subject: [PATCH] migrate(snippet-box) snippet-box to new common. (#9297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [X] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 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 - [X] ⬆️ 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> --- .github/scripts/tc-lint.sh | 2 + .github/workflows/charts-lint.yaml | 5 ++- charts/incubator/snippet-box/Chart.yaml | 16 ++++---- charts/incubator/snippet-box/questions.yaml | 33 +++++++-------- .../snippet-box/templates/common.yaml | 3 +- charts/incubator/snippet-box/values.yaml | 40 +++++++++++++------ 6 files changed, 57 insertions(+), 42 deletions(-) diff --git a/.github/scripts/tc-lint.sh b/.github/scripts/tc-lint.sh index 02d6d59a0fe..22a034b4951 100755 --- a/.github/scripts/tc-lint.sh +++ b/.github/scripts/tc-lint.sh @@ -204,6 +204,8 @@ echo '' | tee -a "$result_file" if [ $exit_code -ne 0 ]; then echo "❌ Linting: **Failed** - Took $diff_time seconds" | tee -a "$result_file" + echo "🖱️ Open [Lint Charts and Verify Dependencies] job" | tee -a "$result_file" + echo "👀 Expand [Run Chart Linting] step to view the results" | tee -a "$result_file" else echo "✅ Linting: **Passed** - Took $diff_time seconds" | tee -a "$result_file" fi diff --git a/.github/workflows/charts-lint.yaml b/.github/workflows/charts-lint.yaml index 347ff641bc4..c2464d72f76 100644 --- a/.github/workflows/charts-lint.yaml +++ b/.github/workflows/charts-lint.yaml @@ -119,7 +119,10 @@ jobs: shell: bash run: | if [ "${{ steps.lint.outcome }}" != "success" ]; then - echo "Linting failed" + echo "❌ Linting failed ❌" + echo '###############################################################' + echo '## 👀 Expand [Run Chart Linting] step to view the results 👀 ##' + echo '###############################################################' exit 1 fi diff --git a/charts/incubator/snippet-box/Chart.yaml b/charts/incubator/snippet-box/Chart.yaml index c7696737e99..7c3d61d783f 100644 --- a/charts/incubator/snippet-box/Chart.yaml +++ b/charts/incubator/snippet-box/Chart.yaml @@ -1,16 +1,11 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/catagories: | - - Productivity - - Tools-Utilities apiVersion: v2 appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 12.10.4 deprecated: false -description: Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages. +description: Snippet Box is a simple self-hosted app for organizing your code snippets. home: https://truecharts.org/charts/incubator/snippet-box icon: https://truecharts.org/img/hotlink-ok/chart-icons/snippet-box.png keywords: @@ -27,4 +22,9 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/snippet-box - https://github.com/pawelmalak/snippet-box type: application -version: 2.0.9 +version: 3.0.0 +annotations: + truecharts.org/catagories: | + - Productivity + - Tools-Utilities + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/snippet-box/questions.yaml b/charts/incubator/snippet-box/questions.yaml index e0207f83662..7b922015ca0 100644 --- a/charts/incubator/snippet-box/questions.yaml +++ b/charts/incubator/snippet-box/questions.yaml @@ -10,29 +10,24 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} + # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} # Include{serviceRoot} - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: +# Include{serviceMain} # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main - label: "Main Service Port Configuration" + label: Main Service Port Configuration schema: additional_attrs: true type: dict attrs: - variable: port - label: "Port" - description: "This port exposes the container port on the service" + label: Port + description: This port exposes the container port on the service schema: type: int default: 5039 @@ -42,8 +37,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: data - label: "data Storage" - description: "Container Path appdata" + label: App Data Storage + description: Stores the Application Data. schema: additional_attrs: true type: dict @@ -52,7 +47,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: "Main Ingress" + label: Main Ingress schema: additional_attrs: true type: dict @@ -65,14 +60,14 @@ questions: # Include{securityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + label: runAsUser + description: The UserID of the user running the application schema: type: int default: 0 - variable: runAsGroup - label: "runAsGroup" - description: "The groupID of the user running the application" + label: runAsGroup + description: The groupID of the user running the application schema: type: int default: 0 @@ -80,8 +75,8 @@ questions: # Include{securityContextAdvanced} # Include{securityContextPod} - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/incubator/snippet-box/templates/common.yaml b/charts/incubator/snippet-box/templates/common.yaml index cbf66c20818..b51394e00a4 100644 --- a/charts/incubator/snippet-box/templates/common.yaml +++ b/charts/incubator/snippet-box/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/snippet-box/values.yaml b/charts/incubator/snippet-box/values.yaml index b1b688679c5..33c4c065626 100644 --- a/charts/incubator/snippet-box/values.yaml +++ b/charts/incubator/snippet-box/values.yaml @@ -1,25 +1,41 @@ -env: {} image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/snippet-box tag: latest@sha256:cddcb706538f65fcf69a2d86f30c400f2dddbf04ea65e9801b8376a5c6f3e5e1 -persistence: - data: - enabled: true - mountPath: /app/data -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 + securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + type: http + readiness: + type: http + startup: + type: http + service: main: ports: main: port: 5039 - protocol: TCP + protocol: http targetPort: 5000 +persistence: + data: + enabled: true + mountPath: /app/data + portal: - enabled: true + open: + enabled: true