Add an init container that's wait to seaweedfs api pod#276
Merged
GiladShapira94 merged 9 commits intomlrun:developmentfrom Mar 17, 2026
Merged
Add an init container that's wait to seaweedfs api pod#276GiladShapira94 merged 9 commits intomlrun:developmentfrom
GiladShapira94 merged 9 commits intomlrun:developmentfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent the Kubeflow Pipelines (KFP) API server (ml-pipeline) from entering CrashLoopBackOff when SeaweedFS (object store / S3 gateway) isn’t ready yet, by adding a blocking init container to wait for the endpoint before starting the main container.
Changes:
- Add a conditional
initContainerssection to theml-pipelineDeployment whenseaweedfs.enabledis true. - Implement a wait loop that polls the configured object-store host/port before allowing the pod to proceed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+168
to
+170
| {{- if .Values.seaweedfs.enabled }} | ||
| initContainers: | ||
| - name: wait-for-seaweedfs |
| configMapKeyRef: | ||
| name: pipeline-install-config | ||
| key: objectStoreServicePort | ||
| {{- end }} |
Comment on lines
+170
to
+187
| - name: wait-for-seaweedfs | ||
| image: busybox:1.36 | ||
| command: | ||
| - sh | ||
| - -c | ||
| - | | ||
| until wget -q -S -O /dev/null http://${SEAWEEDFS_HOST}:${SEAWEEDFS_PORT}/ 2>&1 | grep -q "HTTP/"; do | ||
| echo "Waiting for SeaweedFS S3 to be ready..." | ||
| sleep 5 | ||
| done | ||
| echo "SeaweedFS S3 is ready." | ||
| env: | ||
| - name: SEAWEEDFS_HOST | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: pipeline-install-config | ||
| key: objectStoreServiceHost | ||
| - name: SEAWEEDFS_PORT |
| - sh | ||
| - -c | ||
| - | | ||
| until wget -q -S -O /dev/null http://${SEAWEEDFS_HOST}:${SEAWEEDFS_PORT}/ 2>&1 | grep -q "HTTP/"; do |
liranbg
requested changes
Mar 17, 2026
| {{- if .Values.seaweedfs.enabled }} | ||
| initContainers: | ||
| - name: wait-for-seaweedfs | ||
| image: busybox:1.36 |
Member
There was a problem hiding this comment.
read from values to allow changing the registry/repository/tag
Comment on lines
+176
to
+179
| until wget -q -S -O /dev/null http://${SEAWEEDFS_HOST}:${SEAWEEDFS_PORT}/ 2>&1 | grep -q "HTTP/"; do | ||
| echo "Waiting for SeaweedFS S3 to be ready..." | ||
| sleep 5 | ||
| done |
Member
There was a problem hiding this comment.
keep in mind that swfs http endpoint might answer something - but does it meanit is ready for clients to use its backend?
liranbg
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where the KFP API pod fails with
CrashLoopBackOffwhile trying to connect to the SeaweedFS API, but this pod is not in running state.This PR adds an init container to the KFP API that waits to the SeaweedFS API and then init the KFP API