Skip to content

Commit

Permalink
feat: namada indexer helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
chliddle committed Dec 17, 2024
1 parent 617efc6 commit 227c7a5
Show file tree
Hide file tree
Showing 16 changed files with 1,098 additions and 0 deletions.
32 changes: 32 additions & 0 deletions charts/namada-indexer/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.

# # Ignore all .tgz files except in charts directory
# /charts/*.tgz
# !charts/*.tgz

# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/

# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~

# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# Project specific
.releaserc.js
17 changes: 17 additions & 0 deletions charts/namada-indexer/.releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const chartName = 'namada-indexer';
const chartPath = __dirname;

module.exports = {
extends: '../.github/chart-release.config.js',
tagFormat: 'namada-indexer-v${version}',
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
'@semantic-release/git',
'@semantic-release/github',
['@semantic-release/exec', {
prepareCmd: 'sed -i "s/^version:.*$/version: ${nextRelease.version}/" Chart.yaml && helm package . --version ${nextRelease.version} --app-version ${nextRelease.version} && mv *.tgz ../'
}]
]
};
9 changes: 9 additions & 0 deletions charts/namada-indexer/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: postgres-operator
repository: https://opensource.zalando.com/postgres-operator/charts/postgres-operator
version: 1.13.0
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 20.5.0
digest: sha256:8336dfdf07439b8fb5ff7e54910d67b4833b1a02394bfddb438241eb827c9a17
generated: "2024-12-11T14:02:20.240034Z"
16 changes: 16 additions & 0 deletions charts/namada-indexer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: namada-indexer
description: A Helm chart for deploying a namada indexer
type: application
version: 0.0.0-development
appVersion: "1.0"

dependencies:
- name: postgres-operator
version: "1.13.0"
repository: "https://opensource.zalando.com/postgres-operator/charts/postgres-operator"
condition: postgresOperator.install.enabled
- name: redis
version: "20.5.0"
repository: "https://charts.bitnami.com/bitnami"
condition: redis.install.enabled
166 changes: 166 additions & 0 deletions charts/namada-indexer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Namada Indexer Helm Chart

A Helm chart for deploying the Namada blockchain indexer and its components.

## Overview

This chart deploys a complete Namada indexing solution including:

- Chain indexer
- Governance indexer
- PoS indexer
- Rewards indexer
- Parameters indexer
- Transaction indexer
- Web API server
- PostgreSQL database (optional)
- Redis cache (optional)

## Prerequisites

- Helm 3.2.0+
- Ingress Controller (nginx)
- Cert-manager (optional, for TLS)

## Installation

1. Add required Helm repositories:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add zalando https://opensource.zalando.com/postgres-operator/charts/postgres-operator
helm repo update
```

2. Update chart dependencies:

```bash
helm dependency update .
helm dependency build .
```

3. Install the chart:

```bash
helm install namada-indexer . \
--create-namespace \
--namespace namada-indexer \
-f values.yaml
```

For a basic installation with default values:

```bash
helm install namada-indexer . \
--create-namespace \
--namespace namada-indexer
```

To upgrade an existing installation:

```bash
helm upgrade namada-indexer . \
--namespace namada-indexer \
-f values.yaml
```

## Configuration

### Database Configuration

#### Option 1: Built-in PostgreSQL

```yaml
postgresOperator:
install:
enabled: true
enabled: true
teamId: "namada"
volume:
size: 100Gi
storageClass: "oci-bv"
numberOfInstances: 3
```
#### Option 2: External PostgreSQL
```yaml
postgresOperator:
install:
enabled: false
enabled: false

externalPostgres:
enabled: true
host: "your-postgres-host"
port: "5432"
credentialSecret:
name: "your-postgres-secret"
```
### Redis Configuration
#### Option 1: Built-in Redis (Default)
```yaml
redis:
install:
enabled: true
enabled: true
architecture: replication
sentinel:
enabled: true
quorum: 2
replica:
replicaCount: 3
```
#### Option 2: External Redis
```yaml
redis:
install:
enabled: false
enabled: false

externalRedis:
enabled: true
host: "your-redis-host"
port: "6379"
```
### Indexer Configuration
```yaml
configmaps:
config:
data:
TENDERMINT_URL: "http://your-tendermint-rpc:26657/"

containers:
chain:
resources:
limits:
cpu: "1"
memory: "1Gi"
webserver:
ingress:
enabled: true
hosts:
- host: api.your-domain.com
```
## Dependencies
This chart depends on:
- PostgreSQL Operator (optional)
- Redis (optional)
## Contributing
[Contributing guidelines](CONTRIBUTING.md)
## License
Apache 2.0
Loading

0 comments on commit 227c7a5

Please sign in to comment.