-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from tyzbit/flux
feat: (flux) add flux bundle
- Loading branch information
Showing
5 changed files
with
237 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM alpine as build | ||
ENV VERSION=2.1.2 | ||
ENV CHECKSUM=61b360b50d6cfc34410730b1cebeb75f5eda2b484e47b9a083412f51ad56de68 | ||
|
||
ADD https://github.com/fluxcd/flux2/releases/download/v${VERSION}/flux_${VERSION}_linux_amd64.tar.gz /tmp | ||
RUN DOWNLOAD_FILE="/tmp/flux_${VERSION}_linux_amd64.tar.gz" && \ | ||
DOWNLOAD_CHECKSUM=$(sha256sum "${DOWNLOAD_FILE}" | awk '{print $1}') && \ | ||
if [[ ${DOWNLOAD_CHECKSUM} != ${CHECKSUM} ]]; then \ | ||
echo "Checksum does not match"; \ | ||
exit 1; \ | ||
fi && \ | ||
tar xzf "${DOWNLOAD_FILE}" -C / && \ | ||
rm "${DOWNLOAD_FILE}" | ||
|
||
FROM scratch | ||
COPY --from=build flux . | ||
COPY flux-bootstrap.service . | ||
COPY flux-bootstrap.sh . | ||
COPY run.sh . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Bootstrap cluster with Flux | ||
Documentation=https://github.com/kairos-io/community-bundles/blob/main/README.md#flux | ||
After=k3s.service | ||
|
||
[Service] | ||
Type=oneshot | ||
Restart=no | ||
ExecStart=/usr/local/bin/flux-bootstrap.sh | ||
User=root | ||
Group=root | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=k3s.service |
Oops, something went wrong.