From 428752e79a2a3688325e767e07c147c8bfa8f55b Mon Sep 17 00:00:00 2001 From: holysoles Date: Fri, 17 Jan 2025 11:21:10 -0600 Subject: [PATCH 1/7] fix(chart): mail secret fixes --- charts/pixelfed/templates/secret_mail.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/pixelfed/templates/secret_mail.yaml b/charts/pixelfed/templates/secret_mail.yaml index 7bd73cc..95253fc 100644 --- a/charts/pixelfed/templates/secret_mail.yaml +++ b/charts/pixelfed/templates/secret_mail.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.externalDatabase.existingSecret }} +{{- if not .Values.pixelfed.mail.existingSecret }} --- apiVersion: v1 kind: Secret @@ -7,6 +7,10 @@ metadata: data: host: {{ .Values.pixelfed.mail.host }} port: {{ .Values.pixelfed.mail.port }} + {{- if .Values.pixelfed.mail.username }} username: {{ .Values.pixelfed.mail.username }} + {{- end }} + {{- if .Values.pixelfed.mail.password }} password: {{ .Values.pixelfed.mail.password }} + {{- end }} {{- end }} From f3ceca08288fb94d400c19c2c637e90ebae72661 Mon Sep 17 00:00:00 2001 From: holysoles Date: Fri, 17 Jan 2025 17:34:58 -0600 Subject: [PATCH 2/7] fix(chart): add parameter for service.targetPort, sets APP_PORT var for nginx --- charts/pixelfed/README.md | 1 + charts/pixelfed/templates/configmap.yaml | 1 + charts/pixelfed/templates/deployment.yaml | 4 +++- charts/pixelfed/templates/service.yaml | 2 +- charts/pixelfed/values.yaml | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 2e1bb3c..5963649 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -162,6 +162,7 @@ A Helm chart for deploying Pixelfed on Kubernetes | resources | object | `{}` | | | securityContext | object | `{}` | | | service.port | int | `80` | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports | +| service.targetPort | int | `80` | Port to attach to on the pods. Also sets what port nginx listens on inside the container. | | service.type | string | `"ClusterIP"` | This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? | diff --git a/charts/pixelfed/templates/configmap.yaml b/charts/pixelfed/templates/configmap.yaml index 43f1948..4a9da0a 100644 --- a/charts/pixelfed/templates/configmap.yaml +++ b/charts/pixelfed/templates/configmap.yaml @@ -8,6 +8,7 @@ data: # app config vars APP_NAME={{ .Values.pixelfed.app.name }} APP_ENV={{ .Values.pixelfed.app.env }} + APP_PORT={{ .Values.service.targetPort }} APP_URL={{ .Values.pixelfed.app.url }} APP_LOCALE={{ .Values.pixelfed.app.locale }} {{- with .Values.pixelfed.app.domain }} diff --git a/charts/pixelfed/templates/deployment.yaml b/charts/pixelfed/templates/deployment.yaml index 84c6105..b55c1aa 100644 --- a/charts/pixelfed/templates/deployment.yaml +++ b/charts/pixelfed/templates/deployment.yaml @@ -38,7 +38,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: {{ .Values.service.targetPort }} protocol: TCP env: # app data @@ -46,6 +46,8 @@ spec: value: {{ .Values.pixelfed.app.name }} - name: APP_ENV value: {{ .Values.pixelfed.app.env }} + - name: APP_PORT + value: {{ .Values.service.targetPort | quote}} - name: APP_URL value: {{ .Values.pixelfed.app.url }} - name: APP_LOCALE diff --git a/charts/pixelfed/templates/service.yaml b/charts/pixelfed/templates/service.yaml index 9b85ad5..d5a4d0f 100644 --- a/charts/pixelfed/templates/service.yaml +++ b/charts/pixelfed/templates/service.yaml @@ -8,7 +8,7 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} - targetPort: http + targetPort: {{ .Values.service.targetPort }} protocol: TCP name: http selector: diff --git a/charts/pixelfed/values.yaml b/charts/pixelfed/values.yaml index 202b1a6..2c09a6e 100644 --- a/charts/pixelfed/values.yaml +++ b/charts/pixelfed/values.yaml @@ -56,6 +56,8 @@ service: type: ClusterIP # -- This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports port: 80 + # -- Port to attach to on the pods. Also sets what port nginx listens on inside the container. + targetPort: 80 # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ ingress: From caf96d016ddc4f75213620260fea0dfea27e4c9e Mon Sep 17 00:00:00 2001 From: holysoles Date: Fri, 17 Jan 2025 18:03:27 -0600 Subject: [PATCH 3/7] feat(chart): use official health check endpoints for probes --- charts/pixelfed/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pixelfed/values.yaml b/charts/pixelfed/values.yaml index 202b1a6..578b89b 100644 --- a/charts/pixelfed/values.yaml +++ b/charts/pixelfed/values.yaml @@ -87,12 +87,12 @@ resources: {} # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ livenessProbe: httpGet: - path: / + path: /api/service/health-check port: http readinessProbe: httpGet: - path: / + path: /api/service/health-check port: http # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ From 91f6a891c15a032628a07737d860f89fb3f76e84 Mon Sep 17 00:00:00 2001 From: Jesse Hitch Date: Sat, 18 Jan 2025 09:58:02 +0100 Subject: [PATCH 4/7] Update Chart.yaml - bump version --- charts/pixelfed/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pixelfed/Chart.yaml b/charts/pixelfed/Chart.yaml index 6f792ac..38ff7f7 100644 --- a/charts/pixelfed/Chart.yaml +++ b/charts/pixelfed/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.2.2 # This is the version number of the application being deployed. # renovate:image=ghcr.io/mattlqx/docker-pixelfed From ab934019f622a77683c10e3fb8ec6c595d46d211 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sat, 18 Jan 2025 10:01:44 +0100 Subject: [PATCH 5/7] update helm docs --- charts/pixelfed/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 2e1bb3c..1ccbfc5 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -1,6 +1,6 @@ # pixelfed -![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) +![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) A Helm chart for deploying Pixelfed on Kubernetes @@ -190,4 +190,4 @@ A Helm chart for deploying Pixelfed on Kubernetes | volumes | list | `[]` | Additional volumes on the output Deployment definition. | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) From 2a091690329868244fc7d9be069b21219bf10f4e Mon Sep 17 00:00:00 2001 From: jessebot Date: Sat, 18 Jan 2025 10:05:51 +0100 Subject: [PATCH 6/7] bump chart version, fix docs --- charts/pixelfed/Chart.yaml | 2 +- charts/pixelfed/README.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/pixelfed/Chart.yaml b/charts/pixelfed/Chart.yaml index 6f792ac..0d96b44 100644 --- a/charts/pixelfed/Chart.yaml +++ b/charts/pixelfed/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.2.3 # This is the version number of the application being deployed. # renovate:image=ghcr.io/mattlqx/docker-pixelfed diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 2e1bb3c..3acb5ef 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -1,6 +1,6 @@ # pixelfed -![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) +![Version: 0.2.3](https://img.shields.io/badge/Version-0.2.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) A Helm chart for deploying Pixelfed on Kubernetes @@ -61,7 +61,7 @@ A Helm chart for deploying Pixelfed on Kubernetes | ingress.hosts[0].paths[0].path | string | `"/"` | | | ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | ingress.tls | list | `[]` | | -| livenessProbe.httpGet.path | string | `"/"` | | +| livenessProbe.httpGet.path | string | `"/api/service/health-check"` | | | livenessProbe.httpGet.port | string | `"http"` | | | nameOverride | string | `""` | This is to override the chart name. | | nodeSelector | object | `{}` | | @@ -156,7 +156,7 @@ A Helm chart for deploying Pixelfed on Kubernetes | podSecurityContext | object | `{}` | | | postgresql.enabled | bool | `true` | enable the bundled postgresql sub chart from Bitnami. Must set to true if externalDatabase.enabled=false | | postgresql.fullnameOverride | string | `"postgresql"` | | -| readinessProbe.httpGet.path | string | `"/"` | | +| readinessProbe.httpGet.path | string | `"/api/service/health-check"` | | | readinessProbe.httpGet.port | string | `"http"` | | | replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ | | resources | object | `{}` | | @@ -190,4 +190,4 @@ A Helm chart for deploying Pixelfed on Kubernetes | volumes | list | `[]` | Additional volumes on the output Deployment definition. | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) From ace2fb84c2fb04cc51c9d33be1605b2957fd08b0 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sat, 18 Jan 2025 10:15:24 +0100 Subject: [PATCH 7/7] update the docs and bump version --- charts/pixelfed/Chart.yaml | 2 +- charts/pixelfed/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/pixelfed/Chart.yaml b/charts/pixelfed/Chart.yaml index 6f792ac..829772a 100644 --- a/charts/pixelfed/Chart.yaml +++ b/charts/pixelfed/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.1 +version: 0.3.0 # This is the version number of the application being deployed. # renovate:image=ghcr.io/mattlqx/docker-pixelfed diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 5963649..9c5235b 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -1,6 +1,6 @@ # pixelfed -![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) +![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) A Helm chart for deploying Pixelfed on Kubernetes @@ -191,4 +191,4 @@ A Helm chart for deploying Pixelfed on Kubernetes | volumes | list | `[]` | Additional volumes on the output Deployment definition. | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)