Skip to content
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
6 changes: 6 additions & 0 deletions charts/opentsdb/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: zookeeper
repository: https://helm.zop.dev
version: v0.0.2
digest: sha256:a018c5a882594e93bbd6ac21475d94b207543d537635b505ec5a3901c5c454e9
generated: "2026-03-26T19:29:35.19956+05:30"
8 changes: 6 additions & 2 deletions charts/opentsdb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ apiVersion: v2
appVersion: "1.0"
description: Helm chart for deploying opentsdb
name: opentsdb
version: 0.0.3
version: v0.0.4
icon: "https://storage.googleapis.com/zopdev-test-bucket/zop/files/originals/20241122/42ea9c53-055c-4441-8438-95d639dfc2f4-2086220.png"
maintainers:
- name: ZopDev
url: zop.dev
annotations:
type: datasource
type: datasource
dependencies:
- name: zookeeper
version: "v0.0.2"
repository: "https://helm.zop.dev"
58 changes: 31 additions & 27 deletions charts/opentsdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,20 @@ See [Helm Uninstall Documentation](https://helm.sh/docs/helm/helm_uninstall/) fo

Below is a summary of configurable parameters for the OpenTSDB Helm chart:

| **Input** | **Type** | **Description** | **Default** |
|--------------------------|-----------|--------------------------------------------------------------------|-----------------------------------|
| `replicaCount` | `integer` | Number of replicas for the OpenTSDB StatefulSet. | `1` |
| `image.opentsdb` | `string` | Docker image and tag for the OpenTSDB container. | `petergrace/opentsdb-docker:latest` |
| `image.pullPolicy` | `string` | Image pull policy for the OpenTSDB container. | `IfNotPresent` |
| `resources.requests.cpu` | `string` | Minimum CPU resources required by the OpenTSDB container. | `"100m"` |
| `resources.requests.memory` | `string` | Minimum memory resources required by the OpenTSDB container. | `"256M"` |
| `resources.limits.cpu` | `string` | Maximum CPU resources the OpenTSDB container can use. | `"1000m"` |
| `resources.limits.memory`| `string` | Maximum memory resources the OpenTSDB container can use. | `"1Gi"` |
| `diskSize` | `string` | Size of the persistent volume for OpenTSDB data storage. | `"10Gi"` |
| `updateStrategy.type` | `string` | Update strategy for the OpenTSDB StatefulSet. | `RollingUpdate` |
| `opentsdb_port` | `integer` | Port on which OpenTSDB listens for incoming connections. | `4242` |
| **Input** | **Type** | **Description** | **Default** |
|--------------------------------|-----------|-------------------------------------------------------------------------|----------------|
| `version` | `string` | Docker image tag for the OpenTSDB container. | `"v0.0.1"` |
| `resources.requests.cpu` | `string` | Minimum CPU resources required by the OpenTSDB container. | `"500m"` |
| `resources.requests.memory` | `string` | Minimum memory resources required by the OpenTSDB container. | `"1000Mi"` |
| `resources.limits.cpu` | `string` | Maximum CPU resources the OpenTSDB container can use. | `"1000m"` |
| `resources.limits.memory` | `string` | Maximum memory resources the OpenTSDB container can use. | `"2000Mi"` |
| `diskSize` | `string` | Size of the persistent volume for OpenTSDB data storage. | `"10Gi"` |
| `zookeeper.replicaCount` | `integer` | Number of replicas for the Zookeeper StatefulSet. | `1` |
| `zookeeper.diskSize` | `string` | Size of the persistent volume for Zookeeper data storage. | `"10Gi"` |
| `zookeeper.resources.requests.cpu` | `string` | Minimum CPU resources required by the Zookeeper container. | `"100m"` |
| `zookeeper.resources.requests.memory` | `string` | Minimum memory resources required by the Zookeeper container. | `"500Mi"` |
| `zookeeper.resources.limits.cpu` | `string` | Maximum CPU resources the Zookeeper container can use. | `"500m"` |
| `zookeeper.resources.limits.memory` | `string` | Maximum memory resources the Zookeeper container can use. | `"1000Mi"` |

You can override these values in a `values.yaml` file or via the command line during installation.

Expand All @@ -86,18 +88,28 @@ You can override these values in a `values.yaml` file or via the command line du
### Example `values.yaml` File

```yaml
version: 2.2
version: "v0.0.1"

# Resource configuration
resources:
requests:
cpu: "100m"
memory: "256M"
cpu: "500m"
memory: "1000Mi"
limits:
cpu: "1000m"
memory: "1Gi"
memory: "2000Mi"

diskSize: "10Gi"

zookeeper:
replicaCount: 1
diskSize: "10Gi"
resources:
requests:
cpu: "100m"
memory: "500Mi"
limits:
cpu: "500m"
memory: "1000Mi"
```

Apply the configuration file during installation:
Expand All @@ -114,26 +126,18 @@ helm install my-opentsdb zopdev/opentsdb -f values.yaml
- **Custom Resource Allocation:** Define resource requests and limits for CPU and memory to suit workload requirements.
- **Persistent Storage:** Ensure data persistence using configurable persistent volumes.
- **Rolling Updates:** Apply changes to the StatefulSet with zero downtime using the `RollingUpdate` strategy.
- **Bundled Zookeeper:** Includes the ZopDev Zookeeper chart as a dependency — no external Zookeeper setup required.

---

## Advanced Usage

### Persistent Volume Configuration

Customize the persistent volume size and storage class for OpenTSDB data:
Customize the persistent volume size for OpenTSDB data:

```yaml
diskSize: "50Gi"
storageClass: "high-performance"
```

### Network Configuration

Specify the OpenTSDB port and integrate with other services:

```yaml
opentsdb_port: 8080
```

---
Expand Down
55 changes: 55 additions & 0 deletions charts/opentsdb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "opentsdb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "opentsdb.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "opentsdb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "opentsdb.labels" -}}
helm.sh/chart: {{ include "opentsdb.chart" . }}
{{ include "opentsdb.selectorLabels" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "opentsdb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "opentsdb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Resolve the Zookeeper quorum address.
Derives from the release name + zookeeper subchart name.
*/}}
{{- define "opentsdb.zkQuorum" -}}
{{- printf "%s-zookeeper" .Release.Name }}
{{- end }}
63 changes: 59 additions & 4 deletions charts/opentsdb/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,63 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-opentsdb-configmap"
namespace: {{ .Release.Namespace | quote }}
name: {{ include "opentsdb.fullname" . }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "opentsdb.labels" . | nindent 4 }}
data:
OPENTSDB_HOST: {{ $.Release.Name }}-opentsdb
OPENTSDB_PORT: "4242"
opentsdb.conf: |
tsd.network.port = 4242
tsd.http.staticroot = /usr/local/share/opentsdb/static/
tsd.http.cachedir = /tmp/opentsdb
tsd.core.plugin_path = /opentsdb-plugins
tsd.core.auto_create_metrics = true
tsd.storage.hbase.zk_quorum = {{ include "opentsdb.zkQuorum" . }}
tsd.storage.hbase.zk_basedir = /hbase
tsd.storage.enable = true

