[Blockchain Watcher] (CONFIG) Add RollingUpdate strategy in pods deploy (#1629)

* Add rollingupdate strategy in pods deploy

* Remove comments

---------

Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Air.local>
This commit is contained in:
Julian 2024-08-23 10:37:42 -03:00 committed by GitHub
parent f613f4faa3
commit 888aa3a135
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 132 additions and 22 deletions

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-backfiller-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-backfiller
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-backfiller-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-backfiller
data:
testnet-jobs.json: |-
[
@ -46,11 +50,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-backfiller
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-backfiller
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-backfiller
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -61,6 +72,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -80,14 +92,13 @@ spec:
value: {{ .NODE_OPTIONS }}
- name: JOBS_DIR
value: /home/node/app/jobs
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}
memory: {{ .RESOURCES_LIMITS_MEMORY }}
requests:
cpu: {{ .RESOURCES_REQUESTS_CPU }}
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}
memory: {{ .RESOURCES_LIMITS_MEMORY }}
volumeMounts:
- name: metadata-volume
mountPath: /home/node/app/metadata-repo
@ -105,4 +116,4 @@ spec:
name: {{ .NAME }}-backfiller-jobs
items:
- key: {{ .BLOCKCHAIN_ENV }}-jobs.json
path: jobs.json
path: jobs.json

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-circle-message-sent-events-1-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-circle-message-sent-events-1
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-circle-message-sent-events-1-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-circle-message-sent-events-1
data:
testnet-jobs.json: |-
[
@ -467,11 +471,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-circle-message-sent-events-1
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-circle-message-sent-events-1
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-circle-message-sent-events-1
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -482,6 +493,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -553,7 +565,6 @@ spec:
- name: ARBITRUM_RPCS
value: '{{ .ARBITRUM_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-solana-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-source-events-1
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-solana-source-events-1-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-source-events-1
data:
testnet-jobs.json: |-
[
@ -101,11 +105,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-solana-source-events-1
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-source-events-1
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-solana-source-events-1
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -116,6 +127,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -140,7 +152,6 @@ spec:
key: solana-urls
- name: JOBS_DIR
value: /home/node/app/jobs
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .SOLANA_RESOURCES_LIMITS_CPU }}

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-solana-target-events-1-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-target-events-1
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-solana-target-events-1-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-target-events-1
data:
testnet-jobs.json: |-
[
@ -186,11 +190,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-solana-target-events-1
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-solana-target-events-1
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-solana-target-events-1
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -201,6 +212,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -225,7 +237,6 @@ spec:
key: solana-urls
- name: JOBS_DIR
value: /home/node/app/jobs
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .SOLANA_RESOURCES_LIMITS_CPU }}

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-source-events-1-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-1
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-source-events-1-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-1
data:
testnet-jobs.json: |-
[
@ -592,11 +596,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-source-events-1
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-1
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-source-events-1
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -607,6 +618,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -664,7 +676,6 @@ spec:
- name: ETHEREUM_HOLESKY_RPCS
value: '{{ .ETHEREUM_HOLESKY_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-eth-1-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-2
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-source-events-2-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-2
data:
testnet-jobs.json: |-
[
@ -751,11 +755,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-source-events-2
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-2
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-source-events-2
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -766,6 +777,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -847,7 +859,6 @@ spec:
- name: OASIS_RPCS
value: '{{ .OASIS_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -1,4 +1,4 @@
---
---
apiVersion: v1
kind: Service
metadata:
@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-source-events-3-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-3
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-source-events-3-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-3
data:
testnet-jobs.json: |-
[
@ -444,11 +448,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-source-events-3
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-source-events-3
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-source-events-3
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -459,6 +470,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -492,7 +504,6 @@ spec:
- name: SNAXCHAIN_RPCS
value: '{{ .SNAXCHAIN_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-eth-2-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-1
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-target-events-1-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-1
data:
testnet-jobs.json: |-
[
@ -983,11 +987,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-target-events-1
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-1
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-target-events-1
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -998,6 +1009,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -1075,7 +1087,6 @@ spec:
- name: XLAYER_RPCS
value: '{{ .XLAYER_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-target-events-2-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-2
spec:
accessModes:
- ReadWriteOnce
@ -33,6 +35,8 @@ kind: ConfigMap
metadata:
name: {{ .NAME }}-target-events-2-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-2
data:
testnet-jobs.json: |-
[
@ -707,11 +711,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-target-events-2
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-2
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-target-events-2
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -722,6 +733,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -795,7 +807,6 @@ spec:
- name: SNAXCHAIN_RPCS
value: '{{ .SNAXCHAIN_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}

View File

@ -20,6 +20,8 @@ kind: PersistentVolumeClaim
metadata:
name: blockchain-watcher-target-events-3-pvc
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-3
spec:
accessModes:
- ReadWriteOnce
@ -27,12 +29,14 @@ spec:
requests:
storage: 10Mi
storageClassName: gp2
---
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .NAME }}-target-events-3-jobs
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-3
data:
testnet-jobs.json: |-
[
@ -641,11 +645,18 @@ kind: Deployment
metadata:
name: {{ .NAME }}-target-events-3
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}-target-events-3
spec:
replicas: 1
selector:
matchLabels:
app: {{ .NAME }}-target-events-3
strategy: # Rolling update strategy for restarting the pods
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
@ -656,6 +667,7 @@ spec:
spec:
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }} # Docker image
env:
- name: NODE_ENV
value: {{ .NODE_ENV }}
@ -709,7 +721,6 @@ spec:
- name: TERRA2_RPCS
value: '{{ .TERRA2_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:
cpu: {{ .RESOURCES_LIMITS_CPU }}