Skip to content

Commit 0710fc3

Browse files
authored
chore: kubectl (#17133)
2 parents a45f589 + 1c8b896 commit 0710fc3

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

spartan/aztec-network/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Service Address Setup Container
104104
*/}}
105105
{{- define "aztec-network.serviceAddressSetupContainer" -}}
106106
- name: setup-service-addresses
107-
image: rancher/kubectl:v1.34.1
107+
image: registry.suse.com/suse/kubectl:1.33
108108
command:
109109
- /bin/bash
110110
- -c
@@ -306,7 +306,7 @@ Combined P2P, and Service Address Setup Container
306306
{{- define "aztec-network.combinedAllSetupContainer" -}}
307307
{{- $serviceName := base $.Template.Name | trimSuffix ".yaml" -}}
308308
- name: setup-all
309-
image: rancher/kubectl:v1.34.1
309+
image: registry.suse.com/suse/kubectl:1.33
310310
command:
311311
- /bin/bash
312312
- -c

spartan/aztec-node/templates/_pod-template.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,21 @@ spec:
3535
{{- if .Values.initContainers }}
3636
{{- tpl (toYaml .Values.initContainers | nindent 4) $ }}
3737
{{- end }}
38-
{{- if or .Values.service.p2p.nodePortEnabled .Values.hostNetwork }}
38+
{{- if .Values.service.p2p.nodePortEnabled }}
3939
- name: init-nodeport
40-
image: rancher/kubectl:v1.34.1
40+
image: registry.suse.com/suse/kubectl:1.33
4141
securityContext:
4242
runAsNonRoot: false
4343
runAsUser: 0
4444
command:
45-
- sh
45+
- /bin/bash
4646
- -c
4747
- |
4848
export POD_INDEX=$(echo ${POD_NAME} | awk -F'-' '{print $NF}');
49-
50-
# If running host network, we don't need to get the node port from the service
51-
{{- if not .Values.hostNetwork }}
5249
export EXTERNAL_PORT=$(kubectl get services -l "pod-index in (${POD_INDEX}), type in (p2p)" -o jsonpath='{.items[0].spec.ports[0].nodePort}');
53-
echo "export EXTERNAL_PORT=$EXTERNAL_PORT" > /shared/init-nodeport;
54-
echo "export P2P_PORT=$EXTERNAL_PORT" >> /shared/init-nodeport;
55-
{{- end }}
5650
57-
# Get the external IP of the node
58-
export EXTERNAL_IP=$(kubectl get nodes "${NODE_NAME}" -o jsonpath='{.status.addresses[?(@.type=="ExternalIP")].address}');
51+
echo "export P2P_BROADCAST_PORT=$EXTERNAL_PORT" >> /shared/init-nodeport;
5952
60-
echo "export EXTERNAL_IP=$EXTERNAL_IP" >> /shared/init-nodeport;
61-
echo "export P2P_IP=$EXTERNAL_IP" >> /shared/init-nodeport;
6253
cat /shared/init-nodeport;
6354
env:
6455
- name: POD_NAME
@@ -82,7 +73,10 @@ spec:
8273
- -c
8374
- |
8475
{{- if or .Values.service.p2p.nodePortEnabled .Values.hostNetwork }}
85-
source /shared/init-nodeport;
76+
if [ -f /shared/init-nodeport ]; then
77+
source /shared/init-nodeport;
78+
fi
79+
export P2P_QUERY_FOR_IP=true
8680
{{- else }}
8781
export P2P_IP=$(hostname -i)
8882
{{- end }}

0 commit comments

Comments
 (0)