Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add data retention methods for in-memory Clickhouse deployment (#3244)
This PR updates the Clickhouse in memory deployment with restricted memory storage. It adds the TTL mechanism and an independent monitor as strategies to ensure data retention. The TTL mechanism is provided by Clickhouse MergeTree Engine which deleted expired data periodically. The monitor is designed to deal with the burst in the data insertion. It runs periodically by a Kubernetes cronjob, which deletes records when the Clickhouse server memory usage is larger than the threshold. Signed-off-by: Yanjun Zhou <zhouya@vmware.com>
- Loading branch information
Showing
16 changed files
with
1,411 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
build/images/flow-visibility/Dockerfile.clickhouse-monitor.ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARG GO_VERSION | ||
FROM golang:${GO_VERSION} as clickhouse-monitor-build | ||
|
||
COPY . /antrea | ||
WORKDIR /antrea/plugins/flow-visibility/clickhouse-monitor | ||
|
||
# Statically links clickhouse-monitor-plugin binary. | ||
RUN CGO_ENABLED=0 make clickhouse-monitor-plugin | ||
|
||
FROM scratch | ||
|
||
LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>" | ||
LABEL description="A docker image to deploy the ClickHouse monitor plugin." | ||
|
||
ENV USER root | ||
|
||
COPY --from=clickhouse-monitor-build /antrea/plugins/flow-visibility/clickhouse-monitor/* / | ||
|
||
ENTRYPOINT ["/clickhouse-monitor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.