Skip to content

Commit 64535ab

Browse files
committed
migration: keep the old chart
1 parent 5dc3a48 commit 64535ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6899
-0
lines changed

charts/hdx-oss-v2/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: hdx-oss-v2
3+
description: A Helm chart for HyperDX OSS V2
4+
type: application
5+
version: 0.8.3
6+
appVersion: 2.7.1

charts/hdx-oss-v2/data/config.xml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<?xml version="1.0"?>
2+
<clickhouse>
3+
<user_directories>
4+
<users_xml>
5+
<path>/etc/clickhouse-server/users.xml</path>
6+
</users_xml>
7+
</user_directories>
8+
9+
<logger>
10+
<level>information</level>
11+
<console>true</console>
12+
<log remove="remove"/>
13+
<errorlog remove="remove"/>
14+
</logger>
15+
16+
<listen_host>0.0.0.0</listen_host>
17+
<http_port>{{ .Values.clickhouse.port }}</http_port>
18+
<tcp_port>{{ .Values.clickhouse.nativePort }}</tcp_port>
19+
20+
<max_connections>4096</max_connections>
21+
<keep_alive_timeout>64</keep_alive_timeout>
22+
<max_concurrent_queries>100</max_concurrent_queries>
23+
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
24+
<mark_cache_size>5368709120</mark_cache_size>
25+
26+
<path>/var/lib/clickhouse/</path>
27+
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
28+
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
29+
30+
<users_config>users.xml</users_config>
31+
<default_profile>default</default_profile>
32+
<default_database>default</default_database>
33+
<timezone>UTC</timezone>
34+
<mlock_executable>false</mlock_executable>
35+
36+
<!-- Graceful shutdown settings -->
37+
<shutdown_wait_unfinished>60</shutdown_wait_unfinished>
38+
39+
{{- if .Values.clickhouse.prometheus.enabled }}
40+
<!-- Prometheus exporter -->
41+
<prometheus>
42+
<endpoint>{{ .Values.clickhouse.prometheus.endpoint }}</endpoint>
43+
<port>{{ .Values.clickhouse.prometheus.port }}</port>
44+
<metrics>true</metrics>
45+
<events>true</events>
46+
<asynchronous_metrics>true</asynchronous_metrics>
47+
<errors>true</errors>
48+
</prometheus>
49+
{{- end }}
50+
51+
<!-- Query log. Used only for queries with setting log_queries = 1. -->
52+
<query_log>
53+
<database>system</database>
54+
<table>query_log</table>
55+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
56+
</query_log>
57+
58+
<!-- Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval. -->
59+
<metric_log>
60+
<database>system</database>
61+
<table>metric_log</table>
62+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
63+
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
64+
</metric_log>
65+
66+
<!--
67+
Asynchronous metric log contains values of metrics from
68+
system.asynchronous_metrics.
69+
-->
70+
<asynchronous_metric_log>
71+
<database>system</database>
72+
<table>asynchronous_metric_log</table>
73+
<!--
74+
Asynchronous metrics are updated once a minute, so there is
75+
no need to flush more often.
76+
-->
77+
<flush_interval_milliseconds>7000</flush_interval_milliseconds>
78+
</asynchronous_metric_log>
79+
80+
<!--
81+
OpenTelemetry log contains OpenTelemetry trace spans.
82+
-->
83+
<opentelemetry_span_log>
84+
<!--
85+
The default table creation code is insufficient, this <engine> spec
86+
is a workaround. There is no 'event_time' for this log, but two times,
87+
start and finish. It is sorted by finish time, to avoid inserting
88+
data too far away in the past (probably we can sometimes insert a span
89+
that is seconds earlier than the last span in the table, due to a race
90+
between several spans inserted in parallel). This gives the spans a
91+
global order that we can use to e.g. retry insertion into some external
92+
system.
93+
-->
94+
<engine>
95+
engine MergeTree
96+
partition by toYYYYMM(finish_date)
97+
order by (finish_date, finish_time_us, trace_id)
98+
</engine>
99+
<database>system</database>
100+
<table>opentelemetry_span_log</table>
101+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
102+
</opentelemetry_span_log>
103+
104+
105+
<!-- Crash log. Stores stack traces for fatal errors.
106+
This table is normally empty. -->
107+
<crash_log>
108+
<database>system</database>
109+
<table>crash_log</table>
110+
111+
<partition_by />
112+
<flush_interval_milliseconds>1000</flush_interval_milliseconds>
113+
</crash_log>
114+
115+
<!-- Profiling on Processors level. -->
116+
<processors_profile_log>
117+
<database>system</database>
118+
<table>processors_profile_log</table>
119+
120+
<partition_by>toYYYYMM(event_date)</partition_by>
121+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
122+
</processors_profile_log>
123+
124+
<!-- Uncomment if use part log.
125+
Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).-->
126+
<part_log>
127+
<database>system</database>
128+
<table>part_log</table>
129+
<partition_by>toYYYYMM(event_date)</partition_by>
130+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
131+
</part_log>
132+
133+
<!-- Trace log. Stores stack traces collected by query profilers.
134+
See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
135+
<trace_log>
136+
<database>system</database>
137+
<table>trace_log</table>
138+
139+
<partition_by>toYYYYMM(event_date)</partition_by>
140+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
141+
</trace_log>
142+
143+
<!-- Query thread log. Has information about all threads participated in query execution.
144+
Used only for queries with setting log_query_threads = 1. -->
145+
<query_thread_log>
146+
<database>system</database>
147+
<table>query_thread_log</table>
148+
<partition_by>toYYYYMM(event_date)</partition_by>
149+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
150+
</query_thread_log>
151+
152+
<!-- Query views log. Has information about all dependent views associated with a query.
153+
Used only for queries with setting log_query_views = 1. -->
154+
<query_views_log>
155+
<database>system</database>
156+
<table>query_views_log</table>
157+
<partition_by>toYYYYMM(event_date)</partition_by>
158+
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
159+
</query_views_log>
160+
161+
<distributed_ddl>
162+
<path>/clickhouse/task_queue/ddl</path>
163+
</distributed_ddl>
164+
165+
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
166+
</clickhouse>

