From 3959b1498efc21b987a69f15680b2011c9124697 Mon Sep 17 00:00:00 2001 From: Jeff Billimek Date: Sun, 31 Mar 2019 01:17:01 -0400 Subject: [PATCH] reverting sonarr to deployment --- sonarr/Chart.yaml | 4 +- sonarr/README.md | 3 +- sonarr/templates/config-pvc.yaml | 25 ++++++++++ .../{statefulset.yaml => deployment.yaml} | 46 +++++-------------- sonarr/values.yaml | 7 +-- 5 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 sonarr/templates/config-pvc.yaml rename sonarr/templates/{statefulset.yaml => deployment.yaml} (75%) diff --git a/sonarr/Chart.yaml b/sonarr/Chart.yaml index 2b9fda54..806a12e4 100644 --- a/sonarr/Chart.yaml +++ b/sonarr/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: amd64-2.0.0.5318-ls31 +appVersion: amd64-3.0.1.418-ls45 description: Sonarr is a television show downloading client name: sonarr -version: 1.1.2 +version: 2.0.2 keywords: - sonarr - usenet diff --git a/sonarr/README.md b/sonarr/README.md index d177587b..f5c22f8a 100644 --- a/sonarr/README.md +++ b/sonarr/README.md @@ -34,8 +34,9 @@ The following tables lists the configurable parameters of the Sentry chart and t | Parameter | Description | Default | |----------------------------|-------------------------------------|---------------------------------------------------------| | `image.repository` | Image repository | `linuxserver/sonarr` | -| `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/linuxserver/sonarr/tags/).| `162`| +| `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/linuxserver/sonarr/tags/).| `amd64-3.0.1.418-ls45`| | `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `timezone` | Timezone the sonarr instance should run as, e.g. 'America/New_York' | `UTC` | | `puid` | process userID the sonarr instance should run as | `1001` | | `pgid` | process groupID the sonarr instance should run as | `1001` | diff --git a/sonarr/templates/config-pvc.yaml b/sonarr/templates/config-pvc.yaml new file mode 100644 index 00000000..5dcf5775 --- /dev/null +++ b/sonarr/templates/config-pvc.yaml @@ -0,0 +1,25 @@ + +{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "sonarr.fullname" . }}-config + labels: + app.kubernetes.io/name: {{ include "sonarr.name" . }} + helm.sh/chart: {{ include "sonarr.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + accessModes: + - {{ .Values.persistence.config.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.config.size | quote }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} \ No newline at end of file diff --git a/sonarr/templates/statefulset.yaml b/sonarr/templates/deployment.yaml similarity index 75% rename from sonarr/templates/statefulset.yaml rename to sonarr/templates/deployment.yaml index c62643f3..eb4e1527 100644 --- a/sonarr/templates/statefulset.yaml +++ b/sonarr/templates/deployment.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: StatefulSet +kind: Deployment metadata: name: {{ include "sonarr.fullname" . }} labels: @@ -8,8 +8,9 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: - podManagementPolicy: "Parallel" - replicas: {{ .Values.replicaCount }} + replicas: 1 + strategy: + type: {{ .Values.strategyType }} selector: matchLabels: app.kubernetes.io/name: {{ include "sonarr.name" . }} @@ -64,6 +65,13 @@ spec: resources: {{ toYaml .Values.resources | indent 12 }} volumes: + - name: config + {{- if .Values.persistence.config.enabled }} + persistentVolumeClaim: + claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "sonarr.fullname" . }}-config{{- end }} + {{- else }} + emptyDir: {} + {{- end }} - name: downloads {{- if .Values.persistence.downloads.enabled }} persistentVolumeClaim: @@ -83,38 +91,6 @@ spec: persistentVolumeClaim: claimName: {{ .existingClaim }} {{- end }} -{{- if and .Values.persistence.config.enabled .Values.persistence.config.existingClaim }} - - name: config - {{- if .Values.persistence.config.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.config.existingClaim }} - {{- else }} - emptyDir: {} - {{- end }} -{{- else if not .Values.persistence.config.enabled }} - - name: config - emptyDir: {} -{{- else if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: config - labels: - app.kubernetes.io/name: {{ include "sonarr.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - accessModes: - - {{ .Values.persistence.config.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.config.size | quote }} - {{- if .Values.persistence.config.storageClass }} - {{- if (eq "-" .Values.persistence.config.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.persistence.config.storageClass }}" - {{- end }} - {{- end }} -{{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/sonarr/values.yaml b/sonarr/values.yaml index 8c0162dd..54b087cf 100644 --- a/sonarr/values.yaml +++ b/sonarr/values.yaml @@ -2,13 +2,14 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: 1 - image: repository: linuxserver/sonarr - tag: amd64-2.0.0.5318-ls31 + tag: amd64-3.0.1.418-ls45 pullPolicy: IfNotPresent +# upgrade strategy type (e.g. Recreate or RollingUpdate) +strategyType: Recreate + nameOverride: "" fullnameOverride: ""