Skip to content

Commit f053f3a

Browse files
authored
Set a default ClickHouse password required by newest ClickHouse images (#17)
ClickHouse now requires a password to be set for the default user. Also address issues with golangci-lint configuration.
1 parent 46e4c30 commit f053f3a

File tree

4 files changed

+35
-28
lines changed

4 files changed

+35
-28
lines changed

.golangci.yaml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,37 @@ run:
1111
# Include test files or not.
1212
# Default: true
1313
tests: false
14-
issues:
15-
# Which files to skip: they will be analyzed, but issues from them won't be reported.
16-
# Default value is empty list,
17-
# but there is no need to include all autogenerated files,
18-
# we confidently recognize autogenerated files.
19-
# If it's not please let us know.
20-
# "/" will be replaced by current OS file path separator to properly work on Windows.
21-
exclude-files:
22-
- ".*\\.my\\.go$"
23-
- lib/bad.go
24-
# Which dirs to skip: issues from them won't be reported.
25-
# Can use regexp here: `generated.*`, regexp is applied on full path,
26-
# including the path prefix if one is set.
27-
# Default value is empty list,
28-
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
29-
# "/" will be replaced by current OS file path separator to properly work on Windows.
30-
exclude-dirs:
31-
- src/external_libs
32-
- autogenerated_by_my_lib
33-
- deploy
34-
- helpers
35-
# Enables skipping of directories:
36-
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
37-
# Default: true
38-
exclude-dirs-use-default: true
3914
# Allow multiple parallel golangci-lint instances running.
4015
# If false (default) - golangci-lint acquires file lock on start.
41-
allow-parallel-runners: false
16+
allow-parallel-runners: true
4217
# Define the Go version limit.
4318
# Mainly related to generics support since go1.18.
4419
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.23
4520
go: '1.23'
21+
22+
# Move issues section to root level
23+
issues:
24+
# Which files to skip: they will be analyzed, but issues from them won't be reported.
25+
# Default value is empty list,
26+
# but there is no need to include all autogenerated files,
27+
# we confidently recognize autogenerated files.
28+
# If it's not please let us know.
29+
# "/" will be replaced by current OS file path separator to properly work on Windows.
30+
exclude-files:
31+
- ".*\\.my\\.go$"
32+
- lib/bad.go
33+
# Which dirs to skip: issues from them won't be reported.
34+
# Can use regexp here: `generated.*`, regexp is applied on full path,
35+
# including the path prefix if one is set.
36+
# Default value is empty list,
37+
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
38+
# "/" will be replaced by current OS file path separator to properly work on Windows.
39+
exclude-dirs:
40+
- src/external_libs
41+
- autogenerated_by_my_lib
42+
- deploy
43+
- helpers
44+
# Enables skipping of directories:
45+
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
46+
# Default: true
47+
exclude-dirs-use-default: true

deploy/helm/kubenetmon-server/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ inserter:
5757
database: "default"
5858
endpoint: "clickhouse.default.svc.cluster.local:9000"
5959
username: "default"
60-
password: ""
60+
password: "clickhouse"
6161
dialTimeout: 30s
6262
maxIdleConnections: 50
6363
batchSize: 15000

integration/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
// Run this using Makefile & test/test-kind.sh so that necessary dependencies are spun up.
1515
func TestEndToEnd(t *testing.T) {
16-
conn, err := sql.Open("clickhouse", "tcp://127.0.0.1:9000?username=default")
16+
conn, err := sql.Open("clickhouse", "tcp://127.0.0.1:9000?username=default&password=clickhouse")
1717
if err != nil {
1818
t.Fatalf("Failed to connect to ClickHouse: %v", err)
1919
}

test/clickhouse-deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ spec:
1818
containers:
1919
- name: clickhouse
2020
image: clickhouse/clickhouse-server:latest
21+
env:
22+
- name: CLICKHOUSE_USER
23+
value: "default"
24+
- name: CLICKHOUSE_PASSWORD
25+
value: "clickhouse"
2126
ports:
2227
- containerPort: 8123
2328
- containerPort: 9000

0 commit comments

Comments
 (0)