github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/charts/geth-reorg/templates/geth-tx.deployment.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    name: {{ template "ethereum.fullname" . }}-geth
     5    labels:
     6      app: {{ template "ethereum.fullname" . }}-geth
     7      chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     8      release: {{ .Release.Name }}
     9      heritage: {{ .Release.Service }}
    10  spec:
    11    replicas: {{ .Values.geth.tx.replicas }}
    12    selector:
    13      matchLabels:
    14        app: {{ template "ethereum.fullname" . }}-geth
    15        release: {{ .Release.Name }}
    16    template:
    17      metadata:
    18        labels:
    19          app: {{ template "ethereum.fullname" . }}-geth
    20          release: {{ .Release.Name }}
    21          tx: "0"
    22        annotations:
    23          {{- range $key, $value := .Values.podAnnotations }}
    24          {{ $key }}: {{ $value | quote }}
    25          {{- end }}
    26      spec:
    27        containers:
    28          - name: geth
    29            image: {{ .Values.geth.image.repository }}:{{ .Values.geth.image.tag }}
    30            imagePullPolicy: {{ .Values.imagePullPolicy }}
    31            command: ["/bin/sh"]
    32            args:
    33              - "-c"
    34              - "geth --http.vhosts=* --nousb --metrics --nocompaction --syncmode full --gcmode archive --bootnodes=`cat /root/.ethereum/bootnodes` --http --http.corsdomain \"*\" --http.api admin,debug,web3,eth,txpool,personal,miner,net --http.addr 0.0.0.0 --http.port=8544 --ws --ws.origins \"*\" --ws.api admin,debug,web3,eth,txpool,personal,miner,net --ws.addr 0.0.0.0 --ws.port=8546 --mine --miner.extradata \"tx\" --miner.threads 1 --miner.gasprice 1 --miner.gastarget 400000000000000 --miner.gaslimit 400000000000000 --miner.noverify --miner.etherbase 0 --networkid=${NETWORK_ID} --allow-insecure-unlock --password /root/.ethereum/keystore/password.txt --verbosity=5"
    35            env:
    36              - name: NETWORK_ID
    37                valueFrom:
    38                  configMapKeyRef:
    39                    name: {{ template "ethereum.fullname" . }}-geth-config
    40                    key: networkid
    41            resources:
    42              requests:
    43                memory: {{ .Values.geth.tx.resources.requests.memory }}
    44                cpu: {{ .Values.geth.tx.resources.requests.cpu }}
    45              limits:
    46                memory: {{ .Values.geth.tx.resources.limits.memory }}
    47                cpu: {{ .Values.geth.tx.resources.limits.cpu }}
    48            ports:
    49              - name: http-rpc
    50                containerPort: 8544
    51              - name: ws-rpc
    52                containerPort: 8546
    53              - name: discovery-udp
    54                containerPort: 30303
    55                protocol: UDP
    56              - name: discovery-tcp
    57                containerPort: 30303
    58            volumeMounts:
    59              - name: data
    60                mountPath: /root/.ethereum
    61              - name: config
    62                mountPath: /root/.ethereum/keystore/key1
    63                subPath: key1
    64              - name: config
    65                mountPath: /root/.ethereum/keystore/key2
    66                subPath: key2
    67              - name: config
    68                mountPath: /root/.ethereum/keystore/key3
    69                subPath: key3
    70              - name: config
    71                mountPath: /root/.ethereum/keystore/key4
    72                subPath: key4
    73              - name: config
    74                mountPath: /root/.ethereum/keystore/key5
    75                subPath: key5
    76              - name: config
    77                mountPath: /root/.ethereum/keystore/key6
    78                subPath: key6
    79              - name: config
    80                mountPath: /root/.ethereum/keystore/key7
    81                subPath: key7
    82              - name: config
    83                mountPath: /root/.ethereum/keystore/key8
    84                subPath: key8
    85              - name: config
    86                mountPath: /root/.ethereum/keystore/key9
    87                subPath: key9
    88              - name: config
    89                mountPath: /root/.ethereum/keystore/key10
    90                subPath: key10
    91              - name: config
    92                mountPath: /root/.ethereum/keystore/key11
    93                subPath: key11
    94              - name: config
    95                mountPath: /root/.ethereum/keystore/key12
    96                subPath: key12
    97              - name: config
    98                mountPath: /root/.ethereum/keystore/key13
    99                subPath: key13
   100              - name: config
   101                mountPath: /root/.ethereum/keystore/key14
   102                subPath: key14
   103              - name: config
   104                mountPath: /root/.ethereum/keystore/key15
   105                subPath: key15
   106              - name: config
   107                mountPath: /root/.ethereum/keystore/key16
   108                subPath: key16
   109              - name: config
   110                mountPath: /root/.ethereum/keystore/key17
   111                subPath: key17
   112              - name: config
   113                mountPath: /root/.ethereum/keystore/key18
   114                subPath: key18
   115              - name: config
   116                mountPath: /root/.ethereum/keystore/key19
   117                subPath: key19
   118              - name: config
   119                mountPath: /root/.ethereum/keystore/key20
   120                subPath: key20
   121              - name: config
   122                mountPath: /root/.ethereum/keystore/password.txt
   123                subPath: password.txt
   124        initContainers:
   125          - name: init-genesis
   126            image: {{ .Values.geth.image.repository }}:{{ .Values.geth.image.tag }}
   127            imagePullPolicy: {{ .Values.imagePullPolicy }}
   128            args:
   129              - "init"
   130              - "/var/geth/genesis.json"
   131            volumeMounts:
   132              - name: data
   133                mountPath: /root/.ethereum
   134              - name: config
   135                mountPath: /var/geth
   136          - name: get-bootnodes
   137            image: {{ .Values.geth.image.repository }}:{{ .Values.geth.image.tag }}
   138            imagePullPolicy: {{ .Values.imagePullPolicy }}
   139            command: ["/bin/sh"]
   140            args:
   141              - "-c"
   142              - |-
   143                apk add --no-cache curl;
   144                CNT=0;
   145                echo "retreiving bootnodes from $BOOTNODE_REGISTRAR_SVC"
   146                while [ $CNT -le 90 ]
   147                do
   148                  curl -m 5 -s $BOOTNODE_REGISTRAR_SVC | xargs echo -n >> /geth/bootnodes;
   149                  if [ -s /geth/bootnodes ]
   150                  then
   151                    cat /geth/bootnodes;
   152                    exit 0;
   153                  fi;
   154  
   155                  echo "no bootnodes found. retrying $CNT...";
   156                  sleep 2 || break;
   157                  CNT=$((CNT+1));
   158                done;
   159                echo "WARNING. unable to find bootnodes. continuing but geth may not be able to find any peers.";
   160                exit 0;
   161            env:
   162              - name: BOOTNODE_REGISTRAR_SVC
   163                value: {{ template "ethereum.fullname" . }}-node-registrar.{{ .Release.Namespace }}
   164            volumeMounts:
   165              - name: data
   166                mountPath: /geth
   167        volumes:
   168          - name: data
   169            emptyDir: {}
   170          - name: config
   171            configMap:
   172              name: {{ template "ethereum.fullname" . }}-geth-config
   173  {{- with .Values.nodeSelector }}
   174        nodeSelector:
   175  {{ toYaml . | indent 8 }}
   176  {{- end }}
   177  {{- with .Values.affinity }}
   178        affinity:
   179  {{ toYaml . | indent 8 }}
   180  {{- end }}
   181  {{- with .Values.tolerations }}
   182        tolerations:
   183  {{ toYaml . | indent 8 }}
   184  {{- end }}