apiVersion: v1
kind: Service
metadata:
  name: {{ template "bitcoind.fullname" . }}
  labels:
    app: {{ template "bitcoind.name" . }}
    chart: {{ template "bitcoind.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  ports:
    - name: rpc
      port: {{ .Values.service.rpcPort }}
      targetPort: rpc
    - name: p2p
      port: {{ .Values.service.p2pPort }}
      targetPort: p2p
    - name: testnet
      port: {{ .Values.service.testnetPort }}
    - name: testnet-p2p
      port: {{ .Values.service.testnetP2pPort }}
  selector:
    app: {{ template "bitcoind.name" . }}
    release: {{ .Release.Name }}
