Skip to content
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

feat: use k8s secrets to store node gossip and grpc tls keys and mount them #499

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

jeromy-cannon
Copy link
Contributor

Description

This pull request changes the following:

  • use k8s secrets to store node gossip and grpc tls keys and mount them

Related Issues

@jeromy-cannon jeromy-cannon self-assigned this Aug 19, 2024
Copy link
Contributor

github-actions bot commented Aug 19, 2024

Unit Test Results - Linux

  1 files   19 suites   48s ⏱️
126 tests 126 ✅ 0 💤 0 ❌
152 runs  152 ✅ 0 💤 0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

Unit Test Results - Windows

  1 files   19 suites   1m 35s ⏱️
126 tests 126 ✅ 0 💤 0 ❌
152 runs  152 ✅ 0 💤 0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Node PEM Stop Tests Coverage Report

13 tests   13 ✅  2m 30s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Node PFX Kill Tests Coverage Report

13 tests   13 ✅  3m 0s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Relay Tests Coverage Report

1 files  1 suites   2m 44s ⏱️
6 tests 6 ✅ 0 💤 0 ❌
7 runs  7 ✅ 0 💤 0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Tests Coverage Report

57 tests   57 ✅  3m 23s ⏱️
 9 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Node Local Build Tests Coverage Report

10 tests   10 ✅  2m 51s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Node Add Tests Coverage Report

22 tests   22 ✅  14m 11s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 19, 2024

E2E Mirror Node Tests Coverage Report

 1 files   1 suites   3m 49s ⏱️
13 tests 13 ✅ 0 💤 0 ❌
14 runs  14 ✅ 0 💤 0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link

codacy-production bot commented Aug 19, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for d676ba71 85.52%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d676ba7) Report Missing Report Missing Report Missing
Head commit (1220ce6) 4135 3276 79.23%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#499) 221 189 85.52%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 85.00000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 79.10%. Comparing base (c81c76a) to head (1220ce6).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/commands/node.mjs 73.80% 22 Missing ⚠️
src/core/key_manager.mjs 89.41% 9 Missing ⚠️
src/core/platform_installer.mjs 83.78% 6 Missing ⚠️
src/commands/network.mjs 96.66% 1 Missing ⚠️
src/core/k8.mjs 93.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
- Coverage   81.66%   79.10%   -2.57%     
==========================================
  Files          35       36       +1     
  Lines        4429     4934     +505     
  Branches      671      699      +28     
==========================================
+ Hits         3617     3903     +286     
- Misses        812     1031     +219     
Files with missing lines Coverage Δ
src/core/templates.mjs 73.17% <100.00%> (-3.76%) ⬇️
test/test_util.js 88.46% <100.00%> (+0.41%) ⬆️
version.mjs 100.00% <100.00%> (ø)
src/commands/network.mjs 62.18% <96.66%> (+6.63%) ⬆️
src/core/k8.mjs 88.47% <93.33%> (+1.99%) ⬆️
src/core/platform_installer.mjs 88.05% <83.78%> (+1.61%) ⬆️
src/core/key_manager.mjs 89.85% <89.41%> (-0.20%) ⬇️
src/commands/node.mjs 66.75% <73.80%> (-12.00%) ⬇️

... and 2 files with indirect coverage changes

Impacted file tree graph

@jeromy-cannon jeromy-cannon marked this pull request as ready for review August 22, 2024 15:25
@jeromy-cannon jeromy-cannon requested review from a team and leninmehedy as code owners August 22, 2024 15:25
Copy link
Contributor Author

@jeromy-cannon jeromy-cannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will wait for Jeffrey's PR to merge first, then I'll rebase his changes for node delete and node update:

