changes to rtorrent-flood to revert to Deployment

This commit is contained in:
Jeff Billimek 2019-03-31 20:44:22 -04:00
parent 3959b1498e
commit 481493247c
4 changed files with 45 additions and 42 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 0.9.7-0.13.7 appVersion: 0.9.7-0.13.7
description: flood-rtorrent description: flood-rtorrent
name: rtorrent-flood name: rtorrent-flood
version: 1.1.1 version: 2.0.7
keywords: keywords:
- rtorrent - rtorrent
- flood - flood

View File

@ -0,0 +1,24 @@
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "rtorrent-flood.fullname" . }}-config
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
helm.sh/chart: {{ include "rtorrent-flood.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 -}}

View File

@ -1,5 +1,5 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: Deployment
metadata: metadata:
name: {{ template "rtorrent-flood.fullname" . }} name: {{ template "rtorrent-flood.fullname" . }}
labels: labels:
@ -8,8 +8,9 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
podManagementPolicy: "Parallel" replicas: 1
replicas: {{ .Values.replicaCount }} strategy:
type: {{ .Values.strategyType }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }} app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
@ -34,13 +35,15 @@ spec:
livenessProbe: livenessProbe:
httpGet: httpGet:
port: http port: http
scheme: HTTP initialDelaySeconds: 30
initialDelaySeconds: 30 failureThreshold: 5
timeoutSeconds: 10
readinessProbe: readinessProbe:
httpGet: httpGet:
port: http port: http
scheme: HTTP initialDelaySeconds: 30
initialDelaySeconds: 15 failureThreshold: 5
timeoutSeconds: 10
tty: true tty: true
env: env:
- name: TZ - name: TZ
@ -62,6 +65,13 @@ spec:
resources: resources:
{{ toYaml .Values.resources | indent 12 }} {{ toYaml .Values.resources | indent 12 }}
volumes: volumes:
- name: flood-db
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "rtorrent-flood.fullname" . }}-config{{- end }}
{{- else }}
emptyDir: {}
{{ end }}
- name: data - name: data
{{- if .Values.persistence.data.enabled }} {{- if .Values.persistence.data.enabled }}
persistentVolumeClaim: persistentVolumeClaim:
@ -69,38 +79,6 @@ spec:
{{- else }} {{- else }}
emptyDir: {} emptyDir: {}
{{ end }} {{ end }}
{{- if and .Values.persistence.config.enabled .Values.persistence.config.existingClaim }}
- name: flood-db
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.config.existingClaim }}
{{- else }}
emptyDir: {}
{{- end }}
{{- else if not .Values.persistence.config.enabled }}
- name: flood-db
emptyDir: {}
{{- else if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: flood-db
labels:
app.kubernetes.io/name: {{ include "rtorrent-flood.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 }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}

View File

@ -2,13 +2,14 @@
# This is a YAML-formatted file. # This is a YAML-formatted file.
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
replicaCount: 1
image: image:
repository: wonderfall/rtorrent-flood repository: wonderfall/rtorrent-flood
tag: 0.9.7-0.13.7 tag: 0.9.7-0.13.7
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# upgrade strategy type (e.g. Recreate or RollingUpdate)
strategyType: Recreate
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""