hbase-site.xml: |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///data/hbase</value>
</property>
<property>
<name>hbase.zookeeper.dns.interface</name>
<value>default</value>
</property>
<property>
<name>hbase.regionserver.dns.interface</name>
<value>default</value>
</property>
<property>
<name>hbase.master.dns.interface</name>
<value>default</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>{{ include "opentsdb.zkQuorum" . }}</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
<!-- WAL Cleanup - fixes "WALs outstanding" warnings -->
<property>
<name>hbase.master.logcleaner.ttl</name>
<value>300000</value>
</property>
<property>
<name>hbase.master.cleaner.interval</name>
<value>300000</value>
</property>
</configuration>
10 changes: 10 additions & 0 deletions charts/opentsdb/templates/connection-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-opentsdb-configmap
namespace: {{ .Release.Namespace }}
labels:
{{- include "opentsdb.labels" . | nindent 4 }}
data:
OPENTSDB_HOST: {{ include "opentsdb.fullname" . }}
OPENTSDB_PORT: "4242"
18 changes: 18 additions & 0 deletions charts/opentsdb/templates/headless-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "opentsdb.fullname" . }}-headless
namespace: {{ .Release.Namespace }}
labels:
{{- include "opentsdb.labels" . | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
name: http
selector:
{{- include "opentsdb.selectorLabels" . | nindent 4 }}
18 changes: 10 additions & 8 deletions charts/opentsdb/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ $.Release.Name }}-opentsdb
namespace: {{ .Release.Namespace | quote }}
name: {{ include "opentsdb.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "opentsdb.labels" . | nindent 4 }}
spec:
selector:
app.kubernetes.io/part-of: opentsdb
app: {{ $.Release.Name }}-opentsdb
type: ClusterIP
type: {{ .Values.service.type }}
sessionAffinity: None
ports:
- protocol: TCP
port: 4242
targetPort: 4242
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
selector:
{{- include "opentsdb.selectorLabels" . | nindent 4 }}
Loading
Loading