From e8170c0c8d3b36875fdc372ef9ef3b9ce05b4f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skyler=20M=C3=A4ntysaari?= Date: Wed, 28 Jun 2023 13:14:16 +0300 Subject: [PATCH] =?UTF-8?q?common:=20Bring=20the=20fullname=20definition?= =?UTF-8?q?=20here,=20and=20not=20depend=20on=20Postgre=E2=80=A6=20(#32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * common: Bring the fullname definition here, and not depend on Postgresql chart to bring it. * Fix lint * Fix changelog checker * Fix values linting * Trying to fix the charts-changelog. * Trying to fix the charts-changelog, part two * values: fix lint * It seems k8s-at-home repo is went poof, so use upstream helm-docs. --- .github/workflows/charts-changelog.yaml | 8 ++-- charts/apps/piped/Chart.yaml | 7 ++-- charts/apps/piped/README.md | 8 ++-- charts/apps/piped/templates/common.yaml | 13 ++++++ charts/apps/piped/values.yaml | 55 ++++++++++++------------- 5 files changed, 51 insertions(+), 40 deletions(-) diff --git a/.github/workflows/charts-changelog.yaml b/.github/workflows/charts-changelog.yaml index ad711ef..109cad1 100644 --- a/.github/workflows/charts-changelog.yaml +++ b/.github/workflows/charts-changelog.yaml @@ -27,12 +27,14 @@ jobs: - name: Check changelog annotations if: inputs.isRenovatePR != 'true' run: | + UP_CHARTS_DIR="charts" IN_CHARTS=(${{ inputs.modifiedCharts }}) CHARTS=($(python -c 'import sys;a=sys.argv[1].translate(str.maketrans("","","[]")).split(",");print(" ".join(a))' $IN_CHARTS)) for i in "${CHARTS[@]}" do IFS='/' read -r -a chart_parts <<< "$i" - ./.github/scripts/check-releasenotes.sh "${chart_parts[0]}/${chart_parts[1]}" + chart_path="$UP_CHARTS_DIR/${chart_parts[0]}/${chart_parts[1]}" + ./.github/scripts/check-releasenotes.sh "$chart_path" echo "" done generate-changelog: @@ -56,8 +58,8 @@ jobs: - name: Install helm-docs run: | cd /tmp - wget https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.tar.gz - tar -xvf helm-docs_0.1.1_Linux_x86_64.tar.gz + wget https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.tar.gz + tar -xvf helm-docs_1.11.0_Linux_x86_64.tar.gz sudo mv helm-docs /usr/local/sbin sudo chmod +x /usr/local/sbin/helm-docs diff --git a/charts/apps/piped/Chart.yaml b/charts/apps/piped/Chart.yaml index 51479ab..ec7c8fc 100644 --- a/charts/apps/piped/Chart.yaml +++ b/charts/apps/piped/Chart.yaml @@ -9,7 +9,7 @@ sources: - https://github.com/TeamPiped/piped-proxy keywords: - streaming -version: 2.6.1 +version: 2.6.2 appVersion: latest kubeVersion: ">=1.22.0-0" maintainers: @@ -26,6 +26,5 @@ dependencies: condition: postgresql.enabled annotations: artifacthub.io/changes: |- - - kind: changed - description: Upgraded `common` chart dependency to version 1.5.1 - + - kind: fixed + description: ytproxy ingress, GH issue 29 diff --git a/charts/apps/piped/README.md b/charts/apps/piped/README.md index 522313d..1260342 100644 --- a/charts/apps/piped/README.md +++ b/charts/apps/piped/README.md @@ -1,6 +1,6 @@ # piped -![Version: 2.6.1](https://img.shields.io/badge/Version-2.6.1-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 2.6.2](https://img.shields.io/badge/Version-2.6.2-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Piped is an alternative privacy-friendly YouTube frontend which is efficient by design. @@ -160,7 +160,7 @@ helm install piped TeamPiped/piped -f values.yaml ## Changelog -### Version 2.6.1 +### Version 2.6.2 #### Added @@ -168,11 +168,11 @@ N/A #### Changed -* Upgraded `common` chart dependency to version 1.5.1 +N/A #### Fixed -N/A +* ytproxy ingress, GH issue 29 ## Support diff --git a/charts/apps/piped/templates/common.yaml b/charts/apps/piped/templates/common.yaml index 4c771e4..7c8f010 100644 --- a/charts/apps/piped/templates/common.yaml +++ b/charts/apps/piped/templates/common.yaml @@ -8,6 +8,19 @@ {{- end -}} {{- end -}} +{{- define "common.names.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + {{- define "app-template.hardcodedValues" -}} # Set the nameOverride based on the release name if no override has been set diff --git a/charts/apps/piped/values.yaml b/charts/apps/piped/values.yaml index 4e903c3..e31fdb2 100644 --- a/charts/apps/piped/values.yaml +++ b/charts/apps/piped/values.yaml @@ -5,9 +5,9 @@ global: # -- Set the entire name definition fullnameOverride: # -- Set additional global labels. Helm templates can be used. - labels: { } + labels: {} # -- Set additional global annotations. Helm templates can be used. - annotations: { } + annotations: {} controller: # -- enable the controller. @@ -40,7 +40,7 @@ frontend: # -- image pull policy pullPolicy: IfNotPresent - #env: + # env: # BACKEND_HOSTNAME: pipedapi.example.org command: "/bin/ash" @@ -48,7 +48,7 @@ frontend: - -c - "sed -i s/pipedapi.kavin.rocks/$BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g 'daemon off;'" - #resources: + # resources: # requests: # memory: 32Mi # limits: @@ -68,36 +68,36 @@ backend: port: 8080 protocol: HTTP -# command: "/bin/sh" -# args: -# - -c -# - sleep infinity + # command: "/bin/sh" + # args: + # - -c + # - sleep infinity # If the hostnames are not set for backend, proxy and API, they will be automatically fetched from their ingresses. config: PORT: 8080 HTTP_WORKERS: 2 - #PROXY_PART: https://PROXY_HOSTNAME + # PROXY_PART: https://PROXY_HOSTNAME # Outgoing HTTP Proxy - eg: 127.0.0.1:8118 - #HTTP_PROXY: 127.0.0.1:8118 + # HTTP_PROXY: 127.0.0.1:8118 # Captcha Parameters - #CAPTCHA_BASE_URL: https://api.capmonster.cloud/ - #CAPTCHA_API_KEY: INSERT_HERE - #API_URL: https://BACKEND_HOSTNAME - #FRONTEND_URL: https://FRONTEND_HOSTNAME + # CAPTCHA_BASE_URL: https://api.capmonster.cloud/ + # CAPTCHA_API_KEY: INSERT_HERE + # API_URL: https://BACKEND_HOSTNAME + # FRONTEND_URL: https://FRONTEND_HOSTNAME # Enable haveibeenpwned compromised password API - #COMPROMISED_PASSWORD_CHECK: true + # COMPROMISED_PASSWORD_CHECK: true # Disable Registration - #DISABLE_REGISTRATION: false + # DISABLE_REGISTRATION: false # Feed Retention Time in Days - #FEED_RETENTION: 30 - #database: - # connection_url: jdbc:postgresql://postgres:5432/piped - # driver_class: org.postgresql.Driver - # dialect: org.hibernate.dialect.PostgreSQLDialect - # username: piped - # password: changeme - # Please only provide the secret name (it should already exist), + # FEED_RETENTION: 30 + # database: + # connection_url: jdbc:postgresql://postgres:5432/piped + # driver_class: org.postgresql.Driver + # dialect: org.hibernate.dialect.PostgreSQLDialect + # username: piped + # password: changeme + # Please only provide the secret name (it should already exist), # it should only include database.username and database.password as others will be taken from above. # secret: secret-name @@ -111,7 +111,7 @@ backend: # -- image pull policy pullPolicy: IfNotPresent - #resources: + # resources: # requests: # memory: 500Mi # limits: @@ -143,7 +143,7 @@ ytproxy: # -- image pull policy pullPolicy: IfNotPresent - #resources: + # resources: # requests: # memory: 32Mi # limits: @@ -244,6 +244,3 @@ probes: termination: gracePeriodSeconds: - - -