Skip to content

Commit

Permalink
make pyrometer a statefulset instead of deployment
Browse files Browse the repository at this point in the history
to prevent conflicts when updating daily
  • Loading branch information
nicolasochem committed Dec 5, 2023
1 parent b463e43 commit c1fb087
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 26 deletions.
35 changes: 21 additions & 14 deletions charts/pyrometer/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: pyrometer
namespace: {{ .Release.Namespace }}
spec:
serviceName: pyrometer
selector:
matchLabels:
app: pyrometer
Expand All @@ -30,9 +31,9 @@ spec:
- -d
- '/data'
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /config/
Expand All @@ -41,20 +42,26 @@ spec:
- name: prom-exporter
image: {{ .Values.tezos_k8s_images.utils }}
ports:
- name: metrics
containerPort: 31732
protocol: TCP
- name: metrics
containerPort: 31732
protocol: TCP
command:
- /usr/local/bin/python
- /usr/local/bin/python
args:
- "-c"
- |
- "-c"
- |
{{ tpl ($.Files.Get (print "scripts/pyrometer_exporter.py")) $ | indent 12 }}
volumes:
- name: config-volume
configMap:
name: pyrometer-config
- name: pyrometer-volume
# Stores pyrometer's state (like pending queue items)
persistentVolumeClaim:
claimName: pyrometer-volume
volumeClaimTemplates:
- metadata:
name: pyrometer-volume
spec:
storageClassName:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
12 changes: 0 additions & 12 deletions charts/pyrometer/templates/volume.yaml

This file was deleted.

0 comments on commit c1fb087

Please sign in to comment.