strangelove-ventures / cosmos-operator

Cosmos Operator is a kubernetes operator for managing cosmos nodes
Apache License 2.0
75 stars 18 forks source link

Cosmos Operator

Project Status: Initial Release GoDoc Go Report Card License: Apache-2.0 Version

Cosmos Operator is a Kubernetes Operator primarily for blockchains built with the Cosmos SDK. It also supports Penumbra and other chains which use CometBFT for consensus.

The long-term vision of this operator is to allow you to "configure it and forget it".

Motivation

Kubernetes provides a foundation for creating highly-available, scalable, fault-tolerant applications. Additionally, Kubernetes provides well-known DevOps patterns and abstractions vs. traditional DevOps which often requires "re-inventing the wheel".

Furthermore, the Operator Pattern allows us to mix infrastructure with business logic, thus minimizing human intervention and human error.

Disclaimers

CosmosFullNode CRD

Status: v1, stable

CosmosFullNode is the flagship CRD. Its purpose is to deploy highly-available, fault-tolerant blockchain nodes.

The CosmosFullNode controller is like a StatefulSet for running Cosmos SDK blockchains.

A CosmosFullNode can be configured to run as an RPC node, a validator sentry, or a seed node. All configurations can be used as persistent peers.

As of this writing, Strangelove has been running CosmosFullNode in production for over a year.

Samples

Minimal example yaml

Full example yaml

Penumbra example yaml

Why not a StatefulSet?

Each pod requires different config, such as peer settings in config.toml and mounted node keys. Therefore, a blanket template as found in StatefulSet did not suffice.

Additionally, CosmosFullNode gives you more control over individual pod and pvc pairs vs. a StatefulSet to help the human operator debug and recover from situations such as a corrupted PVCs.

Support CRDs

These CRDs are part of the operator and serve to support CosmosFullNodes.

Quick Start

See the quick start guide.

Contributing

See the contributing guide.

Best Practices

See the best practices guide for CosmosFullNode.

Roadmap

Disclaimer: Strangelove has not committed to these enhancements and cannot estimate when they will be completed.

License

Copyright 2023 Strangelove Ventures LLC.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.