Files

deploy-sentry.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: polygon-sentry-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: Polygon-Sentry
  template:
    metadata:
      labels:
        app: Polygon-Sentry
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: environment
                operator: In
                values:
                - sentry
      tolerations:
      - key: "node-role.kubernetes.io/control-plane"
        operator: "Exists"
        effect: "NoSchedule"
      containers:
        - name: heimdall
          image: 0xpolygon/heimdall:1.0.4-beta
          command:
            - heimdalld
            - start
          args:
            - --chain=mumbai
            - --rest-server
            - --home=/var/lib/heimdall
          ports:
            - containerPort: 26656
          volumeMounts:
            - name: heimdall-config-volume
              mountPath: /var/lib/heimdall
        - name: bor
          image: 0xpolygon/bor:1.2.6-beta
          command:
            - bor
            - server
            - --config=/var/lib/bor/config.toml
          ports:
            - containerPort: 30303
          volumeMounts:
            - name: bor-config-volume
              mountPath: /var/lib/bor
        - name: rabbitmq
          image: rabbitmq:3.8
          ports:
            - containerPort: 5672
            - containerPort: 15672
      volumes:
        - name: heimdall-config-volume
          persistentVolumeClaim:
            claimName: heimdall-pvc-sentry
        - name: bor-config-volume
          persistentVolumeClaim:
            claimName: bor-pvc-sentry

deploy-storage.yaml

# PV e PVC para Heimdall
apiVersion: v1
kind: PersistentVolume
metadata:
  name: heimdall-pv-sentry
  labels:
    app: Polygon-Sentry
spec:
  capacity:
    storage: 150Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard
  hostPath:
    path: /var/lib/heimdall

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: heimdall-pvc-sentry
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 150Gi
  storageClassName: standard
  selector:
    matchLabels:
      app: Polygon-Sentry

---
# PV e PVC para Bor
apiVersion: v1
kind: PersistentVolume
metadata:
  name: bor-pv-sentry
  labels:
    app: Polygon-Sentry
spec:
  capacity:
    storage: 600Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard
  hostPath:
    path: /var/lib/bor

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: bor-pvc-sentry
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 600Gi
  storageClassName: standard
  selector:
    matchLabels:
      app: Polygon-Sentry

deploy-validator.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: polygon-validator-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: Polygon-validator
  template:
    metadata:
      labels:
        app: Polygon-validator
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: environment
                operator: In
                values:
                - validator
      containers:
        - name: heimdall
          image: 0xpolygon/heimdall:1.0.4-beta
          command:
            - heimdalld
            - start
          args:
            - --chain=mumbai
            - --rest-server
            - --home=/var/lib/heimdall
            - --bridge
            - --all 
          ports:
            - containerPort: 26656
          volumeMounts:
            - name: heimdall-config-volume
              mountPath: /var/lib/heimdall
        - name: bor
          image: 0xpolygon/bor:1.2.6-beta
          command:
            - bor
            - server
            - --config=/var/lib/bor/config.toml
          volumeMounts:
            - name: bor-config-volume
              mountPath: /var/lib/bor
        - name: rabbitmq
          image: rabbitmq:3.8
          ports:
            - containerPort: 5672
            - containerPort: 15672
      volumes:
        - name: heimdall-config-volume
          persistentVolumeClaim:
            claimName: heimdall-pvc-validator
        - name: bor-config-volume
          persistentVolumeClaim:
            claimName: bor-pvc-validator

storage-validator.yaml

# PV e PVC para Heimdall
apiVersion: v1
kind: PersistentVolume
metadata:
  name: heimdall-pv-validator
  labels:
    app: Polygon-validator
spec:
  capacity:
    storage: 150Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard
  hostPath:
    path: /var/lib/heimdall

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: heimdall-pvc-validator
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 150Gi
  storageClassName: standard
  selector:
    matchLabels:
      app: Polygon-validator

---
# PV e PVC para Bor
apiVersion: v1
kind: PersistentVolume
metadata:
  name: bor-pv-validator
  labels:
    app: Polygon-validator
spec:
  capacity:
    storage: 600Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard
  hostPath:
    path: /var/lib/bor

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: bor-pvc-validator
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 600Gi
  storageClassName: standard
  selector:
    matchLabels:
      app: Polygon-validator

Last updated