Skip to content

Commit

Permalink
Merge pull request #283 from MinaFoundation/PM-2004-enable-lifecyle-o…
Browse files Browse the repository at this point in the history
…n-deployments

PM 2004 enable lifecyle on deployments
  • Loading branch information
kaozenn authored Sep 25, 2024
2 parents 547467f + 19063d9 commit 5056e80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions mina-payouts-data-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ helmfile status
| ingress.enabled | bool | `false` | Whether to create an Ingress |
| ingress.hosts | list | `[]` | The Ingress Hosts |
| ingress.tls | list | `[]` | The TLS configuration |
| lifecycle | object | `{"preStop":{"exec":{"command":["sh","-c","sleep 15 && kill -SIGQUIT 1"]}}}` | Lifecycle hooks |
| livenessProbe | object | `{"httpGet":{"path":"/health","port":"http"}}` | The Liveness Probe |
| minaPayoutsDataProvider.archiveDBRecencyThreshold | int | `10` | The Archive DB Recency Threshold |
| minaPayoutsDataProvider.blockDBQuery.host | string | `"http://localhost"` | The Host of the Archive DB |
Expand Down
4 changes: 4 additions & 0 deletions mina-payouts-data-provider/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: NUM_SLOTS_IN_EPOCH
value: {{ .Values.minaPayoutsDataProvider.numSlotsInEpoch | quote }}
Expand Down
9 changes: 9 additions & 0 deletions mina-payouts-data-provider/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ tolerations: []
# -- Affinity rules
affinity: {}

# -- Lifecycle hooks
lifecycle:
preStop:
exec:
command:
- sh
- -c
- sleep 15 && kill -SIGQUIT 1

postgresql:
# -- Whether to use the PostgreSQL chart
create: false
Expand Down

0 comments on commit 5056e80

Please sign in to comment.