Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaudum/crate-sonnet
A jsonnet library for CrateDB
https://github.com/chaudum/crate-sonnet
Last synced: about 22 hours ago
JSON representation
A jsonnet library for CrateDB
- Host: GitHub
- URL: https://github.com/chaudum/crate-sonnet
- Owner: chaudum
- License: apache-2.0
- Created: 2023-07-24T18:51:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-27T16:42:58.000Z (over 1 year ago)
- Last Synced: 2023-07-27T17:55:41.761Z (over 1 year ago)
- Language: Jsonnet
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crate-sonnet
A [jsonnet](https://jsonnet.org/) mixin library to create [CrateDB](https://crate.io) Kubernetes manifests.
---
## ⚠️ Warning
**This library is not meant for production usage yet!**
The APIs are still subject to change.
---
## 🏗️ Usage
This library is intended to be used with [Tanka](https://tanka.dev) to deploy Kubernetes manifests.
First, install the library using the [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler):
```bash
jb install https://github.com/chaudum/crate-sonnet@main
```To use this library in a Tanka environment import the `crate-sonnet/mai.libsonnet` like in the following, minimal example that generates manifests for a 3 node cluster with general purpose nodes.
```jsonnet
local crate = import 'crate-sonnet/main.libsonnet';crate {
_config+:: {
namespace: 'my-cratedb-namespace',
cluster: 'my-cratedb-cluster',general_purpose_replicas: 3,
general_purpose_cpu: '1',
general_purpose_memory: '1024Mi',
general_purpose_heap: '512m',crate+: {
},
},
}
```## ⚙️ Default configuration
```jsonnet
{
_config+:: {
create_namespace: true,// versions
version: 'latest',
jmx_exporter_version: '1.0.0',// general purpose node
general_purpose_replicas: 3,
general_purpose_cpu: '8',
general_purpose_memory: '16Gi',
general_purpose_heap: '8g',
general_purpose_name: 'general-purpose',// master node
master_replicas: 3,
master_cpu: '1',
master_memory: '1Gi',
master_heap: '512m',
master_name: 'master',// data node
data_replicas: 5,
data_cpu: '8',
data_memory: '16Gi',
data_heap: '8g',
data_name: 'data',// disks
data_disks: 1,
data_pvc_size: '100Gi',
data_pvc_storage_class: 'fast',
data_pvc_mount_path: '/data',// ports
http_listen_port: 4200,
transport_listen_port: 4300,
psql_listen_port: 5432,
jmx_listen_port: 7979,
jmx_exporter_listen_port: 8080,// flags
enable_blobs: false,
enable_rolling_upgrades: false,
enable_master_data_deployment: false,
enable_jmx_api: false,
},
}
```