charts/hdx-oss-v2/data/users.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0"?>
2+
<clickhouse>
3+
<profiles>
4+
<default>
5+
<max_memory_usage>10000000000</max_memory_usage>
6+
<use_uncompressed_cache>0</use_uncompressed_cache>
7+
<load_balancing>in_order</load_balancing>
8+
<log_queries>1</log_queries>
9+
</default>
10+
<readonly>
11+
<readonly>2</readonly>
12+
</readonly>
13+
</profiles>
14+
15+
<users>
16+
<default>
17+
<password></password>
18+
<profile>default</profile>
19+
<networks>
20+
<ip>::1</ip>
21+
<ip>127.0.0.1</ip>
22+
</networks>
23+
<quota>default</quota>
24+
</default>
25+
<app>
26+
<password>{{ .Values.clickhouse.config.users.appUserPassword }}</password>
27+
<networks>
28+
{{- if .Values.clickhouse.config.clusterCidrs }}
29+
{{- range .Values.clickhouse.config.clusterCidrs }}
30+
<ip>{{ . }}</ip>
31+
{{- end }}
32+
{{- else }}
33+
<ip>10.0.0.0/8</ip> <!-- Default fallback -->
34+
{{- end }}
35+
<host_regexp>.*\.svc\.cluster\.local$</host_regexp>
36+
</networks>
37+
<profile>readonly</profile>
38+
<quota>default</quota>
39+
<grants>
40+
<query>GRANT SHOW ON *.*</query>
41+
<query>GRANT SELECT ON system.*</query>
42+
<query>GRANT SELECT ON default.*</query>
43+
</grants>
44+
</app>
45+
<{{ .Values.otel.clickhouseUser | default .Values.clickhouse.config.users.otelUserName }}>
46+
<password>{{ .Values.otel.clickhousePassword | default .Values.clickhouse.config.users.otelUserPassword }}</password>
47+
<networks>
48+
{{- if .Values.clickhouse.config.clusterCidrs }}
49+
{{- range .Values.clickhouse.config.clusterCidrs }}
50+
<ip>{{ . }}</ip>
51+
{{- end }}
52+
{{- else }}
53+
<ip>10.0.0.0/8</ip> <!-- Default fallback -->
54+
{{- end }}
55+
<host_regexp>.*\.svc\.cluster\.local$</host_regexp>
56+
</networks>
57+
<profile>default</profile>
58+
<quota>default</quota>
59+
<grants>
60+
<query>GRANT SELECT,INSERT,CREATE,SHOW ON default.*</query>
61+
</grants>
62+
</{{ .Values.otel.clickhouseUser | default .Values.clickhouse.config.users.otelUserName }}>
63+
</users>
64+
65+
<quotas>
66+
<default>
67+
<interval>
68+
<duration>3600</duration>
69+
<queries>0</queries>
70+
<errors>0</errors>
71+
<result_rows>0</result_rows>
72+
<read_rows>0</read_rows>
73+
<execution_time>0</execution_time>
74+
</interval>
75+
</default>
76+
</quotas>
77+
</clickhouse>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
HyperDX has been installed.
2+
3+
Note: By default, this chart also installs clickhouse and the otel-collector. However, for production,
4+
it is recommended that you use the clickhouse and otel-collector operators instead.
5+
6+
To disable clickhouse and otel-collector, set the following values:
7+
helm install myrelease <chart-name-or-path> --set clickhouse.enabled=false --set clickhouse.persistence.enabled=false --set otel.enabled=false
8+
9+
{{- if .Values.hyperdx.ingress.enabled }}
10+
Application URL: {{ if .Values.hyperdx.ingress.tls.enabled }}https{{ else }}http{{ end }}://{{ .Values.hyperdx.ingress.host }}
11+
{{- else }}
12+
Application Access:
13+
For security, the service uses ClusterIP and is not exposed externally by default.
14+
Choose one of the following secure access methods:
15+
16+
1. Enable Ingress with TLS (Recommended for Production):
17+
helm upgrade {{ .Release.Name }} <chart-name-or-path> \
18+
--set hyperdx.ingress.enabled=true \
19+
--set hyperdx.ingress.host=your-domain.com \
20+
--set hyperdx.ingress.tls.enabled=true
21+
22+
2. Port Forward (Development/Testing):
23+
kubectl port-forward svc/{{ include "hdx-oss.fullname" . }}-app {{ .Values.hyperdx.appPort }}:{{ .Values.hyperdx.appPort }}
24+
Then access: http://localhost:{{ .Values.hyperdx.appPort }}
25+
26+
Note: This application handles sensitive telemetry data and should not be exposed
27+
directly to the internet without proper authentication and encryption.
28+
{{- end }}
29+
30+
To verify the deployment status, run:
31+
kubectl get pods -l "app.kubernetes.io/name={{ include "hdx-oss.name" . }}"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "hdx-oss.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
*/}}
11+
{{- define "hdx-oss.fullname" -}}
12+
{{- if .Values.fullnameOverride }}
13+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
14+
{{- else }}
15+
{{- $name := default .Chart.Name .Values.nameOverride }}
16+
{{- if contains $name .Release.Name }}
17+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
18+
{{- else }}
19+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
20+
{{- end }}
21+
{{- end }}
22+
{{- end }}
23+
24+
{{/*
25+
Create chart name and version as used by the chart label.
26+
*/}}
27+
{{- define "hdx-oss.chart" -}}
28+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
29+
{{- end }}
30+
31+
{{/*
32+
Common labels
33+
*/}}
34+
{{- define "hdx-oss.labels" -}}
35+
helm.sh/chart: {{ include "hdx-oss.chart" . }}
36+
{{ include "hdx-oss.selectorLabels" . }}
37+
{{- if .Chart.AppVersion }}
38+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
39+
{{- end }}
40+
app.kubernetes.io/managed-by: {{ .Release.Service }}
41+
{{- end }}
42+
43+
{{/*
44+
Selector labels
45+
*/}}
46+
{{- define "hdx-oss.selectorLabels" -}}
47+
app.kubernetes.io/name: {{ include "hdx-oss.name" . }}
48+
app.kubernetes.io/instance: {{ .Release.Name }}
49+
{{- end }}

0 commit comments

Comments
 (0)