diff --git a/spartan/aztec-network/templates/_helpers.tpl b/spartan/aztec-network/templates/_helpers.tpl index 7a5836f2b2c2..c3f74f748b8d 100644 --- a/spartan/aztec-network/templates/_helpers.tpl +++ b/spartan/aztec-network/templates/_helpers.tpl @@ -104,7 +104,7 @@ Service Address Setup Container */}} {{- define "aztec-network.serviceAddressSetupContainer" -}} - name: setup-service-addresses - image: rancher/kubectl:v1.34.1 + image: registry.suse.com/suse/kubectl:1.33 command: - /bin/bash - -c @@ -306,7 +306,7 @@ Combined P2P, and Service Address Setup Container {{- define "aztec-network.combinedAllSetupContainer" -}} {{- $serviceName := base $.Template.Name | trimSuffix ".yaml" -}} - name: setup-all - image: rancher/kubectl:v1.34.1 + image: registry.suse.com/suse/kubectl:1.33 command: - /bin/bash - -c diff --git a/spartan/aztec-node/templates/_pod-template.yaml b/spartan/aztec-node/templates/_pod-template.yaml index e7a5712fe10b..2fcca86f5832 100644 --- a/spartan/aztec-node/templates/_pod-template.yaml +++ b/spartan/aztec-node/templates/_pod-template.yaml @@ -35,30 +35,21 @@ spec: {{- if .Values.initContainers }} {{- tpl (toYaml .Values.initContainers | nindent 4) $ }} {{- end }} - {{- if or .Values.service.p2p.nodePortEnabled .Values.hostNetwork }} + {{- if .Values.service.p2p.nodePortEnabled }} - name: init-nodeport - image: rancher/kubectl:v1.34.1 + image: registry.suse.com/suse/kubectl:1.33 securityContext: runAsNonRoot: false runAsUser: 0 command: - - sh + - /bin/bash - -c - | export POD_INDEX=$(echo ${POD_NAME} | awk -F'-' '{print $NF}'); - - # If running host network, we don't need to get the node port from the service - {{- if not .Values.hostNetwork }} export EXTERNAL_PORT=$(kubectl get services -l "pod-index in (${POD_INDEX}), type in (p2p)" -o jsonpath='{.items[0].spec.ports[0].nodePort}'); - echo "export EXTERNAL_PORT=$EXTERNAL_PORT" > /shared/init-nodeport; - echo "export P2P_PORT=$EXTERNAL_PORT" >> /shared/init-nodeport; - {{- end }} - # Get the external IP of the node - export EXTERNAL_IP=$(kubectl get nodes "${NODE_NAME}" -o jsonpath='{.status.addresses[?(@.type=="ExternalIP")].address}'); + echo "export P2P_BROADCAST_PORT=$EXTERNAL_PORT" >> /shared/init-nodeport; - echo "export EXTERNAL_IP=$EXTERNAL_IP" >> /shared/init-nodeport; - echo "export P2P_IP=$EXTERNAL_IP" >> /shared/init-nodeport; cat /shared/init-nodeport; env: - name: POD_NAME @@ -82,7 +73,10 @@ spec: - -c - | {{- if or .Values.service.p2p.nodePortEnabled .Values.hostNetwork }} - source /shared/init-nodeport; + if [ -f /shared/init-nodeport ]; then + source /shared/init-nodeport; + fi + export P2P_QUERY_FOR_IP=true {{- else }} export P2P_IP=$(hostname -i) {{- end }}