apiVersion: apps/v1
kind: Deployment
metadata:
  name: p2p-node
  labels:
    app: p2p-node
spec:
  replicas: 10
  selector:
    matchLabels:
      app: p2p-node
  template:
    metadata:
      labels:
        app: p2p-node
    spec:
      containers:
        - name: p2pnode
          image: zjshen/go-p2p:test
          imagePullPolicy: Always
          command: ["/go/src/github.com/zjshen14/go-p2p/bin/main"]
          args: ["-secureio=true", "-gossip=true", "-broadcast=false", "-bootstrapaddr=p2p-bootnode:30001"]
          ports:
          - containerPort: 30001
            protocol: TCP
          - name: metrics
            containerPort: 8080
            protocol: TCP
          env:
            - name: P2P_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
