Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat: add deploymentStrategy option (#71)
Browse files Browse the repository at this point in the history
* Add deploymentStrategy option

* feat: add deploymentStrategy option

* fix: make it more flexible

* fix: fix readme
  • Loading branch information
ggggut authored Mar 18, 2022
1 parent 1a9d359 commit 87450b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
3 changes: 2 additions & 1 deletion charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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. |
Expand Down
4 changes: 4 additions & 0 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ image:

restartPolicy: Always

deploymentStrategy: {}

initContainers: []

imagePullSecrets: []
Expand Down

0 comments on commit 87450b6

Please sign in to comment.