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

namada indexer helm chart #3

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,20 @@ jobs:
with:
version: v3.10.0

- name: Run Helm lint
run: helm lint ${{ matrix.chart_dir }} -f ${{ matrix.chart_dir }}/examples/values.yaml

- name: Run Helm template
run: helm template ${{ matrix.chart_dir }} -f ${{ matrix.chart_dir }}/examples/values.yaml

- name: Install chart dependencies
run: |
if [ -f ${{ matrix.chart_dir }}/Chart.yaml ]; then
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
helm dependency update ${{ matrix.chart_dir }}
helm dependency build ${{ matrix.chart_dir }}
fi

- name: Run Helm lint
run: helm lint ${{ matrix.chart_dir }} -f ${{ matrix.chart_dir }}/values.yaml

- name: Run Helm template
run: helm template ${{ matrix.chart_dir }} -f ${{ matrix.chart_dir }}/values.yaml


File renamed without changes.
6 changes: 3 additions & 3 deletions charts/cosmos-operator-rpc-node/templates/rpc_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ spec:
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
{{ if .Values.resources }}
resources:
{{ toYaml .Values.resources | nindent 6 }}
{{ end }}
{{- toYaml .Values.resources | nindent 6 }}
{{- end }}
{{ if .Values.nodeSelectorLabel }}
nodeSelector:
{{ toYaml .Values.nodeSelectorLabel | nindent 6 }}
Expand All @@ -94,7 +94,7 @@ spec:
operator: In
values:
- {{ .Release.Name }}
topologyKey: "kubernetes.io/hostname"
topologyKey: "kubernetes.io/hostname"
{{- end }}
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
2 changes: 1 addition & 1 deletion charts/cosmos-operator-rpc-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ volumeRetainPolicy: "Retain"
resources: {}

# Note: Optional additional configuration for the pod template
initContainers: []
initContainers: {}
cosmosNodeLabels: {}
cosmosNodeAnnotations: {}
priorityClassName: ""
Expand Down
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
Loading