From 3c307117e47bd545a361b8fa5182c94468600389 Mon Sep 17 00:00:00 2001 From: tuxsudo Date: Mon, 13 Nov 2023 21:13:46 +0000 Subject: [PATCH] migrate(rimgo): Migrate rimgo to new common (#14592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates rimgo and migrates it to the new common I'm going to look and compare questions.yaml to see if anything needs to be changed but tbh I'm not sure so feel free to give input on that. **โš™๏ธ Type of change** - [ ] โš™๏ธ Feature/App addition - [ ] ๐Ÿช› Bugfix - [ ] โš ๏ธ 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?** Tested on local k3s ubuntu server **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [x] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [x] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [x] ๐Ÿงช 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 --------- Signed-off-by: Kjeld Schouten Co-authored-by: Kjeld Schouten --- charts/incubator/rimgo/Chart.yaml | 10 ++-- charts/incubator/rimgo/questions.yaml | 54 ++++++++++---------- charts/incubator/rimgo/templates/NOTES.txt | 1 + charts/incubator/rimgo/templates/common.yaml | 2 +- charts/incubator/rimgo/values.yaml | 28 +++++----- 5 files changed, 49 insertions(+), 46 deletions(-) create mode 100644 charts/incubator/rimgo/templates/NOTES.txt diff --git a/charts/incubator/rimgo/Chart.yaml b/charts/incubator/rimgo/Chart.yaml index ab917ab62eb..d313a0e9359 100644 --- a/charts/incubator/rimgo/Chart.yaml +++ b/charts/incubator/rimgo/Chart.yaml @@ -1,12 +1,9 @@ -annotations: - truecharts.org/SCALE-support: "true" - truecharts.org/category: Network-Web apiVersion: v2 appVersion: "latest" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 15.0.1 deprecated: false description: "Alternative Imgur front-end" home: https://truecharts.org/charts/incubator/rimgo @@ -23,4 +20,7 @@ name: rimgo sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/rimgo type: application -version: 2.0.23 +version: 3.0.0 +annotations: + truecharts.org/SCALE-support: "true" + truecharts.org/category: Network-Web diff --git a/charts/incubator/rimgo/questions.yaml b/charts/incubator/rimgo/questions.yaml index 03e556eb4cc..8376d47af11 100644 --- a/charts/incubator/rimgo/questions.yaml +++ b/charts/incubator/rimgo/questions.yaml @@ -6,39 +6,38 @@ questions: # Include{global} # Include{workload} # Include{workloadDeployment} - # Include{replicas1} # Include{podSpec} # Include{containerMain} + - variable: env + group: "App Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: ADDRESS + label: "ADDRESS" + description: "Hosted IP Address" + schema: + type: string + default: "0.0.0.0" + - variable: IMGUR_CLIENT_ID + label: "IMGUR_CLIENT_ID" + description: "Imgur Client ID" + schema: + type: string + default: "546c25a59c58ad7" + - variable: FORCE_WEBP + label: "FORCE_WEBP" + description: "Force WEBP to reduce bandwidth" + schema: + type: string + default: "0" # Include{containerBasic} # Include{containerAdvanced} - - - variable: env - group: "App Configuration" - label: "Image Environment" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ADDRESS - label: "ADDRESS" - description: "Hosted IP Address" - schema: - type: string - default: "0.0.0.0" - - variable: IMGUR_CLIENT_ID - label: "IMGUR_CLIENT_ID" - description: "Imgur Client ID" - schema: - type: string - default: "546c25a59c58ad7" - - variable: FORCE_WEBP - label: "FORCE_WEBP" - description: "Force WEBP to reduce bandwidth" - schema: - type: string - default: "0" # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - variable: main label: "Main Service" @@ -79,7 +78,6 @@ questions: # Include{ingressAdvanced} # Include{ingressList} # Include{securityContextRoot} - - variable: runAsUser label: "runAsUser" description: "The UserID of the user running the application" diff --git a/charts/incubator/rimgo/templates/NOTES.txt b/charts/incubator/rimgo/templates/NOTES.txt new file mode 100644 index 00000000000..c8b2d714d13 --- /dev/null +++ b/charts/incubator/rimgo/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} \ No newline at end of file diff --git a/charts/incubator/rimgo/templates/common.yaml b/charts/incubator/rimgo/templates/common.yaml index cbf66c20818..78d963fb168 100644 --- a/charts/incubator/rimgo/templates/common.yaml +++ b/charts/incubator/rimgo/templates/common.yaml @@ -1,2 +1,2 @@ {{/* Render the templates */}} -{{ include "tc.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/rimgo/values.yaml b/charts/incubator/rimgo/values.yaml index 24931603cec..d6e91964552 100644 --- a/charts/incubator/rimgo/values.yaml +++ b/charts/incubator/rimgo/values.yaml @@ -1,25 +1,29 @@ -env: - ADDRESS: 0.0.0.0 - FORCE_WEBP: "0" - IMGUR_CLIENT_ID: 546c25a59c58ad7 image: pullPolicy: IfNotPresent repository: tccr.io/truecharts/rimgo - tag: latest@sha256:9532c533dff314bc0edbd5514ca7f0008973ba59f790c3017c0a1c741520a355 + tag: latest@sha256:b7ad133ecb482fb454979686a8c590c438f4ad53cd71d6952eb5dc8529ce57df persistence: {} -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 + +env: + ADDRESS: 0.0.0.0 + IMGUR_CLIENT_ID: 546c25a59c58ad7 + FORCE_WEBP: "0" + securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + service: main: ports: main: port: 3000 - protocol: TCP + protocol: tcp targetPort: 3000 portal: - enabled: true + open: + enabled: true