-
Notifications
You must be signed in to change notification settings - Fork 0
Swap to a rockcraft image #27
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
Draft
addyess
wants to merge
14
commits into
main
Choose a base branch
from
trial/coredns-rock
base: main
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.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a728037
Bootstrap project
addyess b73fe69
Test `single-node-no-cni` manifest in PR (#1)
Copilot ba08b68
Reduce sudo usage and exec calls (#20)
addyess 0bf4d14
Install cni-plugins before kubelet starts (#21)
addyess aa6a59a
Import images via pull or import (#22)
addyess c64ef09
Remove unused fields from manifest and components (#23)
addyess ad2a741
Tidy up more of the components (#24)
addyess af72169
Parallelize image pulls and install (#25)
addyess 97f98ac
First shot deploying with a calico CNI (#26)
addyess 7c24fb3
Swap to a rockcraft image
addyess ad89e4f
Patch coredns deployment during verify hook
addyess c3c2616
Prepare for testing with spread (#28)
addyess 2f84b0a
Merge branch 'project-bootstrap' into trial/coredns-rock
addyess c642eec
Merge branch 'main' into trial/coredns-rock
addyess 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
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,34 @@ | ||
| """ | ||
| CoreDNS component installation and management. | ||
|
|
||
| CoreDNS is used as the DNS server for Kubernetes clusters. | ||
| """ | ||
|
|
||
| import json | ||
| import shlex | ||
|
|
||
| from kube_galaxy.pkg.components import ComponentBase, register_component | ||
| from kube_galaxy.pkg.utils.shell import run | ||
|
|
||
|
|
||
| @register_component("coredns") | ||
| class CoreDNS(ComponentBase): | ||
| def bootstrap_hook(self) -> None: | ||
| """Patch coredns deployment | ||
|
|
||
| This is needed to allow coredns to run with readOnlyRootFilesystem=false | ||
| which is required for certain versions of coredns that kubeadm may use. | ||
| The patch modifies the coredns deployment to set the securityContext of | ||
| the coredns container to allow read/write access to the root filesystem. | ||
|
|
||
| spec.template.spec.containers[0].securityContext.readOnlyRootFileystem=false | ||
| """ | ||
| op = [ | ||
| { | ||
| "op": "replace", | ||
| "path": "/spec/template/spec/containers/0/securityContext/readOnlyRootFilesystem", | ||
| "value": False, | ||
| } | ||
| ] | ||
| cmd = shlex.split("kubectl patch deployment/coredns -n kube-system --type='json' -p") | ||
| run([*cmd, json.dumps(op)], check=True) |
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.