Skip to content

Commit

Permalink
updated volume
Browse files Browse the repository at this point in the history
Signed-off-by: Dhruv-J <[email protected]>
  • Loading branch information
Dhruv-J committed Jul 12, 2023
1 parent af2fa52 commit d744522
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
6 changes: 6 additions & 0 deletions build/charts/theia/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
- name: clickhouse-storage-volume
mountPath: /var/lib/clickhouse
{{- end }}
- name: clickhouse-monitor-coverage-volume
mountPath: /clickhouse-monitor-coverage
env:
- name: THEIA_VERSION
value: {{ $Chart.Version }}
Expand Down Expand Up @@ -90,6 +92,10 @@
medium: Memory
sizeLimit: {{ $clickhouse.storage.size }}
{{- end }}
- hostPath:
path: /var/log/coverage
type: DirectoryOrCreate
name: clickhouse-monitor-coverage-volume
{{- end }}


Expand Down
7 changes: 6 additions & 1 deletion build/yamls/flow-visibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6960,7 +6960,6 @@ spec:
- mountPath: /var/log/antrea/theia-manager
name: host-var-log-antrea-theia-manager
nodeSelector:
kubernetes.io/arch: amd64
kubernetes.io/os: linux
serviceAccountName: theia-manager
volumes:
Expand Down Expand Up @@ -7223,6 +7222,8 @@ spec:
name: clickhouse-configmap-volume
- mountPath: /var/lib/clickhouse
name: clickhouse-storage-volume
- mountPath: /clickhouse-monitor-coverage
name: clickhouse-monitor-coverage-volume
- env:
- name: CLICKHOUSE_USERNAME
valueFrom:
Expand Down Expand Up @@ -7288,6 +7289,10 @@ spec:
medium: Memory
sizeLimit: 8Gi
name: clickhouse-storage-volume
- hostPath:
path: /var/log/coverage
type: DirectoryOrCreate
name: clickhouse-monitor-coverage-volume
serviceTemplates:
- name: service-template
spec:
Expand Down
4 changes: 2 additions & 2 deletions ci/kind/test-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ function run_test {
sed -i -e "s/activeFlowExportTimeout: \"5s\"/activeFlowExportTimeout: \"2s\"/g" $TMP_DIR/antrea.yml
sed -i -e "s/idleFlowExportTimeout: \"15s\"/idleFlowExportTimeout: \"1s\"/g" $TMP_DIR/antrea.yml

# curl -o $TMP_DIR/flow-aggregator.yml https://raw.githubusercontent.com/antrea-io/antrea/main/build/yamls/flow-aggregator.yml
cp ~/go/src/github.com/antrea/build/yamls/flow-aggregator.yml $TMP_DIR/flow-aggregator.yml
curl -o $TMP_DIR/flow-aggregator.yml https://raw.githubusercontent.com/antrea-io/antrea/main/build/yamls/flow-aggregator.yml
#cp ~/go/src/github.com/antrea/build/yamls/flow-aggregator.yml $TMP_DIR/flow-aggregator.yml
sed -i -e "s|image: projects.registry.vmware.com/antrea/flow-aggregator:latest|image: antrea/flow-aggregator:latest|g" $TMP_DIR/flow-aggregator.yml
perl -i -p0e 's/ # Enable is the switch to enable exporting flow records to ClickHouse.\n enable: false/ # Enable is the switch to enable exporting flow records to ClickHouse.\n enable: true/' $TMP_DIR/flow-aggregator.yml
sed -i -e "s/ activeFlowRecordTimeout: 60s/ activeFlowRecordTimeout: 3500ms/g" $TMP_DIR/flow-aggregator.yml
Expand Down
12 changes: 1 addition & 11 deletions plugins/clickhouse-monitor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func sanitizeIdentifier(identifier string) (string, error) {
}

func main() {
klog.InfoS("Starting main ASDF")
if err := loadEnvVariables(); err != nil {
klog.ErrorS(err, "Error when loading environment variables")
}
Expand All @@ -101,16 +100,8 @@ func main() {
klog.ErrorS(err, "Error when connecting to ClickHouse")
os.Exit(1)
}
// stopCh := signals.RegisterSignalHandlers()
klog.InfoS("----------registered stop handler")
checkStorageCondition(connect)
startMonitor(connect)
klog.InfoS("----------started monitor")
// <-stopCh
klog.InfoS("----------reached into main")
return
// fmt.Println("Stopping clickhouse Monitor")
// os.Exit(1)
}

func startMonitor(connect *sql.DB) {
Expand All @@ -133,9 +124,8 @@ func startMonitor(connect *sql.DB) {
}
<-stopCh
klog.InfoS("Stopping ClickHouse Monitor")
return
os.Exit(0)
}, monitorExecInterval)
klog.InfoS("----------reached out of the loop")
return
}

Expand Down

0 comments on commit d744522

Please sign in to comment.