CI-CD dejo node
This commit is contained in:
8
infrastructure/kubernetes/dev/base/app/configmap.yml
Normal file
8
infrastructure/kubernetes/dev/base/app/configmap.yml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: dejo-node-config
|
||||
data:
|
||||
# ex.: configuração genérica, se precisar
|
||||
LOG_LEVEL: "info"
|
||||
|
||||
33
infrastructure/kubernetes/dev/base/app/deployment.yml
Normal file
33
infrastructure/kubernetes/dev/base/app/deployment.yml
Normal file
@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: dejo-node
|
||||
labels:
|
||||
app: dejo-node
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: dejo-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: dejo-node
|
||||
spec:
|
||||
containers:
|
||||
- name: dejo-node
|
||||
image: dejo/node:latest
|
||||
ports:
|
||||
- containerPort: 8545
|
||||
- containerPort: 30303
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: dejo-node-config
|
||||
volumeMounts:
|
||||
- name: blockchain-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: blockchain-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: dejo-node-pvc
|
||||
|
||||
19
infrastructure/kubernetes/dev/base/app/hpa.yml
Normal file
19
infrastructure/kubernetes/dev/base/app/hpa.yml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: autoscaling/v2beta2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: dejo-node-hpa
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: dejo-node
|
||||
minReplicas: 2
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
|
||||
8
infrastructure/kubernetes/dev/base/app/ingress.yml
Normal file
8
infrastructure/kubernetes/dev/base/app/ingress.yml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: dejo-node-ingress
|
||||
labels:
|
||||
app: dejo-node
|
||||
spec: {}
|
||||
|
||||
13
infrastructure/kubernetes/dev/base/app/pvc.yml
Normal file
13
infrastructure/kubernetes/dev/base/app/pvc.yml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: dejo-node-pvc
|
||||
labels:
|
||||
app: dejo-node
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: gp3
|
||||
|
||||
18
infrastructure/kubernetes/dev/base/app/service.yml
Normal file
18
infrastructure/kubernetes/dev/base/app/service.yml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: dejo-node-svc
|
||||
labels:
|
||||
app: dejo-node
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: dejo-node
|
||||
ports:
|
||||
- name: rpc
|
||||
port: 8545
|
||||
targetPort: 8545
|
||||
- name: p2p
|
||||
port: 30303
|
||||
targetPort: 30303
|
||||
|
||||
Reference in New Issue
Block a user