refactor(coredns): replace pod-based deployment with in-process library#136
Open
stevensbkang wants to merge 7 commits intodevelopfrom
Open
refactor(coredns): replace pod-based deployment with in-process library#136stevensbkang wants to merge 7 commits intodevelopfrom
stevensbkang wants to merge 7 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors CoreDNS from a pod-based Kubernetes deployment (image import + Deployment/ServiceAccount/RBAC) to an in-process CoreDNS library started directly by kubesolo, while removing the now-unused embedded CoreDNS image artifacts.
Changes:
- Remove embedded CoreDNS image + containerd import path and related type/constants.
- Add an in-process CoreDNS service that starts in forward-only mode, then hot-reloads to a cluster-aware config after the API server is ready.
- Register a selectorless
kube-dnsService and a manually managed EndpointSlice to route ClusterIP:53 to the node-bound CoreDNS port.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| types/types.go | Removes embedded CoreDNS image path field. |
| types/const.go | Removes default CoreDNS image constant. |
| pkg/runtime/containerd/service.go | Drops CoreDNS image path wiring from containerd runtime service. |
| pkg/runtime/containerd/image.go | Stops importing the CoreDNS image into containerd. |
| pkg/kubernetes/kubelet/health.go | Reworks kubelet health check into a polling loop with a longer timeout. |
| pkg/kine/config.go | Adjusts SQLite DSN parameters for kine. |
| pkg/components/coredns/service.go | Creates selectorless kube-dns Service and a manual EndpointSlice for in-process CoreDNS. |
| pkg/components/coredns/server.go | New: runs CoreDNS in-process and hot-reloads config after API server readiness. |
| pkg/components/coredns/configuration.go | Replaces ConfigMap-based Corefile with in-process Corefile generators. |
| pkg/components/coredns/cleanup.go | New: removes legacy pod-based CoreDNS resources. |
| pkg/components/coredns/rbac.go | Removed: no longer needed for pod-based CoreDNS. |
| pkg/components/coredns/deployment.go | Removed: no longer deploying CoreDNS as a Deployment. |
| pkg/components/coredns/coredns.go | Removed: old deploy/wait logic for pod-based CoreDNS. |
| internal/core/embedded/load.go | Removes CoreDNS image from embedded image extraction list. |
| internal/core/embedded/embedded.go | Stops embedding bin/images/coredns.tar.gz. |
| internal/core/embedded/embedded_riscv64.go | Stops embedding bin/images/coredns.tar.gz on riscv64 too. |
| cmd/kubesolo/main.go | Starts CoreDNS as a first-class service in the startup sequence instead of deploying it afterward. |
| go.mod | Adds CoreDNS library deps and updates/locks some dependency versions. |
| go.sum | Updates module checksums for the dependency graph changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…cleanup stale EndpointSlices, reconcile existing Service/EndpointSlice, reorder TLS params
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.