mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
Wait for DinD to be ready (#490)
* deployment/charts: start dind first * Wait for DinD to be up and running
This commit is contained in:
committed by
GitHub
parent
07e621170b
commit
6127ca8786
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for the Docker host to be ready to accept connections
|
||||
if [ -n "$DOCKER_HOST" ]; then
|
||||
echo "Waiting for Docker daemon to be ready..."
|
||||
while ! docker info > /dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
# Run the command passed as arguments
|
||||
exec "$@"
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
initContainers:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: build-bot
|
||||
image: "{{ .Values.global.fuzzerImage.repository }}:{{ .Values.global.fuzzerImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.fuzzerImage.pullPolicy }}
|
||||
@@ -32,7 +33,6 @@ spec:
|
||||
{{- include "buttercup.commonEnv" . | nindent 8 }}
|
||||
{{- include "buttercup.buildBotEnv" . | nindent 8 }}
|
||||
{{- include "buttercup.dockerHostEnv" . | nindent 8 }}
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.volumes.tasks" . | nindent 6 }}
|
||||
|
||||
@@ -17,6 +17,7 @@ spec:
|
||||
spec:
|
||||
{{- include "buttercup.imagePullSecrets" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 8 }}
|
||||
- name: competition-api
|
||||
image: "{{ .Values.global.competitionApiImage.repository }}:{{ .Values.global.competitionApiImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.competitionApiImage.pullPolicy }}
|
||||
@@ -55,7 +56,6 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "buttercup.nodeLocalVolumeMount" . | nindent 12 }}
|
||||
{{- include "buttercup.dindSidecar" . | nindent 8 }}
|
||||
volumes:
|
||||
{{- include "buttercup.dindVolume" . | nindent 8 }}
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 8 }}
|
||||
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
initContainers:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: coverage-bot
|
||||
image: "{{ .Values.global.fuzzerImage.repository }}:{{ .Values.global.fuzzerImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.fuzzerImage.pullPolicy }}
|
||||
@@ -33,7 +34,6 @@ spec:
|
||||
value: "{{ .Values.global.coverageBot.sampleSize }}"
|
||||
{{- include "buttercup.dockerHostEnv" . | nindent 8 }}
|
||||
{{- include "buttercup.env.nodeData" . | nindent 8 }}
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.volumes.tasks" . | nindent 6 }}
|
||||
|
||||
@@ -21,6 +21,7 @@ spec:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
{{- include "buttercup.waitForLiteLLM" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: patcher
|
||||
image: "{{ .Values.global.patcherImage.repository | default "patcher" }}:{{ .Values.global.patcherImage.tag | default "latest" }}"
|
||||
imagePullPolicy: {{ .Values.global.patcherImage.pullPolicy | default "IfNotPresent" }}
|
||||
@@ -38,7 +39,6 @@ spec:
|
||||
{{- include "buttercup.env.langfuse" . | nindent 8 }}
|
||||
- name: LOG_LEVEL
|
||||
value: "{{ .Values.logLevel }}"
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.dindVolume" . | nindent 6 }}
|
||||
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
initContainers:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: program-model
|
||||
image: "{{ .Values.global.programModelImage.repository }}:{{ .Values.global.programModelImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.programModelImage.pullPolicy }}
|
||||
@@ -32,7 +33,6 @@ spec:
|
||||
volumeMounts:
|
||||
{{- include "buttercup.standardVolumeMounts" (dict "usesTasksStorage" true) | nindent 8 }}
|
||||
{{- include "buttercup.nodeLocalVolumeMount" . | nindent 8 }}
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.volumes.tasks" . | nindent 6 }}
|
||||
|
||||
@@ -21,6 +21,7 @@ spec:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
{{- include "buttercup.waitForLiteLLM" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: seed-gen
|
||||
image: "{{ .Values.global.seedGenImage.repository }}:{{ .Values.global.seedGenImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.seedGenImage.pullPolicy }}
|
||||
@@ -45,7 +46,6 @@ spec:
|
||||
{{- include "buttercup.env.langfuse" . | nindent 8 }}
|
||||
- name: LOG_LEVEL
|
||||
value: "{{ include "buttercup.core.logLevel" . }}"
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.dindVolume" . | nindent 6 }}
|
||||
|
||||
@@ -19,6 +19,7 @@ spec:
|
||||
initContainers:
|
||||
{{- include "buttercup.waitForRedis" . | nindent 6 }}
|
||||
containers:
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
- name: tracer-bot
|
||||
image: "{{ .Values.global.fuzzerImage.repository }}:{{ .Values.global.fuzzerImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.global.fuzzerImage.pullPolicy }}
|
||||
@@ -31,7 +32,6 @@ spec:
|
||||
env:
|
||||
{{- include "buttercup.dockerHostEnv" . | nindent 8 }}
|
||||
{{- include "buttercup.env.nodeData" . | nindent 8 }}
|
||||
{{- include "buttercup.dindSidecar" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "buttercup.volumes.scratch" . | nindent 6 }}
|
||||
{{- include "buttercup.volumes.tasks" . | nindent 6 }}
|
||||
|
||||
@@ -41,4 +41,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder --chown=app:app /fuzzer/.venv /fuzzer/.venv
|
||||
COPY common/container-entrypoint.sh /container-entrypoint.sh
|
||||
ENV PATH=/fuzzer/.venv/bin:$PATH
|
||||
|
||||
ENTRYPOINT ["/container-entrypoint.sh"]
|
||||
|
||||
@@ -60,7 +60,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
||||
COPY --from=builder --chown=app:app /app/patcher/.venv /app/patcher/.venv
|
||||
COPY --from=cscope-builder /usr/local/bin/cscope /usr/local/bin/cscope
|
||||
COPY common/container-entrypoint.sh /container-entrypoint.sh
|
||||
|
||||
WORKDIR /app/patcher
|
||||
ENV PATH=/app/patcher/.venv/bin:$PATH
|
||||
|
||||
ENTRYPOINT ["/container-entrypoint.sh"]
|
||||
|
||||
@@ -45,4 +45,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
||||
COPY --from=cscope-builder /usr/local/bin/cscope /usr/local/bin/cscope
|
||||
COPY --from=builder --chown=app:app /app/.venv /app/.venv
|
||||
COPY common/container-entrypoint.sh /container-entrypoint.sh
|
||||
ENV PATH=/app/.venv/bin:$PATH
|
||||
|
||||
ENTRYPOINT ["/container-entrypoint.sh"]
|
||||
|
||||
@@ -52,6 +52,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
ENV PYTHON_WASM_BUILD_PATH="/python-3.12.0.wasm"
|
||||
COPY --from=cscope-builder /usr/local/bin/cscope /usr/local/bin/cscope
|
||||
COPY --from=builder /app/seed-gen/.venv /app/seed-gen/.venv
|
||||
COPY common/container-entrypoint.sh /container-entrypoint.sh
|
||||
|
||||
WORKDIR /app/seed-gen
|
||||
ENV PATH=/app/seed-gen/.venv/bin:$PATH
|
||||
|
||||
ENTRYPOINT ["/container-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user