Skip to content

Commit

Permalink
Ledger: Add pvc for data
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed May 9, 2020
1 parent a191f2c commit 89cccd9
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 101 deletions.
4 changes: 2 additions & 2 deletions charts/ledger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ledger
description: A ledger for your CD pipeline
version: 0.1.3
appVersion: 0.1.3
version: 0.1.4
appVersion: 0.1.4
sources:
- https://github.com/stenic/helm-charts/tree/master/charts/ledger
71 changes: 0 additions & 71 deletions charts/ledger/templates/deployment.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions charts/ledger/templates/persistentvolumeclaim.tpl

This file was deleted.

50 changes: 50 additions & 0 deletions charts/ledger/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "ledger.fullname" . }}
labels:
{{- include "ledger.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "ledger.selectorLabels" . | nindent 6 }}
serviceName: {{ include "ledger.fullname" . }}
replicas: 1
template:
metadata:
labels:
{{- include "ledger.selectorLabels" . | nindent 8 }}
spec:
initContainers:
- name: {{ .Chart.Name }}-init
image: alpine:3.6
command:
- chmod
- -R
- "777"
- /data
volumeMounts:
- name: "{{ template "ledger.fullname" . }}-data"
mountPath: /data
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
env:
- name: LEDGER_PORT
value: "8080"
ports:
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: {{ include "ledger.fullname" . }}-data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: {{ include "ledger.fullname" . }}-data
spec:
accessModes: [ "ReadWriteOnce" ]
# storageClassName: "my-storage-class"
resources:
requests:
storage: 1Gi
5 changes: 5 additions & 0 deletions charts/ledger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ podSecurityContext: {}

securityContext: {}

statefulset:
volume:
name: ledger
path: /data

service:
type: ClusterIP
port: 80
Expand Down

0 comments on commit 89cccd9

Please sign in to comment.