Skip to content

Commit

Permalink
[Common] Update statefulset spec (#103)
Browse files Browse the repository at this point in the history
Update statefulset spec
  • Loading branch information
lazam authored Jun 28, 2022
1 parent 25cb3bb commit 79761b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: A generic helm chart for Kubernetes
type: application
version: 0.2.2
version: 0.3.0
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
26 changes: 12 additions & 14 deletions charts/common/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
namespace: {{ template "common.namespace" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- if .Values.stateful.podAnnotations }}
{{- with .Values.stateful.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -42,21 +42,19 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
{{- range $keys := .Values.service.ports }}
- name: {{ .name }}
containerPort: {{ .targetPort }}
protocol: {{ .protocol }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: /ping
port: http
initialDelaySeconds: 60
periodSeconds: 5
{{- toYaml . | trim | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: /ping
port: http
initialDelaySeconds: 60
periodSeconds: 5
{{- toYaml . | trim | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
5 changes: 5 additions & 0 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ readinessProbe: {}
# port: 80
# periodSeconds: 10

## Annotations to add to the pod of statefulset
##
stateful:
annotations: {}

## If enabled, creates a PVC and deploy the pod as statefulset
##
persistence:
Expand Down

0 comments on commit 79761b1

Please sign in to comment.