Skip to content

Commit

Permalink
Add New gRPC Options and Add Reconnect Logic for connection Pool
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
kpango committed Oct 8, 2024
1 parent 83de9c8 commit 466b08c
Show file tree
Hide file tree
Showing 36 changed files with 590 additions and 144 deletions.
39 changes: 39 additions & 0 deletions charts/vald/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,31 @@ defaults:
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.header_table_size", "type": "integer"}
# defaults.server_config.servers.grpc.server.grpc.header_table_size -- gRPC server header table size
header_table_size: 0
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.max_concurrent_streams", "type": "integer"}
# defaults.server_config.servers.grpc.server.grpc.max_concurrent_streams -- gRPC server max concurrent stream size
max_concurrent_streams: 0
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.num_stream_workers", "type": "integer"}
# defaults.server_config.servers.grpc.server.grpc.num_stream_workers -- gRPC server number of stream workers
num_stream_workers: 0
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.interceptors", "type": "array", "items": {"type": "string", "enum": ["RecoverInterceptor", "AccessLogInterceptor", "TraceInterceptor", "MetricInterceptor"]}}
# defaults.server_config.servers.grpc.server.grpc.interceptors -- gRPC server interceptors
interceptors:
- "RecoverInterceptor"
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.shared_write_buffer", "type": "boolean"}
# defaults.server_config.servers.grpc.server.grpc.shared_write_buffer -- gRPC server write buffer sharing option
shared_write_buffer: false
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.wait_for_handlers", "type": "boolean"}
# defaults.server_config.servers.grpc.server.grpc.wait_for_handlers -- gRPC server wait for handlers when stop
wait_for_handlers: true
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.enable_reflection", "type": "boolean"}
# defaults.server_config.servers.grpc.server.grpc.enable_reflection -- gRPC server reflection option
enable_reflection: true
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.enable_admin", "type": "boolean"}
# defaults.server_config.servers.grpc.server.grpc.enable_admin -- gRPC server admin option
enable_admin: true
# @schema {"name": "defaults.server_config.servers.grpc.server.grpc.enable_channelz", "type": "boolean"}
# defaults.server_config.servers.grpc.server.grpc.enable_channelz -- gRPC server channelz option
enable_channelz: true
# @schema {"name": "defaults.server_config.servers.grpc.server.socket_option", "alias": "socket_option"}
socket_option:
# defaults.server_config.servers.grpc.server.socket_option.reuse_port -- server listen socket option for reuse_port functionality
Expand Down Expand Up @@ -738,6 +753,9 @@ defaults:
# @schema {"name": "defaults.grpc.client.max_send_msg_size", "type": "integer"}
# defaults.grpc.client.call_option.max_send_msg_size -- gRPC client call option max send message size
max_send_msg_size: 0
# @schema {"name": "defaults.grpc.client.content_subtype", "type": "integer"}
# defaults.grpc.client.call_option.content_subtype -- gRPC client call option content subtype
content_subtype: 0
# @schema {"name": "defaults.grpc.client.dial_option", "type": "object"}
dial_option:
# @schema {"name": "defaults.grpc.client.dial_option.write_buffer_size", "type": "integer"}
Expand All @@ -755,6 +773,12 @@ defaults:
# @schema {"name": "defaults.grpc.client.dial_option.max_msg_size", "type": "integer"}
# defaults.grpc.client.dial_option.max_msg_size -- gRPC client dial option max message size
max_msg_size: 0
# @schema {"name": "defaults.grpc.client.dial_option.max_header_list_size", "type": "integer"}
# defaults.grpc.client.dial_option.max_header_list_size -- gRPC client dial option max header list size
max_header_list_size: 0
# @schema {"name": "defaults.grpc.client.dial_option.max_call_attempts", "type": "integer"}
# defaults.grpc.client.dial_option.max_call_attempts -- gRPC client dial option number of max call attempts
max_call_attempts: 0
# @schema {"name": "defaults.grpc.client.dial_option.backoff_max_delay", "type": "string"}
# defaults.grpc.client.dial_option.backoff_max_delay -- gRPC client dial option max backoff delay
backoff_max_delay: "120s"
Expand All @@ -773,9 +797,24 @@ defaults:
# @schema {"name": "defaults.grpc.client.dial_option.enable_backoff", "type": "boolean"}
# defaults.grpc.client.dial_option.enable_backoff -- gRPC client dial option backoff enabled
enable_backoff: false
# @schema {"name": "defaults.grpc.client.dial_option.disable_retry", "type": "boolean"}
# defaults.grpc.client.dial_option.disable_retry -- gRPC client dial option disables retry
disable_retry: false
# @schema {"name": "defaults.grpc.client.dial_option.insecure", "type": "boolean"}
# defaults.grpc.client.dial_option.insecure -- gRPC client dial option insecure enabled
insecure: true
# @schema {"name": "defaults.grpc.client.dial_option.shared_write_buffer", "type": "boolean"}
# defaults.grpc.client.dial_option.shared_write_buffer -- gRPC client dial option sharing write buffer
shared_write_buffer: false
# @schema {"name": "defaults.grpc.client.dial_option.authority", "type": "string"}
# defaults.grpc.client.dial_option.authority -- gRPC client dial option authority
authority: ""
# @schema {"name": "defaults.grpc.client.dial_option.idle_timeout", "type": "string"}
# defaults.grpc.client.dial_option.idle_timeout -- gRPC client dial option idle_timeout
idle_timeout: "1h"
# @schema {"name": "defaults.grpc.client.dial_option.user_agent", "type": "string"}
# defaults.grpc.client.dial_option.user_agent -- gRPC client dial option user_agent
user_agent: "Vald-gRPC"
# @schema {"name": "defaults.grpc.client.dial_option.timeout", "type": "string"}
# defaults.grpc.client.dial_option.timeout -- gRPC client dial option timeout
timeout: ""
Expand Down
4 changes: 2 additions & 2 deletions dockers/agent/core/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ENV REPO=vald
ENV RUST_HOME=/usr/local/lib/rust
ENV TZ=Etc/UTC
ENV USER=root
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV RUSTUP_HOME=${RUST_HOME}/rustup
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV PATH=${CARGO_HOME}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH}
WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -93,4 +93,4 @@ LABEL maintainer="vdaas.org vald team <vald@vdaas.org>"
COPY --from=builder /usr/bin/agent /usr/bin/agent
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/agent"]
ENTRYPOINT ["/usr/bin/agent"]
2 changes: 1 addition & 1 deletion dockers/agent/core/faiss/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ COPY --from=builder /usr/bin/faiss /usr/bin/faiss
COPY cmd/agent/core/faiss/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/faiss"]
ENTRYPOINT ["/usr/bin/faiss"]
2 changes: 1 addition & 1 deletion dockers/agent/core/ngt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ COPY --from=builder /usr/bin/ngt /usr/bin/ngt
COPY cmd/agent/core/ngt/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/ngt"]
ENTRYPOINT ["/usr/bin/ngt"]
2 changes: 1 addition & 1 deletion dockers/agent/sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ LABEL maintainer="vdaas.org vald team <vald@vdaas.org>"
COPY --from=builder /usr/bin/sidecar /usr/bin/sidecar
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/sidecar"]
ENTRYPOINT ["/usr/bin/sidecar"]
2 changes: 1 addition & 1 deletion dockers/binfmt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

# DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go
FROM tonistiigi/binfmt:master AS builder
FROM tonistiigi/binfmt:master AS builder
2 changes: 1 addition & 1 deletion dockers/buildbase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

# DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go
FROM ubuntu:devel AS builder
FROM ubuntu:devel AS builder
2 changes: 1 addition & 1 deletion dockers/buildkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

# DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go
FROM moby/buildkit:master AS builder
FROM moby/buildkit:master AS builder
2 changes: 1 addition & 1 deletion dockers/buildkit/syft/scanner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#

# DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go
FROM docker/buildkit-syft-scanner:edge AS scanner
FROM docker/buildkit-syft-scanner:edge AS scanner
2 changes: 1 addition & 1 deletion dockers/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ RUN --mount=type=bind,target=.,rw \
&& rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/*
# skipcq: DOK-DL3002
USER root:root
ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/bin/bash"]
4 changes: 2 additions & 2 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ENV REPO=vald
ENV RUST_HOME=/usr/local/lib/rust
ENV TZ=Etc/UTC
ENV USER=root
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV RUSTUP_HOME=${RUST_HOME}/rustup
ENV CARGO_HOME=${RUST_HOME}/cargo
ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH}
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -145,4 +145,4 @@ RUN --mount=type=bind,target=.,rw \
&& make faiss/install \
&& rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/*
# skipcq: DOK-DL3002
USER root:root
USER root:root
2 changes: 1 addition & 1 deletion dockers/discoverer/k8s/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/discoverer /usr/bin/discoverer
COPY cmd/discoverer/k8s/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/discoverer"]
ENTRYPOINT ["/usr/bin/discoverer"]
2 changes: 1 addition & 1 deletion dockers/gateway/filter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/filter /usr/bin/filter
COPY cmd/gateway/filter/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/filter"]
ENTRYPOINT ["/usr/bin/filter"]
2 changes: 1 addition & 1 deletion dockers/gateway/lb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/lb /usr/bin/lb
COPY cmd/gateway/lb/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/lb"]
ENTRYPOINT ["/usr/bin/lb"]
2 changes: 1 addition & 1 deletion dockers/gateway/mirror/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/mirror /usr/bin/mirror
COPY cmd/gateway/mirror/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/mirror"]
ENTRYPOINT ["/usr/bin/mirror"]
2 changes: 1 addition & 1 deletion dockers/index/job/correction/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-correction /usr/bin/index-correction
COPY cmd/index/job/correction/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/index-correction"]
ENTRYPOINT ["/usr/bin/index-correction"]
2 changes: 1 addition & 1 deletion dockers/index/job/creation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-creation /usr/bin/index-creation
COPY cmd/index/job/creation/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/index-creation"]
ENTRYPOINT ["/usr/bin/index-creation"]
2 changes: 1 addition & 1 deletion dockers/index/job/readreplica/rotate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/readreplica-rotate /usr/bin/readreplica-rotate
COPY cmd/index/job/readreplica/rotate/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/readreplica-rotate"]
ENTRYPOINT ["/usr/bin/readreplica-rotate"]
2 changes: 1 addition & 1 deletion dockers/index/job/save/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-save /usr/bin/index-save
COPY cmd/index/job/save/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/index-save"]
ENTRYPOINT ["/usr/bin/index-save"]
2 changes: 1 addition & 1 deletion dockers/index/operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index-operator /usr/bin/index-operator
COPY cmd/index/operator/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/index-operator"]
ENTRYPOINT ["/usr/bin/index-operator"]
2 changes: 1 addition & 1 deletion dockers/manager/index/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/index /usr/bin/index
COPY cmd/manager/index/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/index"]
ENTRYPOINT ["/usr/bin/index"]
2 changes: 1 addition & 1 deletion dockers/operator/helm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ COPY --from=builder /opt/helm/charts/vald /opt/helm/charts/vald
COPY --from=builder /opt/helm/charts/vald-helm-operator /opt/helm/charts/vald-helm-operator
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/helm-operator", "run", "--watches-file=/opt/helm/watches.yaml"]
ENTRYPOINT ["/usr/bin/helm-operator", "run", "--watches-file=/opt/helm/watches.yaml"]
2 changes: 1 addition & 1 deletion dockers/tools/benchmark/job/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ COPY --from=builder /usr/bin/job /usr/bin/job
COPY cmd/tools/benchmark/job/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/job"]
ENTRYPOINT ["/usr/bin/job"]
2 changes: 1 addition & 1 deletion dockers/tools/benchmark/operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ COPY --from=builder /usr/bin/operator /usr/bin/operator
COPY cmd/tools/benchmark/operator/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/operator"]
ENTRYPOINT ["/usr/bin/operator"]
2 changes: 1 addition & 1 deletion dockers/tools/cli/loadtest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ COPY --from=builder /usr/bin/loadtest /usr/bin/loadtest
COPY cmd/tools/cli/loadtest/sample.yaml /etc/server/config.yaml
# skipcq: DOK-DL3002
USER nonroot:nonroot
ENTRYPOINT ["/usr/bin/loadtest"]
ENTRYPOINT ["/usr/bin/loadtest"]
Loading

0 comments on commit 466b08c

Please sign in to comment.