JeffreyDallas
JeffreyDallas previously approved these changes Aug 23, 2024
commit 2ec418d
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Tue Aug 27 22:09:10 2024 +0100

    missed merge issue

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit c374f62
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Tue Aug 27 21:05:02 2024 +0100

    merge lint issue

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 3af4ebb
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Thu Aug 22 16:09:02 2024 +0100

    remove mirror node dependency on standard e2e tests

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit ee86b0c
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Thu Aug 22 16:08:42 2024 +0100

    remove mirror node dependency on standard e2e tests

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit c5f17e4
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Thu Aug 22 14:26:31 2024 +0100

    add comment

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 3f0d621
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 23:09:07 2024 +0100

    fixed test cases

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 85e0e85
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 20:20:25 2024 +0100

    fixed lint errors

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 854c797
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 20:13:32 2024 +0100

    updated version of fst charts

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 717a16b
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 17:40:39 2024 +0100

    fix test cases

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 40d9513
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 17:22:05 2024 +0100

    fix lint issue

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit e854a4f
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 17:17:17 2024 +0100

    remove todos, these are just local backups, so no changes needed

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 502aba0
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 17:14:50 2024 +0100

    enhance to use secret mounts

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 7c9ef3f
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Wed Aug 21 17:13:55 2024 +0100

    k8.mjs: copyFrom to handle links that is used by secret volume mounts

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit ddbbd45
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Tue Aug 20 14:00:05 2024 +0100

    node-add: updated to set the secret prior to adding the node

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 9fee4db
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 23:54:37 2024 +0100

    add the logic to write the gossip key secrets

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit e3ade3e
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 20:59:06 2024 +0100

    upgrade to v0.53.0

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 70a4716
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 20:33:56 2024 +0100

    moved taskGenerateTLSKeys from node.mjs to key_manager.mjs

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit e4f8b4d
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 20:10:58 2024 +0100

    moved taskGenerateGossipKeys from node.mjs to key_manager.mjs

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 426e8f3
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:55:15 2024 +0100

    moved copyGossipKeysToStaging from node.mjs to key_manager.mjs

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit b76fbf9
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:51:33 2024 +0100

    moved copyNodeKeysToStaging from node.mjs to key_manager.mjs

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 49b0195
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:46:13 2024 +0100

    moved key validation logic from node to keyManager

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit eeb192d
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:27:20 2024 +0100

    use local keytool instance

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 390bbf0
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:16:28 2024 +0100

    renamed node._nodeTlsKeyTaskList to node.taskGenerateTLSKeys, node._copyNodeKeys to copyNodeKeysToStaging

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit b526dd4
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:13:06 2024 +0100

    renamed node._nodeGossipKeysTaskList to node.taskGenerateGossipKeys

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 9513b0c
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 19:11:05 2024 +0100

    renamed platformInstaller.taskInstall to platformInstaller.taskSetup

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

commit 43b7e99
Author: Jeromy Cannon <jeromy@swirldslabs.com>
Date:   Mon Aug 19 18:47:01 2024 +0100

    add TODOs

    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Copy link
Contributor

github-actions bot commented Sep 3, 2024

E2E Node Update Tests Coverage Report

10 tests   7 ✅  2m 39s ⏱️
 1 suites  3 💤
 1 files    0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

E2E Node Delete Tests Coverage Report

10 tests   10 ✅  5m 46s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 1220ce6.

♻️ This comment has been updated with latest results.

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
@jeromy-cannon jeromy-cannon merged commit ede1842 into main Sep 4, 2024
41 checks passed
@jeromy-cannon jeromy-cannon deleted the 00135-mount-secrets branch September 4, 2024 07:53
swirlds-automation added a commit that referenced this pull request Sep 6, 2024
## [0.29.0](v0.28.1...v0.29.0) (2024-09-06)

### Features

* add local build support for node add command ([#509](#509)) ([a7e778f](a7e778f))
* add node delete and update command ([#500](#500)) ([9f8549a](9f8549a))
* use k8s secrets to store node gossip and grpc tls keys and mount them ([#499](#499)) ([ede1842](ede1842))

### Bug Fixes

* added missing async/await where needed ([#551](#551)) ([d8e5032](d8e5032))
* improve types in JSDoc and fix typo in '/src/commands/account.mjs' ([#507](#507)) ([74c9e2c](74c9e2c))
* need to update agreement key together with signing key ([#539](#539)) ([f9b2e21](f9b2e21))
* removed the custom ip address logic and '@hashgraph/proto' ([#518](#518)) ([c81c76a](c81c76a))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use k8s secrets to store keys and mount them
3 participants