-
Notifications
You must be signed in to change notification settings - Fork 25
feat(container): support kubesolo in a container #106
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
Open
stevensbkang
wants to merge
6
commits into
develop
Choose a base branch
from
feat/ks-27/container-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0ac3ffa
feat(container): kubesolo container support
stevensbkang 2fd0613
fix(coredns): dns resolution fix (#102)
stevensbkang ef75828
feat(container): kubesolo container support
stevensbkang 2edf7a6
feat(container): support container
stevensbkang aa78f63
Merge branch 'develop' into feat/ks-27/container-support
stevensbkang decafee
Merge branch 'develop' into feat/ks-27/container-support
stevensbkang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .git | ||
| .github | ||
| .dev | ||
| *.md | ||
| build/ | ||
| examples/ | ||
| assets/ | ||
| dist/ | ||
| !dist/kubesolo |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,4 @@ dist/ | |
| .DS_Store | ||
| .dev/ | ||
| CLAUDE.md | ||
| .claude | ||
| .claude | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # kubesolo Container Image | ||
| # | ||
| # Build: | ||
| # make image | ||
| # | ||
| # Run: | ||
| # docker run -d --privileged \ | ||
| # --hostname kubesolo \ | ||
| # --security-opt seccomp=unconfined \ | ||
| # --security-opt apparmor=unconfined \ | ||
| # --tmpfs /tmp --tmpfs /run \ | ||
| # -v /lib/modules:/lib/modules:ro \ | ||
| # -v kubesolo-data:/var/lib/kubesolo \ | ||
| # -p 6443:6443 \ | ||
| # --name kubesolo \ | ||
| # portainer/kubesolo:latest | ||
| # | ||
| # Get kubeconfig: | ||
| # docker exec kubesolo cat /var/lib/kubesolo/pki/admin/admin.kubeconfig > kubeconfig.json | ||
| # sed -i 's|https://[^"]*:6443|https://127.0.0.1:6443|' kubeconfig.json | ||
| # export KUBECONFIG=$(pwd)/kubeconfig.json | ||
| # | ||
| # Stop: | ||
| # docker stop kubesolo && docker rm kubesolo | ||
|
|
||
| FROM alpine:3.21 | ||
|
|
||
| RUN apk add --no-cache \ | ||
| iptables \ | ||
| ip6tables \ | ||
| conntrack-tools \ | ||
| iproute2 \ | ||
| kmod \ | ||
| e2fsprogs \ | ||
| ca-certificates \ | ||
| && mkdir -p /var/lib/kubesolo | ||
|
|
||
| COPY --chmod=755 dist/kubesolo /usr/local/bin/kubesolo | ||
|
|
||
| VOLUME ["/var/lib/kubesolo"] | ||
|
|
||
| EXPOSE 6443 10250 | ||
|
|
||
| STOPSIGNAL SIGTERM | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/kubesolo"] | ||
| CMD ["--container-mode"] | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| //go:build linux | ||
|
|
||
| package system | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "syscall" | ||
| ) | ||
|
|
||
| func mountMakeRShared() error { | ||
| if err := syscall.Mount("", "/", "", syscall.MS_REC|syscall.MS_SHARED, ""); err != nil { | ||
| return fmt.Errorf("failed to make / rshared: %w", err) | ||
| } | ||
| return nil | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.