-
Notifications
You must be signed in to change notification settings - Fork 388
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
Signed-off-by: Yanjun Zhou <zhouya@vmware.com>
- Loading branch information
Showing
16 changed files
with
1,329 additions
and
14 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
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 to make sure it can run in scratch. | ||
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"] |
Large diffs are not rendered by default.
Oops, something went wrong.
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
42 changes: 42 additions & 0 deletions
42
build/yamls/flow-visibility/patches/dev/imagePullPolicy.yml
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,42 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
labels: | ||
app: clickhouse-monitor | ||
name: clickhouse-monitor | ||
spec: | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: clickhouse-monitor | ||
imagePullPolicy: IfNotPresent | ||
# kustomize has bugs in patching cronjob before version 4.3.0 which leads to | ||
# a fields-missing problem if the fields below are not present in the patch file | ||
# The fields below can be deleted after kustomize is upgraded to version 4.3.0 | ||
# or later in verify-kustomize.sh | ||
image: flow-visibility-clickhouse-monitor | ||
env: | ||
- name: CH_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: clickhouse-secret | ||
key: username | ||
- name: CH_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: clickhouse-secret | ||
key: password | ||
- name: SVC_HOST | ||
value: "clickhouse-clickhouse.flow-visibility.svc.cluster.local" | ||
- name: SVC_PORT | ||
value: "9000" | ||
- name: TABLE_NAME | ||
value: "default.flows" | ||
- name: MV_NAMES | ||
value: "default.flows_pod_view default.flows_node_view default.flows_policy_view" | ||
- name: NAMESPACE | ||
value: "flow-visibility" | ||
- name: MONITOR_LABEL | ||
value: "app=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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# placeholder |
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.