From 5f60e7fc49ead98094cf13a7a8cd7e5a338e06f8 Mon Sep 17 00:00:00 2001 From: Mae Dartmann Date: Tue, 25 Jun 2024 15:34:46 +0200 Subject: [PATCH] [chart] allow specifying DeploymentStrategy --- chart/Chart.yaml | 2 +- chart/README.md | 1 + chart/templates/deployment.yaml | 8 +++++++- chart/values.yaml | 11 +++++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 31ae13bb5..29b6d9c1c 100644 --- a/chart/Chart.yaml +++ b/chart/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.1.3 +version: 0.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/chart/README.md b/chart/README.md index 855141c13..f41df6a37 100644 --- a/chart/README.md +++ b/chart/README.md @@ -52,6 +52,7 @@ A fun, new, open way to experience social media https://iceshrimp.dev | iceshrimp.smtp.port | int | `587` | | | iceshrimp.smtp.server | string | `"smtp.mailgun.org"` | | | iceshrimp.smtp.useImplicitSslTls | bool | `false` | | +| iceshrimp.strategy | object | `{}` | Override DeploymentStrategy for Iceshrimp | | elasticsearch | object | `{"auth":{},"enabled":false,"hostname":"","port":9200,"ssl":false}` | https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | | diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 9485ae7c3..114f13daf 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -5,9 +5,15 @@ metadata: labels: {{- include "iceshrimp.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} + {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} + + {{- if .Values.iceshrimp.deploymentStrategy }} + strategy: + {{- toYaml .Values.iceshrimp.deploymentStrategy | nindent 4 }} + {{- end }} + selector: matchLabels: {{- include "iceshrimp.selectorLabels" . | nindent 6 }} diff --git a/chart/values.yaml b/chart/values.yaml index 5fef382e2..1046931e1 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -42,7 +42,7 @@ iceshrimp: prefix: files endpoint: "" # e.g. "nyc3.digitaloceanspaces.com:443" region: "" # e.g. "nyc3" - + localStorage: enabled: true claimName: null @@ -53,7 +53,14 @@ iceshrimp: annotations: helm.sh/resource-policy: keep size: 10Gi - + + # Deployment strategy (optional), see https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + # deploymentStrategy: + # type: RollingUpdate + # rollingUpdate: + # maxUnavailable: 0 + # maxSurge: 1 + # -- If you want to allow iceshrimp to connect to private ips, enter the cidrs here. allowedPrivateNetworks: [] # - "10.0.0.0/8"