- 
                Notifications
    You must be signed in to change notification settings 
- Fork 85
Statically build using musl toolchain and target alpine #303
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
Conversation
| Needs to be updated with source controller once fluxcd/source-controller#558 is merged. | 
83aa0e4    to
    e6978bb      
    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.
Looks solid to me. ✔️
| # - Use read-only bind instead of copying go source files. | ||
| # - Cache go packages. | ||
| RUN --mount=target=. \ | ||
| --mount=type=cache,target=/root/.cache/go-build \ | 
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.
This works fine on localhost but doesn't help much in CI because the build cache is not something you can easily restore. See this issue for context.
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.
Thank you @relu, I will take a look and check ways to improve it. 👍
10b9850    to
    622f3ee      
    Compare
  
    81e6fbf    to
    c70ec1d      
    Compare
  
    This aligns with the final image used by source controller. Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
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.
LGTM
Thanks @pjbgf 🏅
I've tested this on several EKS ARM64 clusters where the previous release was failing 90% of the time with ✗ ImageUpdateAutomation reconciliation failed: 'unable to clone: SSH could not read data: Error waiting on socket'. After using a build from this PR all errors were gone 🎉
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.
Updated the branch protection rules so this one can pass, thanks @pjbgf 🙇
Main changes:
alpineas final base image.make verify.Although the controller is statically built, we are targeting
alpineto help users debugging the image if they so need/wish.