Skip to content

Commit

Permalink
feat: update Helm charts to handle Hedera Docker container determinis…
Browse files Browse the repository at this point in the history
…tic image (#968)

Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon authored Sep 6, 2024
1 parent a952578 commit 40269d2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/support/ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ echo "Get service and pod information"
kubectl get svc -o wide && \
kubectl get pods -o wide && \

echo "Waiting for network-node pods to be active (first deployment takes ~10m)...."
echo "Waiting for network-node pods to be phase=running (first deployment takes ~10m)...."
kubectl wait --for=jsonpath='{.status.phase}'=Running pod -l fullstack.hedera.com/type=network-node --timeout=900s

echo "Waiting for network-node pods to be condition=ready (first deployment takes ~10m)...."
kubectl wait --for=condition=ready pod -l fullstack.hedera.com/type=network-node --timeout=900s

echo "Service Information...."
kubectl get svc -o wide

Expand Down
6 changes: 3 additions & 3 deletions charts/fullstack-deployment/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 0.2.0
- name: hedera-mirror
repository: https://hashgraph.github.io/hedera-mirror-node/charts
version: 0.110.1
version: 0.111.1
- name: tenant
repository: https://operator.min.io/
version: 5.0.12
Expand All @@ -14,5 +14,5 @@ dependencies:
- name: haproxy-ingress
repository: https://haproxy-ingress.github.io/charts
version: 0.14.5
digest: sha256:0e6897144860871142fd0db8c0a34fc113dc66121aa50c1482e89d932d323af8
generated: "2024-08-09T12:47:26.726721+01:00"
digest: sha256:ca8cade42bbfa3211fde7112cb0998e8c7c86587c9113b10f2cbd209683113b0
generated: "2024-09-06T10:44:29.620625+01:00"
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ spec:
task() {
mkdir -p /opt/hgcapp/recordStreams/record{{ $node.accountId }}/sidecar
chmod 777 /opt/hgcapp/recordStreams/record{{ $node.accountId }}/sidecar
curl network-{{ $node.name }}-0.network-{{ $node.name }}.{{ default $.Release.Namespace $.Values.global.namespaceOverride }}.svc.cluster.local:13133
}
task
failureThreshold: 30
Expand Down Expand Up @@ -537,8 +536,29 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- if gt $initContainersLength 0 }}
initContainers:
- name: init-hedera
image: curlimages/curl:8.9.1
command:
- "sh"
- "-c"
- |
loop=1
while [ "$loop" -ne 0 ]; do
loop=0;
{{- range $index, $node := $.Values.hedera.nodes }}
nslookup network-{{ $node.name }}-0.network-{{ $node.name }}.{{ default $.Release.Namespace $.Values.global.namespaceOverride }}.svc.cluster.local;
rc=$?;
if [ "$loop" -eq 0 -a "$rc" -eq 0 ]; then
loop=0;
else
loop=1;
fi
{{- end }}
sleep 5;
done
return 0
{{- if gt $initContainersLength 0 }}
{{- toYaml $.Values.hedera.initContainers | nindent 8 }}
{{- end }}
{{ end }}
3 changes: 3 additions & 0 deletions charts/fullstack-deployment/tests/test_basic_deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ setup() {
log_debug "Expected total nodes: ${TOTAL_NODES}"
log_debug "----------------------------------------------------------------------------"

log_debug "Waiting for network node pods to be phase=running..."
kubectl wait --for=jsonpath='{.status.phase}'=Running pod -l fullstack.hedera.com/type=network-node --timeout=300s -n "${NAMESPACE}" || return "${EX_ERR}"
log_debug "Waiting for network node pods to be condition=ready..."
kubectl wait --for=condition=ready pod -l fullstack.hedera.com/type=network-node --timeout=300s -n "${NAMESPACE}" || return "${EX_ERR}"

local resp="$(get_pod_list network-node)"
local nodes=(${resp}) # convert into an array
Expand Down

0 comments on commit 40269d2

Please sign in to comment.