Skip to content

Commit 2394108

Browse files
authored
Merge pull request #18 from ddelnano/k8sstormcenter/add-clickhouse-source-and-sink-nodes
K8sstormcenter/add clickhouse source and sink nodes
2 parents 2b7963a + 23da8a8 commit 2394108

75 files changed

Lines changed: 19852 additions & 1346 deletions

File tree

Some content is hidden

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

bazel/container_images.bzl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17-
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
17+
load("@io_bazel_rules_docker//container:container.bzl", "container_pull", "container_image", "container_layer")
1818

1919
# When adding an image here, first add it to scripts/regclient/regbot_deps.yaml
2020
# Once that is in, trigger the github workflow that mirrors the required image
@@ -367,3 +367,12 @@ def stirling_test_images():
367367
repository = "golang_1_22_grpc_server_with_buildinfo",
368368
digest = "sha256:67adba5e8513670fa37bd042862e7844f26239e8d2997ed8c3b0aa527bc04cc3",
369369
)
370+
371+
# ClickHouse server image for testing.
372+
# clickhouse/clickhouse-server:25.7-alpine
373+
container_pull(
374+
name = "clickhouse_server_base_image",
375+
registry = "docker.io",
376+
repository = "clickhouse/clickhouse-server",
377+
digest = "sha256:60c53a520a1caad6555eb6772a8a9c91bb09774c1c7ec87e3371ea3da254eeab",
378+
)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2018- The Pixie Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
17+
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
18+
19+
licenses(["notice"])
20+
21+
exports_files(["LICENSE"])
22+
23+
filegroup(
24+
name = "all",
25+
srcs = glob(["**"]),
26+
)
27+
28+
cmake(
29+
name = "clickhouse_cpp",
30+
build_args = [
31+
"--", # <- Pass remaining options to the native tool.
32+
"-j`nproc`",
33+
"-l`nproc`",
34+
],
35+
cache_entries = {
36+
"BUILD_BENCHMARK": "OFF",
37+
"BUILD_TESTS": "OFF",
38+
"BUILD_SHARED_LIBS": "OFF",
39+
"CMAKE_BUILD_TYPE": "Release",
40+
"WITH_OPENSSL": "OFF", # Disable OpenSSL for now
41+
"WITH_SYSTEM_ABSEIL": "OFF", # Use bundled abseil
42+
"WITH_SYSTEM_LZ4": "OFF", # Use bundled for now
43+
"WITH_SYSTEM_CITYHASH": "OFF", # Use bundled for now
44+
"WITH_SYSTEM_ZSTD": "OFF", # Use bundled for now
45+
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
46+
},
47+
lib_source = ":all",
48+
out_static_libs = [
49+
"libclickhouse-cpp-lib.a",
50+
"liblz4.a",
51+
"libcityhash.a",
52+
"libzstdstatic.a",
53+
"libabsl_int128.a",
54+
],
55+
targets = [
56+
"clickhouse-cpp-lib",
57+
"lz4",
58+
"cityhash",
59+
"zstdstatic",
60+
"absl_int128",
61+
],
62+
visibility = ["//visibility:public"],
63+
working_directory = "",
64+
)

bazel/repositories.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def _cc_deps():
147147
_bazel_repo("com_github_ariafallah_csv_parser", build_file = "//bazel/external:csv_parser.BUILD")
148148
_bazel_repo("com_github_arun11299_cpp_jwt", build_file = "//bazel/external:cpp_jwt.BUILD")
149149
_bazel_repo("com_github_cameron314_concurrentqueue", build_file = "//bazel/external:concurrentqueue.BUILD")
150+
_bazel_repo("com_github_clickhouse_clickhouse_cpp", build_file = "//bazel/external:clickhouse_cpp.BUILD")
150151
_bazel_repo("com_github_cyan4973_xxhash", build_file = "//bazel/external:xxhash.BUILD")
151152
_bazel_repo("com_github_nlohmann_json", build_file = "//bazel/external:nlohmann_json.BUILD")
152153
_bazel_repo("com_github_packetzero_dnsparser", build_file = "//bazel/external:dnsparser.BUILD")

bazel/repository_locations.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ REPOSITORY_LOCATIONS = dict(
7171
strip_prefix = "concurrentqueue-1.0.3",
7272
urls = ["https://github.com/cameron314/concurrentqueue/archive/refs/tags/v1.0.3.tar.gz"],
7373
),
74+
com_github_clickhouse_clickhouse_cpp = dict(
75+
sha256 = "1029a1bb0da8a72db1662a0418267742e66c82bb3e6b0ed116623a2fa8c65a58",
76+
strip_prefix = "clickhouse-cpp-22dc9441cd807156511c6dcf97b1b878bd663d77",
77+
urls = ["https://github.com/ClickHouse/clickhouse-cpp/archive/22dc9441cd807156511c6dcf97b1b878bd663d77.tar.gz"],
78+
),
7479
com_github_cyan4973_xxhash = dict(
7580
sha256 = "952ebbf5b11fbf59ae5d760a562d1e9112278f244340ad7714e8556cbe54f7f7",
7681
strip_prefix = "xxHash-0.7.3",

k8s/cloud/dev/plugin_db_updater_job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ spec:
6262
name: pl-service-config
6363
key: PL_PLUGIN_SERVICE
6464
- name: PL_PLUGIN_REPO
65-
value: "pixie-io/pixie-plugin"
65+
value: "k8sstormcenter/pixie-plugin"
6666
- name: PL_GH_API_KEY
6767
valueFrom:
6868
secretKeyRef:

k8s/cloud/overlays/plugin_job/plugin_job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
name: pl-service-config
5656
key: PL_PLUGIN_SERVICE
5757
- name: PL_PLUGIN_REPO
58-
value: "pixie-io/pixie-plugin"
58+
value: "k8sstormcenter/pixie-plugin"
5959
# The alpine based image contains a shell and is needed for this command to work.
6060
# yamllint disable-line rule:line-length
6161
- image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.11.3-alpine@sha256:4885fd3e6362ba22abff1804a7f5e75cec5fafbeb4e41be8b0059ecad94a16f1

0 commit comments

Comments
 (0)