Repository navigation
keadm: honor --certPath when generating edgecore.yaml - #7362
Open
Thanatos9404 wants to merge 1 commit into
Open
Thanatos9404 wants to merge 1 commit into
Thanatos9404 wants to merge 1 commit into
Conversation
Collaborator
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Collaborator
|
Welcome @Thanatos9404! It looks like this is your first PR to kubeedge/kubeedge 🎉 |
keadm join parses --certPath, but neither createEdgeConfigFiles (Linux and Windows) reads it. The certificate and key paths in edgecore.yaml keep their defaults, edgecore stores the certificate it gets from cloudcore there, and the wait after starting edgecore polls the default paths too. Point every module that uses the edge certificate at <certPath>/server.crt and <certPath>/server.key: edgeHub, edgeStream (which loads the same key pair for the tunnel), the eventBus MQTT TLS settings and the metaServer client settings. DefaultCertPath is already the directory that holds those two files, so the default config does not change. The CA files keep their own path, since by default the CA lives outside the certs directory, and --set still takes precedence over --certPath. edgecore resolves a relative path against its own working directory, so a relative --certPath is made absolute first. The flag help now says what the directory holds and where the CA file goes. Signed-off-by: Yashvardhan Thanvi <[email protected]>
Thanatos9404
force-pushed
the
fix/keadm-join-certpath
branch
from
October 19, 2026 08:35
dafb867 to
a2ce11e
Compare
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.
What type of PR is this?
/kind bug
What this PR does / why we need it:
keadm join --certPathis parsed but never used when edgecore.yaml is generated (createEdgeConfigFilesinjoin_others.goandjoin_windows.go), so the certificate and key paths always keep their defaults.Now
--certPathsets the certificate to<certPath>/server.crtand the key to<certPath>/server.keyfor edgeHub, edgeStream, eventBus TLS and metaServer, the modules that use that key pair by default. A relative path is made absolute,--setstill takes precedence, and a join without--certPathwrites the same config as before. The CA file stays at its default and can be moved with--set.This builds on #4926 by @Shelley-BaoYue but keeps the existing directory layout instead of changing
DefaultCertPath. Happy to switch to the #4926 layout if you prefer it.Which issue(s) this PR fixes:
Fixes #4866
#2974 reports the same problem.
Special notes for your reviewer:
The new
join_test.gochecks the generated paths for the default, an empty, a custom and a relative cert path, plus a--setoverride. The custom, relative and--setcases fail on master and pass with this change.Known limitation:
keadm resetdoesn't remove a custom cert directory, so delete the oldserver.crt/server.keybefore re-joining with the same--certPath. I can handle that in a follow-up.Does this PR introduce a user-facing change?: