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

[Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) #522

Merged
merged 264 commits into from
Feb 17, 2023

Conversation

deblasis
Copy link
Contributor

Description

This PR has been extracted from #491 and is, hopefully, more digestible from a code-review and scope point of view.

Issue

Fixes #490

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

  • When nodes are added/removed from the Kubernetes Localnet, we stake/unstake them automatically
  • We achieve the above by dogfooding our own CLI inside Kubernetes

Testing

  • make develop_test
  • LocalNet w/ all of the steps outlined in the README

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have tested my changes using the available tooling
  • I have updated the corresponding CHANGELOG

If Applicable Checklist

  • I have updated the corresponding README(s); local and/or global
  • I have added tests that prove my fix is effective or that my feature works
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

Base automatically changed from issue/416-kiss-peer-discovery-light to main February 17, 2023 18:51
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

A few minor comments but otherwise LGTM!

@@ -3,3 +3,9 @@ kind: ServiceAccount
metadata:
name: debug-client-account
namespace: default
---
apiVersion: v1
Copy link
Member

Choose a reason for hiding this comment

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

NIT: You use v1 in some places and the full rbac.authorization.k8s.io/v1 in others.

I realize they both point to the stable version but figured we could be consistent.

Copy link
Contributor Author

@deblasis deblasis Feb 17, 2023

Choose a reason for hiding this comment

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

It doesn't work. One of the quirks of K8S I guess, cc: @okdas (TL;DR: it seems that Role and RoleBinding don't like apiVersion: v1)

I was getting kubernetes apply: error mapping /Role: no matches for kind "Role" in version "v1"

I stole the examples from here https://kubernetes.io/docs/reference/access-authn-authz/rbac/

@deblasis deblasis merged commit 6da420c into main Feb 17, 2023
@deblasis deblasis deleted the issue/490-cluster-manager branch February 17, 2023 22:27
bryanchriswhite added a commit that referenced this pull request Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
bryanchriswhite added a commit that referenced this pull request Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
deblasis added a commit that referenced this pull request Feb 20, 2023
…ue: #498) (#523)

## Description

This PR has been extracted from #491 and is, hopefully, more digestible
from a code-review and scope point of view.

This simply adds entrypoints and basic logic for node bootstrapping
leveraging the finite state machine

## Issue

Fixes #498 

## Type of change

Please mark the relevant option(s):

- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Ability to fetch an addressbook from a bootstrap node(s) (by
convention the first validator in LocalNet)
- It's possible to override bootstrap nodes via CLI flag

## Testing

- [x] `make develop_test`
- [x]
[LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)
w/ all of the steps outlined in the `README`

## Required Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)

---------

Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
Co-authored-by: Dmitry K <okdas@pm.me>
Co-authored-by: Dmitry Knyazev <okdas@users.noreply.github.com>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
bryanchriswhite added a commit that referenced this pull request Feb 21, 2023
* pokt/main:
  [P2P] KISS 4 - Basic nodes bootstrapping [Merge me after #522] - (Issue: #498) (#523)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client work needed to interface with the node (rpc, cli, etc..) infra Core infrastructure - not protocol related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Infra] K8S Cluster manager
3 participants