From 03c86e5b06414dfdbf6ad846d60c418752339b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Wed, 3 May 2023 20:41:50 +0000 Subject: [PATCH] ytproxy bug and resources (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ytproxy bug and resources fixed missing .ytproxy in pod template and fixed resources * Update Chart.yaml * Changelog and readme --------- Co-authored-by: Skyler Mäntysaari --- charts/apps/piped/Chart.yaml | 9 +++++++-- charts/apps/piped/README.md | 9 +++++---- .../piped/templates/backend/lib/_container.tpl | 4 ++++ charts/apps/piped/templates/backend/lib/_pod.tpl | 4 ---- .../piped/templates/frontend/lib/_container.tpl | 4 ++++ .../apps/piped/templates/frontend/lib/_pod.tpl | 4 ---- .../piped/templates/ytproxy/lib/_container.tpl | 4 ++++ charts/apps/piped/templates/ytproxy/lib/_pod.tpl | 16 ++++++---------- 8 files changed, 30 insertions(+), 24 deletions(-) diff --git a/charts/apps/piped/Chart.yaml b/charts/apps/piped/Chart.yaml index 5a3a538..27ed1a2 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.3.0 +version: 2.4.0 appVersion: latest kubeVersion: ">=1.22.0-0" maintainers: @@ -26,5 +26,10 @@ dependencies: condition: postgresql.enabled annotations: artifacthub.io/changes: |- + - kind: fixed + description: Missing .ytproxy in pod template + - kind: fixed + description: resource definitions in templates - kind: changed - description: Upgraded `postgresql` chart dependency to version 12.4.2 + description: Added resources limits to container definitions + diff --git a/charts/apps/piped/README.md b/charts/apps/piped/README.md index 2dadbbe..20df45e 100644 --- a/charts/apps/piped/README.md +++ b/charts/apps/piped/README.md @@ -1,6 +1,6 @@ # piped -![Version: 2.3.0](https://img.shields.io/badge/Version-2.3.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 2.4.0](https://img.shields.io/badge/Version-2.4.0-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.3.0 +### Version 2.4.0 #### Added @@ -168,11 +168,12 @@ N/A #### Changed -* Upgraded `postgresql` chart dependency to version 12.4.2 +* Added resources limits to container definitions #### Fixed -N/A +* Missing .ytproxy in pod template +* resource definitions in templates ## Support diff --git a/charts/apps/piped/templates/backend/lib/_container.tpl b/charts/apps/piped/templates/backend/lib/_container.tpl index 1c3317e..318942d 100644 --- a/charts/apps/piped/templates/backend/lib/_container.tpl +++ b/charts/apps/piped/templates/backend/lib/_container.tpl @@ -3,6 +3,10 @@ - name: {{ include "backend.names.fullname" . }} image: {{ printf "%s:%s" .Values.backend.image.repository (default .Chart.AppVersion .Values.backend.image.tag) | quote }} imagePullPolicy: {{ .Values.backend.image.pullPolicy }} + {{- with .Values.backend.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.backend.command }} command: {{- if kindIs "string" . }} diff --git a/charts/apps/piped/templates/backend/lib/_pod.tpl b/charts/apps/piped/templates/backend/lib/_pod.tpl index 156f022..b9b2601 100644 --- a/charts/apps/piped/templates/backend/lib/_pod.tpl +++ b/charts/apps/piped/templates/backend/lib/_pod.tpl @@ -102,8 +102,4 @@ topologySpreadConstraints: tolerations: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.backend.resources }} -resources: - {{- toYaml . | nindent 2 }} - {{- end }} {{- end -}} diff --git a/charts/apps/piped/templates/frontend/lib/_container.tpl b/charts/apps/piped/templates/frontend/lib/_container.tpl index 0995de6..ddb3c32 100644 --- a/charts/apps/piped/templates/frontend/lib/_container.tpl +++ b/charts/apps/piped/templates/frontend/lib/_container.tpl @@ -3,6 +3,10 @@ - name: {{ include "frontend.names.fullname" . }} image: {{ printf "%s:%s" .Values.frontend.image.repository (default .Chart.AppVersion .Values.frontend.image.tag) | quote }} imagePullPolicy: {{ .Values.frontend.image.pullPolicy }} + {{- with .Values.frontend.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.frontend.command }} command: {{- if kindIs "string" . }} diff --git a/charts/apps/piped/templates/frontend/lib/_pod.tpl b/charts/apps/piped/templates/frontend/lib/_pod.tpl index 4f125b1..9a2e30d 100644 --- a/charts/apps/piped/templates/frontend/lib/_pod.tpl +++ b/charts/apps/piped/templates/frontend/lib/_pod.tpl @@ -98,8 +98,4 @@ topologySpreadConstraints: tolerations: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.frontend.resources }} -resources: - {{- toYaml . | nindent 2 }} - {{- end }} {{- end -}} diff --git a/charts/apps/piped/templates/ytproxy/lib/_container.tpl b/charts/apps/piped/templates/ytproxy/lib/_container.tpl index 7ad863c..1c8b866 100644 --- a/charts/apps/piped/templates/ytproxy/lib/_container.tpl +++ b/charts/apps/piped/templates/ytproxy/lib/_container.tpl @@ -3,6 +3,10 @@ - name: {{ include "ytproxy.names.fullname" . }} image: {{ printf "%s:%s" .Values.ytproxy.image.repository (default .Chart.AppVersion .Values.ytproxy.image.tag) | quote }} imagePullPolicy: {{ .Values.ytproxy.image.pullPolicy }} + {{- with .Values.ytproxy.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.ytproxy.command }} command: {{- if kindIs "string" . }} diff --git a/charts/apps/piped/templates/ytproxy/lib/_pod.tpl b/charts/apps/piped/templates/ytproxy/lib/_pod.tpl index ba357d8..155e6f1 100644 --- a/charts/apps/piped/templates/ytproxy/lib/_pod.tpl +++ b/charts/apps/piped/templates/ytproxy/lib/_pod.tpl @@ -82,28 +82,24 @@ containers: volumes: {{- nindent 2 . }} {{- end }} - {{- with .Values.hostAliases }} + {{- with .Values.ytproxy.hostAliases }} hostAliases: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.ytproxy.nodeSelector }} nodeSelector: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.ytproxy.affinity }} affinity: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.topologySpreadConstraints }} + {{- with .Values.ytproxy.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 2 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.ytproxy.tolerations }} tolerations: {{- toYaml . | nindent 2 }} - {{- end -}} - {{- with .Values.resources }} -resources: - {{- toYaml . | nindent 2 }} - {{- end }} + {{- end -}} {{- end -}}