-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Feat/compose deployer #9895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/compose deployer #9895
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello @kterui9019, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant new feature to Skaffold, enabling it to deploy applications using Docker Compose. This enhancement allows users to leverage their existing Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
- Add deployWithCompose() and cleanupWithCompose() methods - Support SKAFFOLD_COMPOSE_FILE environment variable for custom compose file paths - Automatically replace image names in compose files with skaffold-built images - Add comprehensive unit tests with 12 test cases covering all functionality - Add complete working example in examples/docker-compose-deploy/ - Add testdata files for unit testing
c5b0b33 to
cdd809e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a significant new feature: deploying applications using Docker Compose. The changes include core implementation in the Docker deployer, extensive integration tests, a new example, and documentation updates.
My review focuses on the correctness and robustness of the new implementation. I've identified a critical issue in the deployment logic where docker compose up would be called in a loop for each artifact, which needs to be refactored. I also found a potential issue with the image name matching logic which could lead to incorrect deployments in projects with similarly named images. Additionally, I've provided some suggestions to improve the readability and efficiency of the new test helper functions.
b0a50b3 to
a655ef3
Compare
d936d08 to
d684885
Compare
d684885 to
7a2f225
Compare
Fixes: #9321
Description
Implements docker compose deployer functionality to resolve issue #9321.
This PR adds support for deploying applications using
docker composeinstead ofindividual containers when
useCompose: trueis set in the skaffold.yamlconfiguration.
User facing changes (remove if N/A)
This implementation allows users to deploy applications using docker compose instead of individual containers. The compose file is automatically updated with the correct image tags built by skaffold.
How it works
docker compose up -dwith a unique project namedocker compose down --volumes --remove-orphans