From 87450b638df3fe4bf7dcf77bef08f8459d73bee1 Mon Sep 17 00:00:00 2001 From: Martin Reinhardt <81361151+ggggut@users.noreply.github.com> Date: Fri, 18 Mar 2022 10:12:22 +0100 Subject: [PATCH] feat: add deploymentStrategy option (#71) * Add deploymentStrategy option * feat: add deploymentStrategy option * fix: make it more flexible * fix: fix readme --- charts/generic/Chart.yaml | 2 +- charts/generic/README.md | 3 ++- charts/generic/templates/deployment.yaml | 4 ++++ charts/generic/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/generic/Chart.yaml b/charts/generic/Chart.yaml index ada09254..259898e1 100644 --- a/charts/generic/Chart.yaml +++ b/charts/generic/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: generic description: A chart for generic applications. Use this if you need to deploy something without wanting to build a fully fledged new helm chart. type: application -version: 3.0.4 +version: 3.1.0 maintainers: - name: morremeyer email: charts@mor.re diff --git a/charts/generic/README.md b/charts/generic/README.md index f514a337..17e1b5b2 100644 --- a/charts/generic/README.md +++ b/charts/generic/README.md @@ -1,6 +1,6 @@ # generic -![Version: 3.0.4](https://img.shields.io/badge/Version-3.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A chart for generic applications. Use this if you need to deploy something without wanting to build a fully fledged new helm chart. @@ -80,6 +80,7 @@ If you have environment variables set from ConfigMaps or Secrets, check out `env | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | command | string | `nil` | | +| deploymentStrategy | object | `{}` | | | env | list | `[]` | Directly set environment variables | | envValueFrom | object | `{}` | Set environment variables from configMaps or Secrets | | failedJobsHistoryLimit | string | `nil` | The number of failed finished jobs to retain. | diff --git a/charts/generic/templates/deployment.yaml b/charts/generic/templates/deployment.yaml index 10d84dff..8c19370e 100644 --- a/charts/generic/templates/deployment.yaml +++ b/charts/generic/templates/deployment.yaml @@ -16,6 +16,10 @@ spec: {{- end }} selector: matchLabels: {{- include "generic.selectorLabels" . | nindent 6 }} + {{- with .Values.deploymentStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} template: metadata: {{- with .Values.podAnnotations }} diff --git a/charts/generic/values.yaml b/charts/generic/values.yaml index f10e34ba..99d5458d 100644 --- a/charts/generic/values.yaml +++ b/charts/generic/values.yaml @@ -14,6 +14,8 @@ image: restartPolicy: Always +deploymentStrategy: {} + initContainers: [] imagePullSecrets: []