From 9cd436e6a7f086656c25edaeeb54501c086859d1 Mon Sep 17 00:00:00 2001 From: Yusuke Kato Date: Wed, 6 Dec 2023 11:04:20 +0900 Subject: [PATCH 1/4] update dependencies (#2260) * update dependencies Signed-off-by: kpango * re-generate test Signed-off-by: kpango * fix test generation for main package Signed-off-by: kpango --------- Signed-off-by: kpango --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../ISSUE_TEMPLATE/security_issue_report.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- Makefile.d/test.mk | 3 + cmd/index/job/correction/main_test.go | 87 ++ cmd/index/job/creation/main_test.go | 87 ++ cmd/index/job/readreplica/rotate/main_test.go | 87 ++ cmd/index/job/save/main_test.go | 87 ++ cmd/tools/cli/benchmark/core/main_test.go | 117 ++- go.mod | 52 +- go.sum | 74 +- .../v1/client/agent/core/client_test.go | 230 +++++ internal/config/corrector_test.go | 36 +- internal/config/readreplica_rotate_test.go | 10 +- internal/k8s/client/client_test.go | 911 ++++++++++++++++++ internal/k8s/client/option_test.go | 102 ++ internal/net/grpc/client_test.go | 279 +++++- internal/net/grpc/proto/proto_test.go | 86 ++ internal/net/grpc/stream_test.go | 89 -- .../index/job/correction/correction_test.go | 294 ++++++ .../metrics/mem/malloc/malloc_test.go | 13 + .../core/ngt/handler/grpc/object_test.go | 9 +- pkg/gateway/lb/handler/grpc/handler_test.go | 134 +++ .../job/correction/service/corrector_test.go | 48 +- .../job/correction/service/options_test.go | 4 +- .../readreplica/rotate/usecase/rotate_test.go | 106 ++ versions/GO_VERSION | 2 +- versions/K3S_VERSION | 2 +- versions/PROMETHEUS_STACK_VERSION | 2 +- versions/YQ_VERSION | 2 +- 30 files changed, 2694 insertions(+), 265 deletions(-) create mode 100644 cmd/index/job/correction/main_test.go create mode 100644 cmd/index/job/creation/main_test.go create mode 100644 cmd/index/job/readreplica/rotate/main_test.go create mode 100644 cmd/index/job/save/main_test.go create mode 100644 internal/k8s/client/client_test.go create mode 100644 internal/k8s/client/option_test.go create mode 100644 internal/observability/metrics/index/job/correction/correction_test.go create mode 100644 pkg/index/job/readreplica/rotate/usecase/rotate_test.go diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0b25fda687..eb234c7e5c 100755 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,7 +22,7 @@ assignees: "" -- Go Version: 1.21.4 +- Go Version: 1.21.5 - Docker Version: 20.10.8 - Kubernetes Version: v1.28.4 - NGT Version: 2.1.5 diff --git a/.github/ISSUE_TEMPLATE/security_issue_report.md b/.github/ISSUE_TEMPLATE/security_issue_report.md index 7425c15051..8051c1dee9 100644 --- a/.github/ISSUE_TEMPLATE/security_issue_report.md +++ b/.github/ISSUE_TEMPLATE/security_issue_report.md @@ -16,7 +16,7 @@ assignees: "" -- Go Version: 1.21.4 +- Go Version: 1.21.5 - Docker Version: 20.10.8 - Kubernetes Version: v1.28.4 - NGT Version: 2.1.5 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index dd86efcc25..2bc3c8b614 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,7 +16,7 @@ -- Go Version: 1.21.4 +- Go Version: 1.21.5 - Docker Version: 20.10.8 - Kubernetes Version: v1.28.4 - NGT Version: 2.1.5 diff --git a/Makefile.d/test.mk b/Makefile.d/test.mk index af563f3e23..a8b26b252b 100644 --- a/Makefile.d/test.mk +++ b/Makefile.d/test.mk @@ -200,6 +200,9 @@ test/create-empty: echo "Creating empty test file $$f"; \ package="$$(dirname $$f)" ; \ package="$$(basename $$package)" ; \ + if [ "$$(basename $$f)" = "main.go" ]; then \ + package="main"; \ + fi; \ echo "package $$package" >> "$$f"; \ fi; \ done diff --git a/cmd/index/job/correction/main_test.go b/cmd/index/job/correction/main_test.go new file mode 100644 index 0000000000..2f827f9615 --- /dev/null +++ b/cmd/index/job/correction/main_test.go @@ -0,0 +1,87 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package main + +// NOT IMPLEMENTED BELOW +// +// func Test_main(t *testing.T) { +// type want struct { +// } +// type test struct { +// name string +// want want +// checkFunc func(want) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want) error { +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// main() +// if err := checkFunc(test.want); err != nil { +// tt.Errorf("error = %v", err) +// } +// }) +// } +// } diff --git a/cmd/index/job/creation/main_test.go b/cmd/index/job/creation/main_test.go new file mode 100644 index 0000000000..2f827f9615 --- /dev/null +++ b/cmd/index/job/creation/main_test.go @@ -0,0 +1,87 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package main + +// NOT IMPLEMENTED BELOW +// +// func Test_main(t *testing.T) { +// type want struct { +// } +// type test struct { +// name string +// want want +// checkFunc func(want) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want) error { +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// main() +// if err := checkFunc(test.want); err != nil { +// tt.Errorf("error = %v", err) +// } +// }) +// } +// } diff --git a/cmd/index/job/readreplica/rotate/main_test.go b/cmd/index/job/readreplica/rotate/main_test.go new file mode 100644 index 0000000000..2f827f9615 --- /dev/null +++ b/cmd/index/job/readreplica/rotate/main_test.go @@ -0,0 +1,87 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package main + +// NOT IMPLEMENTED BELOW +// +// func Test_main(t *testing.T) { +// type want struct { +// } +// type test struct { +// name string +// want want +// checkFunc func(want) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want) error { +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// main() +// if err := checkFunc(test.want); err != nil { +// tt.Errorf("error = %v", err) +// } +// }) +// } +// } diff --git a/cmd/index/job/save/main_test.go b/cmd/index/job/save/main_test.go new file mode 100644 index 0000000000..2f827f9615 --- /dev/null +++ b/cmd/index/job/save/main_test.go @@ -0,0 +1,87 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package main + +// NOT IMPLEMENTED BELOW +// +// func Test_main(t *testing.T) { +// type want struct { +// } +// type test struct { +// name string +// want want +// checkFunc func(want) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want) error { +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// main() +// if err := checkFunc(test.want); err != nil { +// tt.Errorf("error = %v", err) +// } +// }) +// } +// } diff --git a/cmd/tools/cli/benchmark/core/main_test.go b/cmd/tools/cli/benchmark/core/main_test.go index 8d8297becb..ef86d3b0a6 100644 --- a/cmd/tools/cli/benchmark/core/main_test.go +++ b/cmd/tools/cli/benchmark/core/main_test.go @@ -88,8 +88,14 @@ package main // // func Test_run(t *testing.T) { // type args struct { -// dur time.Duration -// output func(header string) +// ctx context.Context +// load bool +// path string +// dim int +// vectors [][]float32 +// ids []uint +// dur time.Duration +// output func(header string) // } // type want struct { // } @@ -110,6 +116,12 @@ package main // { // name: "test_case_1", // args: args { +// ctx:nil, +// load:false, +// path:"", +// dim:0, +// vectors:nil, +// ids:nil, // dur:nil, // output:nil, // }, @@ -130,6 +142,12 @@ package main // return test { // name: "test_case_2", // args: args { +// ctx:nil, +// load:false, +// path:"", +// dim:0, +// vectors:nil, +// ids:nil, // dur:nil, // output:nil, // }, @@ -162,7 +180,100 @@ package main // checkFunc = defaultCheckFunc // } // -// run(test.args.dur, test.args.output) +// run(test.args.ctx, test.args.load, test.args.path, test.args.dim, test.args.vectors, test.args.ids, test.args.dur, test.args.output) +// if err := checkFunc(test.want); err != nil { +// tt.Errorf("error = %v", err) +// } +// }) +// } +// } +// +// func Test_sleep(t *testing.T) { +// type args struct { +// ctx context.Context +// duration time.Duration +// limit time.Duration +// fn func() +// efn func() +// } +// type want struct { +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want) error { +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// duration:nil, +// limit:nil, +// fn:nil, +// efn:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// duration:nil, +// limit:nil, +// fn:nil, +// efn:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// sleep(test.args.ctx, test.args.duration, test.args.limit, test.args.fn, test.args.efn) // if err := checkFunc(test.want); err != nil { // tt.Errorf("error = %v", err) // } diff --git a/go.mod b/go.mod index 498655f0bf..1cfee3fb12 100755 --- a/go.mod +++ b/go.mod @@ -36,35 +36,35 @@ replace ( github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20230905222633-df94ce56f001 github.com/BurntSushi/toml => github.com/BurntSushi/toml v1.3.2 github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.5.0 - github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.14 + github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.15 github.com/Masterminds/semver/v3 => github.com/Masterminds/semver/v3 v3.2.1 github.com/ajstarks/deck => github.com/ajstarks/deck v0.0.0-20231012031509-f833e437b68a github.com/ajstarks/deck/generate => github.com/ajstarks/deck/generate v0.0.0-20231012031509-f833e437b68a github.com/ajstarks/svgo => github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b github.com/antihax/optional => github.com/antihax/optional v1.0.0 github.com/armon/go-socks5 => github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 - github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.48.10 - github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.23.4 + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.48.13 + github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.23.5 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 - github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.25.10 - github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.16.8 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 - github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3 - github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 + github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.25.11 + github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.16.9 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.9 + github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.4 + github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.8 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.8 github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 - github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 - github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.27.1 - github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 - github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.25.1 - github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.26.1 - github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.29.1 - github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.44.1 - github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 - github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 + github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.8 + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.8 + github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.8 + github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.27.2 + github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.47.2 + github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.25.2 + github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.26.2 + github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.29.2 + github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.44.2 + github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.18.2 + github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.26.2 github.com/aws/smithy-go => github.com/aws/smithy-go v1.18.1 github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.5 github.com/beorn7/perks => github.com/beorn7/perks v1.0.1 @@ -101,7 +101,7 @@ replace ( github.com/gin-contrib/sse => github.com/gin-contrib/sse v0.1.0 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 github.com/go-errors/errors => github.com/go-errors/errors v1.5.1 - github.com/go-fonts/dejavu => github.com/go-fonts/dejavu v0.3.2 + github.com/go-fonts/dejavu => github.com/go-fonts/dejavu v0.3.3 github.com/go-fonts/latin-modern => github.com/go-fonts/latin-modern v0.3.2 github.com/go-fonts/liberation => github.com/go-fonts/liberation v0.3.2 github.com/go-fonts/stix => github.com/go-fonts/stix v0.2.2 @@ -153,7 +153,7 @@ replace ( github.com/google/gofuzz => github.com/google/gofuzz v1.2.0 github.com/google/martian => github.com/google/martian v2.1.0+incompatible github.com/google/martian/v3 => github.com/google/martian/v3 v3.3.2 - github.com/google/pprof => github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15 + github.com/google/pprof => github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 github.com/google/shlex => github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/subcommands => github.com/google/subcommands v1.2.0 github.com/google/uuid => github.com/google/uuid v1.4.0 @@ -176,7 +176,7 @@ replace ( github.com/jackc/pgmock => github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 github.com/jackc/pgpassfile => github.com/jackc/pgpassfile v1.0.0 github.com/jackc/pgproto3/v2 => github.com/jackc/pgproto3/v2 v2.3.2 - github.com/jackc/pgservicefile => github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a + github.com/jackc/pgservicefile => github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 github.com/jackc/pgtype => github.com/jackc/pgtype v1.14.0 github.com/jackc/pgx/v4 => github.com/jackc/pgx/v4 v4.18.1 github.com/jackc/puddle => github.com/jackc/puddle v1.3.0 @@ -190,7 +190,7 @@ replace ( github.com/jstemmer/go-junit-report => github.com/jstemmer/go-junit-report v1.0.0 github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.6.3 github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0 - github.com/klauspost/compress => github.com/klauspost/compress v1.17.4-0.20231129132359-98ff542abe31 + github.com/klauspost/compress => github.com/klauspost/compress v1.17.5-0.20231201163758-1dba04a766e8 github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.2.6 github.com/kpango/fastime => github.com/kpango/fastime v1.1.9 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 @@ -312,7 +312,7 @@ replace ( gonum.org/v1/gonum => gonum.org/v1/gonum v0.14.0 gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 gonum.org/v1/plot => gonum.org/v1/plot v0.14.0 - google.golang.org/api => google.golang.org/api v0.152.0 + google.golang.org/api => google.golang.org/api v0.153.0 google.golang.org/appengine => google.golang.org/appengine v1.6.8 google.golang.org/genproto => google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4 @@ -515,4 +515,4 @@ require ( sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect -) \ No newline at end of file +) diff --git a/go.sum b/go.sum index fd534d2b84..4348039494 100644 --- a/go.sum +++ b/go.sum @@ -177,44 +177,44 @@ github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/P github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.48.10 h1:0LIFG3wp2Dt6PsxKWCg1Y1xRrn2vZnW5/gWdgaBalKg= -github.com/aws/aws-sdk-go v1.48.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= -github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= +github.com/aws/aws-sdk-go v1.48.13 h1:6N4GTme6MpxfCisWf5pql8k3TBORiKTmbeutZCDXlG8= +github.com/aws/aws-sdk-go v1.48.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go-v2 v1.23.5 h1:xK6C4udTyDMd82RFvNkDQxtAd00xlzFUtX4fF2nMZyg= +github.com/aws/aws-sdk-go-v2 v1.23.5/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= -github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= -github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= -github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= -github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3 h1:0Pw2ku539I0EugduMpJ+579WRc+38nv8rZhThWjsuYQ= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.3/go.mod h1:vQtGu6huTQkoEhNgkDeijtYm9Y8HgpQqvGeKUPoEunY= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= +github.com/aws/aws-sdk-go-v2/config v1.25.11 h1:RWzp7jhPRliIcACefGkKp03L0Yofmd2p8M25kbiyvno= +github.com/aws/aws-sdk-go-v2/config v1.25.11/go.mod h1:BVUs0chMdygHsQtvaMyEOpW2GIW+ubrxJLgIz/JU29s= +github.com/aws/aws-sdk-go-v2/credentials v1.16.9 h1:LQo3MUIOzod9JdUK+wxmSdgzLVYUbII3jXn3S/HJZU0= +github.com/aws/aws-sdk-go-v2/credentials v1.16.9/go.mod h1:R7mDuIJoCjH6TxGUc/cylE7Lp/o0bhKVoxdBThsjqCM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.9 h1:FZVFahMyZle6WcogZCOxo6D/lkDA2lqKIn4/ueUmVXw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.9/go.mod h1:kjq7REMIkxdtcEC9/4BVXjOsNY5isz6jQbEgk6osRTU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.4 h1:TUCNKBd4/JEefsZDxo5deRmrRRPZHqGyBYiUAeBKOWU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.4/go.mod h1:egDkcl+zsgFqS6VO142bKboip5Pe1sNMwN55Xy38QsM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.8 h1:8GVZIR0y6JRIUNSYI1xAMF4HDfV8H/bOsZ/8AD/uY5Q= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.8/go.mod h1:rwBfu0SoUkBUZndVgPZKAD9Y2JigaZtRP68unRiYToQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.8 h1:ZE2ds/qeBkhk3yqYvS3CDCFNvd9ir5hMjlVStLZWrvM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.8/go.mod h1:/lAPPymDYL023+TS6DJmjuL42nxix2AvEvfjqOBRODk= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.0 h1:U5yySdwt2HPo/pnQec04DImLzWORbeWML1fJiLkKruI= github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.0/go.mod h1:EhC/83j8/hL/UB1WmExo3gkElaja/KlmZM/gl1rTfjM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 h1:Mft1tmIK1fkFS9l9sYVYiN+OdgXeOcQ9ZS3SxKOh3A4= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7/go.mod h1:QWI83fhocxDaN3b74N8rrvET60CBaike5lQ+5sm3OcE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 h1:ybtGXm0qFVFi0hFUF7eFAVnL3ntl9MO7lrxhhGP7KYU= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7/go.mod h1:BUyWJUKAnNqoEq1LfyQxy+Eh4U8Y3c5w2C6m21f3yvI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 h1:0/W5F+LlXzKZ7KTsRcD8pugasVnsrjUWmhOsN/LdSFY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1/go.mod h1:TqThLn4bRCn/UYf960hNZgPPjmxc17fQcwmjfuG6D5k= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.8 h1:xyfOAYV/ujzZOo01H9+OnyeiRKmTEp6EsITTsmq332Q= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.8/go.mod h1:coLeQEoKzW9ViTL2bn0YUlU7K0RYjivKudG74gtd+sI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.8 h1:EamsKe+ZjkOQjDdHd86/JCEucjFKQ9T0atWKO4s2Lgs= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.8/go.mod h1:Q0vV3/csTpbkfKLI5Sb56cJQTCTtJ0ixdb7P+Wedqiw= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.8 h1:ip5ia3JOXl4OAsqeTdrOOmqKgoWiu+t9XSOnRzBwmRs= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.8/go.mod h1:kE+aERnK9VQIw1vrk7ElAvhCsgLNzGyCPNg2Qe4Eq4c= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.2 h1:DLSAG8zpJV2pYsU+UPkj1IEZghyBnnUsvIRs6UuXSDU= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.2/go.mod h1:thjZng67jGsvMyVZnSxlcqKyLwB0XTG8bHIRZPTJ+Bs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.2 h1:xJPydhNm0Hiqct5TVKEuHG7weC0+sOs4MUnd7A5n5F4= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.2/go.mod h1:zxk6y1X2KXThESWMS5CrKRvISD8mbIMab6nZrCGxDG0= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1 h1:hd0SKLMdOL/Sl6Z0np1PX9LeH2gqNtBe0MhTedA8MGI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1/go.mod h1:XO/VcyoQ8nKyKfFW/3DMsRQXsfh/052tHTWmg3xBXRg= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.2 h1:fFrLsy08wEbAisqW3KDl/cPHrF43GmV79zXB9EwJiZw= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.2/go.mod h1:7Ld9eTqocTvJqqJ5K/orbSDwmGcpRdlDiLjz2DO+SL8= github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -273,8 +273,8 @@ github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vml github.com/fyne-io/mobile v0.1.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-fonts/dejavu v0.3.2 h1:3XlHi0JBYX+Cp8n98c6qSoHrxPa4AUKDMKdrh/0sUdk= -github.com/go-fonts/dejavu v0.3.2/go.mod h1:m+TzKY7ZEl09/a17t1593E4VYW8L1VaBXHzFZOIjGEY= +github.com/go-fonts/dejavu v0.3.3 h1:YZxbkwCBqVC0BojBvGdDdQuDqtm0oRs95eGhSPYbTvg= +github.com/go-fonts/dejavu v0.3.3/go.mod h1:EpsVvJxpY/lRM2MbkThHF/5161F8YZdBFIC9uT3/Uqc= github.com/go-fonts/latin-modern v0.3.2 h1:M+Sq24Dp0ZRPf3TctPnG1MZxRblqyWC/cRUL9WmdaFc= github.com/go-fonts/latin-modern v0.3.2/go.mod h1:9odJt4NbRrbdj4UAMuLVd4zEukf6aAEKnDaQga0whqQ= github.com/go-fonts/liberation v0.3.2 h1:XuwG0vGHFBPRRI8Qwbi5tIvR3cku9LUfZGq/Ar16wlQ= @@ -362,8 +362,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15 h1:t2sLhFuGXwoomaKLTuoxFfFqqlG1Gp2DpsupXq3UvZ0= -github.com/google/pprof v0.0.0-20231127191134-f3a68a39ae15/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 h1:PxlBVtIFHR/mtWk2i0gTEdCz+jBnqiuHNSki0epDbVs= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -427,8 +427,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.17.4-0.20231129132359-98ff542abe31 h1:K0/QUfQaM8wgPJImX6Kh1KTmIDxH6WdjNV3IW8kqnKY= -github.com/klauspost/compress v1.17.4-0.20231129132359-98ff542abe31/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.5-0.20231201163758-1dba04a766e8 h1:UN1vYGdKhIhnw2KbHhwx+3Mux91UcMfYKwlXRJCgs58= +github.com/klauspost/compress v1.17.5-0.20231201163758-1dba04a766e8/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= @@ -653,8 +653,8 @@ gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENE gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= gonum.org/v1/plot v0.14.0 h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE= gonum.org/v1/plot v0.14.0/go.mod h1:MLdR9424SJed+5VqC6MsouEpig9pZX2VZ57H9ko2bXU= -google.golang.org/api v0.152.0 h1:t0r1vPnfMc260S2Ci+en7kfCZaLOPs5KI0sVV/6jZrY= -google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= +google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 h1:W12Pwm4urIbRdGhMEg2NM9O3TWKjNcxQhs46V0ypf/k= @@ -760,4 +760,4 @@ sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= \ No newline at end of file +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/client/v1/client/agent/core/client_test.go b/internal/client/v1/client/agent/core/client_test.go index 22fbde67df..2782ae2fc1 100644 --- a/internal/client/v1/client/agent/core/client_test.go +++ b/internal/client/v1/client/agent/core/client_test.go @@ -675,6 +675,123 @@ package core // } // } // +// func Test_agentClient_GetTimestamp(t *testing.T) { +// type args struct { +// ctx context.Context +// req *client.ObjectGetTimestampRequest +// in2 []grpc.CallOption +// } +// type fields struct { +// Client vald.Client +// addrs []string +// c grpc.Client +// } +// type want struct { +// wantRes *client.ObjectTimestamp +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, *client.ObjectTimestamp, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, gotRes *client.ObjectTimestamp, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(gotRes, w.wantRes) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotRes, w.wantRes) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// req:nil, +// in2:nil, +// }, +// fields: fields { +// Client:nil, +// addrs:nil, +// c:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// req:nil, +// in2:nil, +// }, +// fields: fields { +// Client:nil, +// addrs:nil, +// c:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &agentClient{ +// Client: test.fields.Client, +// addrs: test.fields.addrs, +// c: test.fields.c, +// } +// +// gotRes, err := c.GetTimestamp(test.args.ctx, test.args.req, test.args.in2...) +// if err := checkFunc(test.want, gotRes, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// // func Test_singleAgentClient_CreateIndex(t *testing.T) { // type args struct { // ctx context.Context @@ -1126,3 +1243,116 @@ package core // }) // } // } +// +// func Test_singleAgentClient_GetTimestamp(t *testing.T) { +// type args struct { +// ctx context.Context +// req *client.ObjectGetTimestampRequest +// opts []grpc.CallOption +// } +// type fields struct { +// Client vald.Client +// ac agent.AgentClient +// } +// type want struct { +// wantRes *client.ObjectTimestamp +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, *client.ObjectTimestamp, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, gotRes *client.ObjectTimestamp, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(gotRes, w.wantRes) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotRes, w.wantRes) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// req:nil, +// opts:nil, +// }, +// fields: fields { +// Client:nil, +// ac:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// req:nil, +// opts:nil, +// }, +// fields: fields { +// Client:nil, +// ac:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &singleAgentClient{ +// Client: test.fields.Client, +// ac: test.fields.ac, +// } +// +// gotRes, err := c.GetTimestamp(test.args.ctx, test.args.req, test.args.opts...) +// if err := checkFunc(test.want, gotRes, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/config/corrector_test.go b/internal/config/corrector_test.go index a0725a19d7..27751abb0f 100644 --- a/internal/config/corrector_test.go +++ b/internal/config/corrector_test.go @@ -17,15 +17,15 @@ package config // // func TestCorrector_Bind(t *testing.T) { // type fields struct { -// AgentPort int -// AgentName string -// AgentNamespace string -// AgentDNS string -// NodeName string -// StreamListConcurrency int -// KvsAsyncWriteConcurrency int -// IndexReplica int -// Discoverer *DiscovererClient +// AgentPort int +// AgentName string +// AgentNamespace string +// AgentDNS string +// NodeName string +// StreamListConcurrency int +// KvsAsyncWriteConcurrency int +// IndexReplica int +// Discoverer *DiscovererClient // } // type want struct { // want *Corrector @@ -116,15 +116,15 @@ package config // checkFunc = defaultCheckFunc // } // c := &Corrector{ -// AgentPort: test.fields.AgentPort, -// AgentName: test.fields.AgentName, -// AgentNamespace: test.fields.AgentNamespace, -// AgentDNS: test.fields.AgentDNS, -// NodeName: test.fields.NodeName, -// StreamListConcurrency: test.fields.StreamListConcurrency, -// KvsAsyncWriteConcurrency: test.fields.KvsAsyncWriteConcurrency, -// IndexReplica: test.fields.IndexReplica, -// Discoverer: test.fields.Discoverer, +// AgentPort: test.fields.AgentPort, +// AgentName: test.fields.AgentName, +// AgentNamespace: test.fields.AgentNamespace, +// AgentDNS: test.fields.AgentDNS, +// NodeName: test.fields.NodeName, +// StreamListConcurrency: test.fields.StreamListConcurrency, +// KvsAsyncWriteConcurrency: test.fields.KvsAsyncWriteConcurrency, +// IndexReplica: test.fields.IndexReplica, +// Discoverer: test.fields.Discoverer, // } // // got := c.Bind() diff --git a/internal/config/readreplica_rotate_test.go b/internal/config/readreplica_rotate_test.go index 586eff9162..cdf0458f12 100644 --- a/internal/config/readreplica_rotate_test.go +++ b/internal/config/readreplica_rotate_test.go @@ -15,7 +15,7 @@ package config // NOT IMPLEMENTED BELOW // -// func TestReadreplicaRotate_Bind(t *testing.T) { +// func TestReadReplicaRotate_Bind(t *testing.T) { // type fields struct { // AgentNamespace string // ReadReplicaLabelKey string @@ -23,17 +23,17 @@ package config // VolumeName string // } // type want struct { -// want *ReadreplicaRotate +// want *ReadReplicaRotate // } // type test struct { // name string // fields fields // want want -// checkFunc func(want, *ReadreplicaRotate) error +// checkFunc func(want, *ReadReplicaRotate) error // beforeFunc func(*testing.T) // afterFunc func(*testing.T) // } -// defaultCheckFunc := func(w want, got *ReadreplicaRotate) error { +// defaultCheckFunc := func(w want, got *ReadReplicaRotate) error { // if !reflect.DeepEqual(got, w.want) { // return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) // } @@ -100,7 +100,7 @@ package config // if test.checkFunc == nil { // checkFunc = defaultCheckFunc // } -// r := &ReadreplicaRotate{ +// r := &ReadReplicaRotate{ // AgentNamespace: test.fields.AgentNamespace, // ReadReplicaLabelKey: test.fields.ReadReplicaLabelKey, // ReadReplicaID: test.fields.ReadReplicaID, diff --git a/internal/k8s/client/client_test.go b/internal/k8s/client/client_test.go new file mode 100644 index 0000000000..1feec7b39f --- /dev/null +++ b/internal/k8s/client/client_test.go @@ -0,0 +1,911 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package client + +// NOT IMPLEMENTED BELOW +// +// func TestNew(t *testing.T) { +// type args struct { +// opts []Option +// } +// type want struct { +// want Client +// err error +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want, Client, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got Client, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// opts:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// opts:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// got, err := New(test.args.opts...) +// if err := checkFunc(test.want, got, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_Get(t *testing.T) { +// type args struct { +// ctx context.Context +// name string +// namespace string +// obj cli.Object +// opts []cli.GetOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// name:"", +// namespace:"", +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// name:"", +// namespace:"", +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// err := c.Get(test.args.ctx, test.args.name, test.args.namespace, test.args.obj, test.args.opts...) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_List(t *testing.T) { +// type args struct { +// ctx context.Context +// list cli.ObjectList +// opts []cli.ListOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// list:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// list:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// err := c.List(test.args.ctx, test.args.list, test.args.opts...) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_Create(t *testing.T) { +// type args struct { +// ctx context.Context +// obj Object +// opts []CreateOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// err := c.Create(test.args.ctx, test.args.obj, test.args.opts...) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_Delete(t *testing.T) { +// type args struct { +// ctx context.Context +// obj Object +// opts []cli.DeleteOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// err := c.Delete(test.args.ctx, test.args.obj, test.args.opts...) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_Update(t *testing.T) { +// type args struct { +// ctx context.Context +// obj Object +// opts []cli.UpdateOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// err := c.Update(test.args.ctx, test.args.obj, test.args.opts...) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_Watch(t *testing.T) { +// type args struct { +// ctx context.Context +// obj cli.ObjectList +// opts []ListOption +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// want watch.Interface +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, watch.Interface, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got watch.Interface, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// obj:nil, +// opts:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// got, err := c.Watch(test.args.ctx, test.args.obj, test.args.opts...) +// if err := checkFunc(test.want, got, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_client_LabelSelector(t *testing.T) { +// type args struct { +// key string +// op selection.Operator +// vals []string +// } +// type fields struct { +// scheme *runtime.Scheme +// reader cli.Reader +// withWatch cli.WithWatch +// } +// type want struct { +// want labels.Selector +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, labels.Selector, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got labels.Selector, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// key:"", +// op:nil, +// vals:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// key:"", +// op:nil, +// vals:nil, +// }, +// fields: fields { +// scheme:nil, +// reader:nil, +// withWatch:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &client{ +// scheme: test.fields.scheme, +// reader: test.fields.reader, +// withWatch: test.fields.withWatch, +// } +// +// got, err := c.LabelSelector(test.args.key, test.args.op, test.args.vals) +// if err := checkFunc(test.want, got, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/k8s/client/option_test.go b/internal/k8s/client/option_test.go new file mode 100644 index 0000000000..bd009daa9c --- /dev/null +++ b/internal/k8s/client/option_test.go @@ -0,0 +1,102 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package client + +// NOT IMPLEMENTED BELOW +// +// func TestWithSchemeBuilder(t *testing.T) { +// type args struct { +// sb scheme.Builder +// } +// type want struct { +// want Option +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want, Option) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got Option) error { +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// sb:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// sb:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// got := WithSchemeBuilder(test.args.sb) +// if err := checkFunc(test.want, got); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/net/grpc/client_test.go b/internal/net/grpc/client_test.go index a118cc29de..d6a54e384d 100644 --- a/internal/net/grpc/client_test.go +++ b/internal/net/grpc/client_test.go @@ -113,7 +113,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -167,7 +167,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -210,7 +210,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -301,7 +301,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -352,7 +352,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -396,7 +396,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -488,7 +488,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -540,7 +540,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -585,7 +585,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -677,7 +677,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -729,7 +729,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -774,7 +774,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -867,7 +867,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -920,7 +920,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -966,7 +966,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1057,7 +1057,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -1112,7 +1112,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1156,7 +1156,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1248,7 +1248,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -1304,7 +1304,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1349,7 +1349,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1443,7 +1443,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -1501,7 +1501,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1548,7 +1548,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1635,7 +1635,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -1681,7 +1681,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1721,7 +1721,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1808,7 +1808,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -1854,7 +1854,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1894,7 +1894,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -1981,7 +1981,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2027,7 +2027,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2067,7 +2067,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2159,7 +2159,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2215,7 +2215,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2260,7 +2260,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2351,7 +2351,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2402,7 +2402,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2446,7 +2446,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2537,7 +2537,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2588,7 +2588,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2632,7 +2632,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2719,7 +2719,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2765,7 +2765,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2805,7 +2805,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2895,7 +2895,7 @@ package grpc // addrs map[string]struct{} // poolSize uint64 // clientCount uint64 -// conns grpcConns +// conns sync.Map[string, pool.Conn] // hcDur time.Duration // prDur time.Duration // dialer net.Dialer @@ -2945,7 +2945,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -2988,7 +2988,7 @@ package grpc // addrs:nil, // poolSize:0, // clientCount:0, -// conns:grpcConns{}, +// conns:nil, // hcDur:nil, // prDur:nil, // dialer:nil, @@ -3069,3 +3069,186 @@ package grpc // }) // } // } +// +// func Test_gRPCClient_rangeConns(t *testing.T) { +// type args struct { +// fn func(addr string, p pool.Conn) bool +// } +// type fields struct { +// addrs map[string]struct{} +// poolSize uint64 +// clientCount uint64 +// conns sync.Map[string, pool.Conn] +// hcDur time.Duration +// prDur time.Duration +// dialer net.Dialer +// enablePoolRebalance bool +// resolveDNS bool +// dopts []DialOption +// copts []CallOption +// roccd string +// eg errgroup.Group +// bo backoff.Backoff +// cb circuitbreaker.CircuitBreaker +// gbo gbackoff.Config +// mcd time.Duration +// group singleflight.Group[pool.Conn] +// crl sync.Map[string, bool] +// ech <-chan error +// monitorRunning atomic.Bool +// stopMonitor context.CancelFunc +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// fn:nil, +// }, +// fields: fields { +// addrs:nil, +// poolSize:0, +// clientCount:0, +// conns:nil, +// hcDur:nil, +// prDur:nil, +// dialer:nil, +// enablePoolRebalance:false, +// resolveDNS:false, +// dopts:nil, +// copts:nil, +// roccd:"", +// eg:nil, +// bo:nil, +// cb:nil, +// gbo:nil, +// mcd:nil, +// group:nil, +// crl:nil, +// ech:nil, +// monitorRunning:nil, +// stopMonitor:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// fn:nil, +// }, +// fields: fields { +// addrs:nil, +// poolSize:0, +// clientCount:0, +// conns:nil, +// hcDur:nil, +// prDur:nil, +// dialer:nil, +// enablePoolRebalance:false, +// resolveDNS:false, +// dopts:nil, +// copts:nil, +// roccd:"", +// eg:nil, +// bo:nil, +// cb:nil, +// gbo:nil, +// mcd:nil, +// group:nil, +// crl:nil, +// ech:nil, +// monitorRunning:nil, +// stopMonitor:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// g := &gRPCClient{ +// addrs: test.fields.addrs, +// poolSize: test.fields.poolSize, +// clientCount: test.fields.clientCount, +// conns: test.fields.conns, +// hcDur: test.fields.hcDur, +// prDur: test.fields.prDur, +// dialer: test.fields.dialer, +// enablePoolRebalance: test.fields.enablePoolRebalance, +// resolveDNS: test.fields.resolveDNS, +// dopts: test.fields.dopts, +// copts: test.fields.copts, +// roccd: test.fields.roccd, +// eg: test.fields.eg, +// bo: test.fields.bo, +// cb: test.fields.cb, +// gbo: test.fields.gbo, +// mcd: test.fields.mcd, +// group: test.fields.group, +// crl: test.fields.crl, +// ech: test.fields.ech, +// monitorRunning: test.fields.monitorRunning, +// stopMonitor: test.fields.stopMonitor, +// } +// +// err := g.rangeConns(test.args.fn) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/net/grpc/proto/proto_test.go b/internal/net/grpc/proto/proto_test.go index 5a8bb5a863..22d756572e 100644 --- a/internal/net/grpc/proto/proto_test.go +++ b/internal/net/grpc/proto/proto_test.go @@ -339,3 +339,89 @@ func TestToMessageV1(t *testing.T) { } // NOT IMPLEMENTED BELOW +// +// func TestToMessageV2(t *testing.T) { +// type args struct { +// m MessageV1 +// } +// type want struct { +// want Message +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want, Message) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got Message) error { +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// m:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// m:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// got := ToMessageV2(test.args.m) +// if err := checkFunc(test.want, got); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/net/grpc/stream_test.go b/internal/net/grpc/stream_test.go index c65aebd935..27438cbdde 100644 --- a/internal/net/grpc/stream_test.go +++ b/internal/net/grpc/stream_test.go @@ -295,92 +295,3 @@ func TestBidirectionalStream(t *testing.T) { // }) // } // } -// -// func Test_removeDuplicates(t *testing.T) { -// type args struct { -// x S -// less func(left, right E) int -// } -// type want struct { -// want S -// } -// type test struct { -// name string -// args args -// want want -// checkFunc func(want, S) error -// beforeFunc func(*testing.T, args) -// afterFunc func(*testing.T, args) -// } -// defaultCheckFunc := func(w want, got S) error { -// if !reflect.DeepEqual(got, w.want) { -// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) -// } -// return nil -// } -// tests := []test{ -// // TODO test cases -// /* -// { -// name: "test_case_1", -// args: args { -// x:nil, -// less:nil, -// }, -// want: want{}, -// checkFunc: defaultCheckFunc, -// beforeFunc: func(t *testing.T, args args) { -// t.Helper() -// }, -// afterFunc: func(t *testing.T, args args) { -// t.Helper() -// }, -// }, -// */ -// -// // TODO test cases -// /* -// func() test { -// return test { -// name: "test_case_2", -// args: args { -// x:nil, -// less:nil, -// }, -// want: want{}, -// checkFunc: defaultCheckFunc, -// beforeFunc: func(t *testing.T, args args) { -// t.Helper() -// }, -// afterFunc: func(t *testing.T, args args) { -// t.Helper() -// }, -// } -// }(), -// */ -// } -// -// for _, tc := range tests { -// test := tc -// t.Run(test.name, func(tt *testing.T) { -// tt.Parallel() -// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) -// if test.beforeFunc != nil { -// test.beforeFunc(tt, test.args) -// } -// if test.afterFunc != nil { -// defer test.afterFunc(tt, test.args) -// } -// checkFunc := test.checkFunc -// if test.checkFunc == nil { -// checkFunc = defaultCheckFunc -// } -// -// got := removeDuplicates(test.args.x, test.args.less) -// if err := checkFunc(test.want, got); err != nil { -// tt.Errorf("error = %v", err) -// } -// -// }) -// } -// } diff --git a/internal/observability/metrics/index/job/correction/correction_test.go b/internal/observability/metrics/index/job/correction/correction_test.go new file mode 100644 index 0000000000..1b41d0b73c --- /dev/null +++ b/internal/observability/metrics/index/job/correction/correction_test.go @@ -0,0 +1,294 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package correction + +// NOT IMPLEMENTED BELOW +// +// func TestNew(t *testing.T) { +// type args struct { +// c service.Corrector +// } +// type want struct { +// want metrics.Metric +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want, metrics.Metric) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got metrics.Metric) error { +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// c:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// c:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// got := New(test.args.c) +// if err := checkFunc(test.want, got); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_correctionMetrics_View(t *testing.T) { +// type fields struct { +// correction service.Corrector +// } +// type want struct { +// want []*metrics.View +// err error +// } +// type test struct { +// name string +// fields fields +// want want +// checkFunc func(want, []*metrics.View, error) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want, got []*metrics.View, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// fields: fields { +// correction:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// fields: fields { +// correction:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &correctionMetrics{ +// correction: test.fields.correction, +// } +// +// got, err := c.View() +// if err := checkFunc(test.want, got, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } +// +// func Test_correctionMetrics_Register(t *testing.T) { +// type args struct { +// m metrics.Meter +// } +// type fields struct { +// correction service.Corrector +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// m:nil, +// }, +// fields: fields { +// correction:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// m:nil, +// }, +// fields: fields { +// correction:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// c := &correctionMetrics{ +// correction: test.fields.correction, +// } +// +// err := c.Register(test.args.m) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/internal/observability/metrics/mem/malloc/malloc_test.go b/internal/observability/metrics/mem/malloc/malloc_test.go index 70adfed31d..c71e1540db 100644 --- a/internal/observability/metrics/mem/malloc/malloc_test.go +++ b/internal/observability/metrics/mem/malloc/malloc_test.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package malloc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/ngt/handler/grpc/object_test.go b/pkg/agent/core/ngt/handler/grpc/object_test.go index 6626949efd..233349c3b3 100644 --- a/pkg/agent/core/ngt/handler/grpc/object_test.go +++ b/pkg/agent/core/ngt/handler/grpc/object_test.go @@ -1455,10 +1455,9 @@ func Test_server_GetTimestamp(t *testing.T) { // NOT IMPLEMENTED BELOW // -// func Test_server_StreamListObject(t *testing.T) { +// func Test_server_StreamGetObject(t *testing.T) { // type args struct { -// in0 *payload.Object_List_Request -// stream vald.Object_StreamListObjectServer +// stream vald.Object_StreamGetObjectServer // } // type fields struct { // name string @@ -1493,7 +1492,6 @@ func Test_server_GetTimestamp(t *testing.T) { // { // name: "test_case_1", // args: args { -// in0:nil, // stream:nil, // }, // fields: fields { @@ -1522,7 +1520,6 @@ func Test_server_GetTimestamp(t *testing.T) { // return test { // name: "test_case_2", // args: args { -// in0:nil, // stream:nil, // }, // fields: fields { @@ -1572,7 +1569,7 @@ func Test_server_GetTimestamp(t *testing.T) { // UnimplementedValdServer: test.fields.UnimplementedValdServer, // } // -// err := s.StreamListObject(test.args.in0, test.args.stream) +// err := s.StreamGetObject(test.args.stream) // if err := checkFunc(test.want, err); err != nil { // tt.Errorf("error = %v", err) // } diff --git a/pkg/gateway/lb/handler/grpc/handler_test.go b/pkg/gateway/lb/handler/grpc/handler_test.go index 928adb73e0..bb35ec7136 100644 --- a/pkg/gateway/lb/handler/grpc/handler_test.go +++ b/pkg/gateway/lb/handler/grpc/handler_test.go @@ -3901,3 +3901,137 @@ package grpc // }) // } // } +// +// func Test_server_StreamListObject(t *testing.T) { +// type args struct { +// req *payload.Object_List_Request +// stream vald.Object_StreamListObjectServer +// } +// type fields struct { +// eg errgroup.Group +// gateway service.Gateway +// timeout time.Duration +// replica int +// streamConcurrency int +// multiConcurrency int +// name string +// ip string +// UnimplementedValdServer vald.UnimplementedValdServer +// } +// type want struct { +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// req:nil, +// stream:nil, +// }, +// fields: fields { +// eg:nil, +// gateway:nil, +// timeout:nil, +// replica:0, +// streamConcurrency:0, +// multiConcurrency:0, +// name:"", +// ip:"", +// UnimplementedValdServer:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// req:nil, +// stream:nil, +// }, +// fields: fields { +// eg:nil, +// gateway:nil, +// timeout:nil, +// replica:0, +// streamConcurrency:0, +// multiConcurrency:0, +// name:"", +// ip:"", +// UnimplementedValdServer:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// s := &server{ +// eg: test.fields.eg, +// gateway: test.fields.gateway, +// timeout: test.fields.timeout, +// replica: test.fields.replica, +// streamConcurrency: test.fields.streamConcurrency, +// multiConcurrency: test.fields.multiConcurrency, +// name: test.fields.name, +// ip: test.fields.ip, +// UnimplementedValdServer: test.fields.UnimplementedValdServer, +// } +// +// err := s.StreamListObject(test.args.req, test.args.stream) +// if err := checkFunc(test.want, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/pkg/index/job/correction/service/corrector_test.go b/pkg/index/job/correction/service/corrector_test.go index a249d59f60..eab80e6fab 100644 --- a/pkg/index/job/correction/service/corrector_test.go +++ b/pkg/index/job/correction/service/corrector_test.go @@ -561,7 +561,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -605,7 +605,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -638,7 +638,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -680,7 +680,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, @@ -708,7 +708,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -748,7 +748,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -781,7 +781,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -823,7 +823,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, @@ -851,7 +851,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -891,7 +891,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -924,7 +924,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -966,7 +966,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, @@ -991,7 +991,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -1027,7 +1027,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1057,7 +1057,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1099,7 +1099,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, @@ -1124,7 +1124,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -1160,7 +1160,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1190,7 +1190,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1232,7 +1232,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, @@ -1257,7 +1257,7 @@ func Test_correct_correctReplica(t *testing.T) { // type fields struct { // discoverer discoverer.Client // agentAddrs []string -// indexInfos sync.Map[string, *payload.Info_Index_Count] +// sortedByIndexCntAddrs []string // uuidsCount uint32 // uncommittedUUIDsCount uint32 // checkedID bbolt.Bbolt @@ -1293,7 +1293,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1323,7 +1323,7 @@ func Test_correct_correctReplica(t *testing.T) { // fields: fields { // discoverer:nil, // agentAddrs:nil, -// indexInfos:nil, +// sortedByIndexCntAddrs:nil, // uuidsCount:0, // uncommittedUUIDsCount:0, // checkedID:nil, @@ -1365,7 +1365,7 @@ func Test_correct_correctReplica(t *testing.T) { // c := &correct{ // discoverer: test.fields.discoverer, // agentAddrs: test.fields.agentAddrs, -// indexInfos: test.fields.indexInfos, +// sortedByIndexCntAddrs: test.fields.sortedByIndexCntAddrs, // uuidsCount: test.fields.uuidsCount, // uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, // checkedID: test.fields.checkedID, diff --git a/pkg/index/job/correction/service/options_test.go b/pkg/index/job/correction/service/options_test.go index ed1a312363..4c6bccc1e7 100644 --- a/pkg/index/job/correction/service/options_test.go +++ b/pkg/index/job/correction/service/options_test.go @@ -273,7 +273,7 @@ package service // } // } // -// func TestWithBboltAsyncWriteConcurrency(t *testing.T) { +// func TestWithKvsAsyncWriteConcurrency(t *testing.T) { // type args struct { // num int // } @@ -350,7 +350,7 @@ package service // checkFunc = defaultCheckFunc // } // -// got := WithBboltAsyncWriteConcurrency(test.args.num) +// got := WithKvsAsyncWriteConcurrency(test.args.num) // if err := checkFunc(test.want, got); err != nil { // tt.Errorf("error = %v", err) // } diff --git a/pkg/index/job/readreplica/rotate/usecase/rotate_test.go b/pkg/index/job/readreplica/rotate/usecase/rotate_test.go new file mode 100644 index 0000000000..1eab852c2d --- /dev/null +++ b/pkg/index/job/readreplica/rotate/usecase/rotate_test.go @@ -0,0 +1,106 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package usecase + +// NOT IMPLEMENTED BELOW +// +// func TestNew(t *testing.T) { +// type args struct { +// cfg *config.Data +// } +// type want struct { +// want runner.Runner +// err error +// } +// type test struct { +// name string +// args args +// want want +// checkFunc func(want, runner.Runner, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, got runner.Runner, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(got, w.want) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// cfg:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// cfg:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// +// got, err := New(test.args.cfg) +// if err := checkFunc(test.want, got, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/versions/GO_VERSION b/versions/GO_VERSION index 20a1265cf3..ce2dd53570 100644 --- a/versions/GO_VERSION +++ b/versions/GO_VERSION @@ -1 +1 @@ -1.21.4 +1.21.5 diff --git a/versions/K3S_VERSION b/versions/K3S_VERSION index 4db534a69d..75e0967887 100644 --- a/versions/K3S_VERSION +++ b/versions/K3S_VERSION @@ -1 +1 @@ -v1.28.4-rc1-k3s1 +v1.28.4-k3s1 diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION index e3212defa2..b406fbef67 100644 --- a/versions/PROMETHEUS_STACK_VERSION +++ b/versions/PROMETHEUS_STACK_VERSION @@ -1 +1 @@ -54.2.2 \ No newline at end of file +55.0.0 diff --git a/versions/YQ_VERSION b/versions/YQ_VERSION index 774c6084ec..5bd5fbc12a 100644 --- a/versions/YQ_VERSION +++ b/versions/YQ_VERSION @@ -1 +1 @@ -v4.40.3 +v4.40.4 From 6a4ac555898163a6a7a64ec6c8782cf86a61a7d3 Mon Sep 17 00:00:00 2001 From: Kiichiro YUKAWA Date: Wed, 6 Dec 2023 15:14:26 +0900 Subject: [PATCH 2/4] [patch] release v1.7.9 (#2257) Co-authored-by: Yusuke Kato From bf77201025321b188ae20a5db4d1145b480a680a Mon Sep 17 00:00:00 2001 From: Vdaas CI Date: Wed, 6 Dec 2023 06:16:21 +0000 Subject: [PATCH 3/4] :bookmark: :robot: Release v1.7.9 Signed-off-by: Vdaas CI --- CHANGELOG.md | 114 +++++++++++++++++++++++++ charts/vald-helm-operator/Chart.yaml | 2 +- charts/vald-helm-operator/README.md | 10 +-- charts/vald-helm-operator/values.yaml | 2 +- charts/vald/Chart.yaml | 2 +- charts/vald/README.md | 4 +- charts/vald/values.yaml | 2 +- k8s/agent/configmap.yaml | 4 +- k8s/agent/pdb.yaml | 4 +- k8s/agent/priorityclass.yaml | 4 +- k8s/agent/statefulset.yaml | 4 +- k8s/agent/svc.yaml | 4 +- k8s/discoverer/clusterrole.yaml | 4 +- k8s/discoverer/clusterrolebinding.yaml | 4 +- k8s/discoverer/configmap.yaml | 4 +- k8s/discoverer/deployment.yaml | 6 +- k8s/discoverer/pdb.yaml | 4 +- k8s/discoverer/priorityclass.yaml | 4 +- k8s/discoverer/serviceaccount.yaml | 4 +- k8s/discoverer/svc.yaml | 4 +- k8s/gateway/lb/configmap.yaml | 4 +- k8s/gateway/lb/deployment.yaml | 6 +- k8s/gateway/lb/hpa.yaml | 4 +- k8s/gateway/lb/pdb.yaml | 4 +- k8s/gateway/lb/priorityclass.yaml | 4 +- k8s/gateway/lb/svc.yaml | 4 +- k8s/manager/index/configmap.yaml | 4 +- k8s/manager/index/deployment.yaml | 6 +- k8s/manager/index/pdb.yaml | 4 +- k8s/manager/index/priorityclass.yaml | 4 +- k8s/manager/index/svc.yaml | 4 +- k8s/operator/helm/operator.yaml | 6 +- k8s/operator/helm/svc.yaml | 4 +- versions/VALD_VERSION | 2 +- 34 files changed, 182 insertions(+), 68 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e1beddd2..36cdd7c670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,119 @@ # CHANGELOG +## v1.7.9 + +### Docker images + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
componentDocker pull
Agent NGT + docker pull vdaas/vald-agent-ngt:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-agent-ngt:v1.7.9 +
Agent sidecar + docker pull vdaas/vald-agent-sidecar:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-agent-sidecar:v1.7.9 +
Discoverers + docker pull vdaas/vald-discoverer-k8s:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-discoverer-k8s:v1.7.9 +
Gateways + docker pull vdaas/vald-lb-gateway:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-lb-gateway:v1.7.9
+ docker pull vdaas/vald-filter-gateway:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-filter-gateway:v1.7.9 +
Index Manager + docker pull vdaas/vald-manager-index:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-manager-index:v1.7.9 +
Helm Operator + docker pull vdaas/vald-helm-operator:v1.7.9
+ docker pull ghcr.io/vdaas/vald/vald-helm-operator:v1.7.9 +
+ +### Documents + +- [GoDoc](https://pkg.go.dev/github.com/vdaas/vald@v1.7.9) +- [Helm Chart Reference](https://github.com/vdaas/vald/blob/v1.7.9/charts/vald/README.md) +- [Helm Operator Chart Reference](https://github.com/vdaas/vald/blob/v1.7.9/charts/vald-helm-operator/README.md) + +### Changes + +:sparkles: New feature + +- Add read replica rotator [#2241](https://github.com/vdaas/vald/pull/2241) +- Implement manifests for Index Management Job [#2235](https://github.com/vdaas/vald/pull/2235) +- Add job error to report index correction error status [#2231](https://github.com/vdaas/vald/pull/2231) +- Add implementation for save index job [#2227](https://github.com/vdaas/vald/pull/2227) +- Add implementation for create index job [#2223](https://github.com/vdaas/vald/pull/2223) +- Add index correction metrics [#2215](https://github.com/vdaas/vald/pull/2215) +- Add index correction document [#2217](https://github.com/vdaas/vald/pull/2217) +- Add make command to update template [#2212](https://github.com/vdaas/vald/pull/2212) +- Add job to check format difference [#2214](https://github.com/vdaas/vald/pull/2214) +- Add verification for index correction e2e and add clusterrole cronjobs for operator to deploy index correction [#2205](https://github.com/vdaas/vald/pull/2205) +- Add StreamListObject to LB [#2203](https://github.com/vdaas/vald/pull/2203) +- Add index correction helm templates and E2E [#2200](https://github.com/vdaas/vald/pull/2200) +- Add index correction internal logic [#2194](https://github.com/vdaas/vald/pull/2194) +- Add bbolt as internal/db/kvs [#2177](https://github.com/vdaas/vald/pull/2177) + +:zap: Improve performance + +- Improve index correction performance [#2234](https://github.com/vdaas/vald/pull/2234) + +:recycle: Refactor + +- Refactor Index Management Job [#2232](https://github.com/vdaas/vald/pull/2232) +- Fix invalid network policy schema [#2230](https://github.com/vdaas/vald/pull/2230) +- Add minikube to create volume snapshot development environment locally [#2228](https://github.com/vdaas/vald/pull/2228) +- Enable ingress resource in the get started document [#2211](https://github.com/vdaas/vald/pull/2211) +- Add step to get k3s latest version [#2206](https://github.com/vdaas/vald/pull/2206) +- Update telepresence and helm-docs installer and update deps [#2195](https://github.com/vdaas/vald/pull/2195) +- Replace x/slices with standard slices pkg [#2193](https://github.com/vdaas/vald/pull/2193) +- add benchmark and check program for core ngt [#2179](https://github.com/vdaas/vald/pull/2179) + +:bug: Bugfix + +- Revert vtpool for ResourceExhausted problem [#2255](https://github.com/vdaas/vald/pull/2255) +- Fix deleted contour ingress controller apply [#2229](https://github.com/vdaas/vald/pull/2229) + +:pencil2: Document + +- Add document for RemoveByTimestamp RPC [#2238](https://github.com/vdaas/vald/pull/2238) + +:green_heart: CI + +- Disable exhaustruct [#2240](https://github.com/vdaas/vald/pull/2240) +- Fix fails when there are format differences [#2226](https://github.com/vdaas/vald/pull/2226) + +:arrow_up: Update dependencies + +- update deps [#2208](https://github.com/vdaas/vald/pull/2208) +- update dependencies [#2260](https://github.com/vdaas/vald/pull/2260) + ## v1.7.8 ### Docker images diff --git a/charts/vald-helm-operator/Chart.yaml b/charts/vald-helm-operator/Chart.yaml index 009a892a99..a63b057ef0 100644 --- a/charts/vald-helm-operator/Chart.yaml +++ b/charts/vald-helm-operator/Chart.yaml @@ -16,7 +16,7 @@ apiVersion: v2 name: vald-helm-operator -version: v1.7.8 +version: v1.7.9 description: A Helm chart for vald-helm-operator type: application keywords: diff --git a/charts/vald-helm-operator/README.md b/charts/vald-helm-operator/README.md index 6ce379c384..e7d6187c3f 100644 --- a/charts/vald-helm-operator/README.md +++ b/charts/vald-helm-operator/README.md @@ -2,7 +2,7 @@ This is a Helm chart to install vald-helm-operator. -Current chart version is `v1.7.8` +Current chart version is `v1.7.9` ## Table of Contents @@ -26,13 +26,13 @@ Run the following command to install the chart, Please upgrade the CRDs first because Helm doesn't have a support to upgrade CRDs. - $ kubectl replace -f https://raw.githubusercontent.com/vdaas/vald/v1.7.8/charts/vald-helm-operator/crds/valdrelease.yaml - $ kubectl replace -f https://raw.githubusercontent.com/vdaas/vald/v1.7.8/charts/vald-helm-operator/crds/valdhelmoperatorrelease.yaml + $ kubectl replace -f https://raw.githubusercontent.com/vdaas/vald/v1.7.9/charts/vald-helm-operator/crds/valdrelease.yaml + $ kubectl replace -f https://raw.githubusercontent.com/vdaas/vald/v1.7.9/charts/vald-helm-operator/crds/valdhelmoperatorrelease.yaml After upgrading CRDs, you can upgrade the operator. If you're using `valdhelmoperatorrelease` (or `vhor`) resource, please update the `spec.image.tag` field of it. - $ kubectl patch vhor vhor-release -p '{"spec":{"image":{"tag":"v1.7.8"}}}' + $ kubectl patch vhor vhor-release -p '{"spec":{"image":{"tag":"v1.7.9"}}}' On the other hand, please update the operator's deployment manually. @@ -79,7 +79,7 @@ spec: {} | healthPort | int | `8081` | port of health endpoint | | image.pullPolicy | string | `"Always"` | image pull policy | | image.repository | string | `"vdaas/vald-helm-operator"` | image repository | -| image.tag | string | `"v1.7.8"` | image tag | +| image.tag | string | `"v1.7.9"` | image tag | | leaderElectionID | string | `"vald-helm-operator"` | name of the configmap that is used for holding the leader lock. | | livenessProbe.enabled | bool | `true` | enable liveness probe. | | livenessProbe.failureThreshold | int | `2` | liveness probe failure threshold | diff --git a/charts/vald-helm-operator/values.yaml b/charts/vald-helm-operator/values.yaml index 7fb5b46add..9146a5068c 100644 --- a/charts/vald-helm-operator/values.yaml +++ b/charts/vald-helm-operator/values.yaml @@ -29,7 +29,7 @@ image: repository: vdaas/vald-helm-operator # @schema {"name": "image.tag", "type": "string"} # image.tag -- image tag - tag: v1.7.8 + tag: v1.7.9 # @schema {"name": "image.pullPolicy", "type": "string", "enum": ["Always", "Never", "IfNotPresent"]} # image.pullPolicy -- image pull policy pullPolicy: Always diff --git a/charts/vald/Chart.yaml b/charts/vald/Chart.yaml index 3e334a47c5..66c573a047 100644 --- a/charts/vald/Chart.yaml +++ b/charts/vald/Chart.yaml @@ -16,7 +16,7 @@ apiVersion: v2 name: vald -version: v1.7.8 +version: v1.7.9 description: A distributed high scalable & high-speed approximate nearest neighbor search engine type: application keywords: diff --git a/charts/vald/README.md b/charts/vald/README.md index 206a3c344c..84f15e818e 100644 --- a/charts/vald/README.md +++ b/charts/vald/README.md @@ -2,7 +2,7 @@ This is a Helm chart to install Vald components. -Current chart version is `v1.7.8` +Current chart version is `v1.7.9` ## Table of Contents @@ -292,7 +292,7 @@ Run the following command to install the chart, | defaults.grpc.client.tls.enabled | bool | `false` | TLS enabled | | defaults.grpc.client.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | | defaults.grpc.client.tls.key | string | `"/path/to/key"` | TLS key path | -| defaults.image.tag | string | `"v1.7.8"` | docker image tag | +| defaults.image.tag | string | `"v1.7.9"` | docker image tag | | defaults.logging.format | string | `"raw"` | logging format. logging format must be `raw` or `json` | | defaults.logging.level | string | `"debug"` | logging level. logging level must be `debug`, `info`, `warn`, `error` or `fatal`. | | defaults.logging.logger | string | `"glg"` | logger name. currently logger must be `glg` or `zap`. | diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index 45a8c9c516..becc93ce12 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -38,7 +38,7 @@ defaults: image: # @schema {"name": "defaults.image.tag", "type": "string"} # defaults.image.tag -- docker image tag - tag: v1.7.8 + tag: v1.7.9 # @schema {"name": "defaults.server_config", "type": "object", "anchor": "server_config"} server_config: # @schema {"name": "defaults.server_config.servers", "type": "object"} diff --git a/k8s/agent/configmap.yaml b/k8s/agent/configmap.yaml index 95c8d5db53..2755223a8d 100644 --- a/k8s/agent/configmap.yaml +++ b/k8s/agent/configmap.yaml @@ -20,10 +20,10 @@ metadata: name: vald-agent-ngt-config labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: agent data: config.yaml: | diff --git a/k8s/agent/pdb.yaml b/k8s/agent/pdb.yaml index a05c8b82da..558050999f 100644 --- a/k8s/agent/pdb.yaml +++ b/k8s/agent/pdb.yaml @@ -20,10 +20,10 @@ metadata: name: vald-agent-ngt labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: agent spec: maxUnavailable: 1 diff --git a/k8s/agent/priorityclass.yaml b/k8s/agent/priorityclass.yaml index bb06971e40..71e64de5c2 100644 --- a/k8s/agent/priorityclass.yaml +++ b/k8s/agent/priorityclass.yaml @@ -20,10 +20,10 @@ metadata: name: default-vald-agent-ngt-priority labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: agent value: 1e+09 preemptionPolicy: Never diff --git a/k8s/agent/statefulset.yaml b/k8s/agent/statefulset.yaml index a471a64624..29f5df8e46 100644 --- a/k8s/agent/statefulset.yaml +++ b/k8s/agent/statefulset.yaml @@ -21,10 +21,10 @@ metadata: labels: app: vald-agent-ngt app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: agent spec: serviceName: vald-agent-ngt diff --git a/k8s/agent/svc.yaml b/k8s/agent/svc.yaml index 4855f9b24a..9cacdb4540 100644 --- a/k8s/agent/svc.yaml +++ b/k8s/agent/svc.yaml @@ -20,10 +20,10 @@ metadata: name: vald-agent-ngt labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: agent spec: ports: diff --git a/k8s/discoverer/clusterrole.yaml b/k8s/discoverer/clusterrole.yaml index 4853ebdf8d..2a1e1478c3 100644 --- a/k8s/discoverer/clusterrole.yaml +++ b/k8s/discoverer/clusterrole.yaml @@ -20,10 +20,10 @@ metadata: name: discoverer labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer rules: - apiGroups: diff --git a/k8s/discoverer/clusterrolebinding.yaml b/k8s/discoverer/clusterrolebinding.yaml index f57a62e4bb..5894eda4e2 100644 --- a/k8s/discoverer/clusterrolebinding.yaml +++ b/k8s/discoverer/clusterrolebinding.yaml @@ -20,10 +20,10 @@ metadata: name: discoverer labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/k8s/discoverer/configmap.yaml b/k8s/discoverer/configmap.yaml index 0981e81cc9..6c543a8566 100644 --- a/k8s/discoverer/configmap.yaml +++ b/k8s/discoverer/configmap.yaml @@ -20,10 +20,10 @@ metadata: name: vald-discoverer-config labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer data: config.yaml: | diff --git a/k8s/discoverer/deployment.yaml b/k8s/discoverer/deployment.yaml index a101ae2bfb..4740c36daf 100644 --- a/k8s/discoverer/deployment.yaml +++ b/k8s/discoverer/deployment.yaml @@ -21,10 +21,10 @@ metadata: labels: app: vald-discoverer app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer spec: progressDeadlineSeconds: 600 @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: discoverer annotations: - checksum/configmap: 746a676a7aab3674d9563973152ed5f9381c544a7a09029123545644b4b324cb + checksum/configmap: 6eee25d7cd882f4ac6e09711a13d8f8fd13953a90157a8fe97ecc5ac2007a846 profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-discoverer diff --git a/k8s/discoverer/pdb.yaml b/k8s/discoverer/pdb.yaml index f070c0ce64..ba429cb6f6 100644 --- a/k8s/discoverer/pdb.yaml +++ b/k8s/discoverer/pdb.yaml @@ -20,10 +20,10 @@ metadata: name: vald-discoverer labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer spec: maxUnavailable: 50% diff --git a/k8s/discoverer/priorityclass.yaml b/k8s/discoverer/priorityclass.yaml index e313d469ea..770b21b7df 100644 --- a/k8s/discoverer/priorityclass.yaml +++ b/k8s/discoverer/priorityclass.yaml @@ -20,10 +20,10 @@ metadata: name: default-vald-discoverer-priority labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer value: 1e+06 globalDefault: false diff --git a/k8s/discoverer/serviceaccount.yaml b/k8s/discoverer/serviceaccount.yaml index 8de90de8fc..d549a63d57 100644 --- a/k8s/discoverer/serviceaccount.yaml +++ b/k8s/discoverer/serviceaccount.yaml @@ -20,8 +20,8 @@ metadata: name: vald labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer diff --git a/k8s/discoverer/svc.yaml b/k8s/discoverer/svc.yaml index a9d662fd93..dc12af1094 100644 --- a/k8s/discoverer/svc.yaml +++ b/k8s/discoverer/svc.yaml @@ -20,10 +20,10 @@ metadata: name: vald-discoverer labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: discoverer spec: ports: diff --git a/k8s/gateway/lb/configmap.yaml b/k8s/gateway/lb/configmap.yaml index 95c2213a30..13f89b7a68 100644 --- a/k8s/gateway/lb/configmap.yaml +++ b/k8s/gateway/lb/configmap.yaml @@ -20,10 +20,10 @@ metadata: name: vald-lb-gateway-config labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb data: config.yaml: | diff --git a/k8s/gateway/lb/deployment.yaml b/k8s/gateway/lb/deployment.yaml index 0fe2701649..34d740a8d3 100644 --- a/k8s/gateway/lb/deployment.yaml +++ b/k8s/gateway/lb/deployment.yaml @@ -21,10 +21,10 @@ metadata: labels: app: vald-lb-gateway app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb spec: progressDeadlineSeconds: 600 @@ -46,7 +46,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: gateway-lb annotations: - checksum/configmap: 47c7b85502d24ca8acb076f6a65dcf2f366f0e5f1c0fc17b6fe63b23cc9126bd + checksum/configmap: 4010cece6ef10a3d1ffd1d2f16b2a0039c9495fc6ea6eb39a034f7977cb85ebf profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-lb-gateway diff --git a/k8s/gateway/lb/hpa.yaml b/k8s/gateway/lb/hpa.yaml index 822a4cf298..11e156ff1c 100644 --- a/k8s/gateway/lb/hpa.yaml +++ b/k8s/gateway/lb/hpa.yaml @@ -20,10 +20,10 @@ metadata: name: vald-lb-gateway labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb spec: maxReplicas: 9 diff --git a/k8s/gateway/lb/pdb.yaml b/k8s/gateway/lb/pdb.yaml index e12931db02..9dfa1f1e74 100644 --- a/k8s/gateway/lb/pdb.yaml +++ b/k8s/gateway/lb/pdb.yaml @@ -20,10 +20,10 @@ metadata: name: vald-lb-gateway labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb spec: maxUnavailable: 50% diff --git a/k8s/gateway/lb/priorityclass.yaml b/k8s/gateway/lb/priorityclass.yaml index 8fef2f7496..9546bed88e 100644 --- a/k8s/gateway/lb/priorityclass.yaml +++ b/k8s/gateway/lb/priorityclass.yaml @@ -20,10 +20,10 @@ metadata: name: default-vald-lb-gateway-priority labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb value: 1e+06 globalDefault: false diff --git a/k8s/gateway/lb/svc.yaml b/k8s/gateway/lb/svc.yaml index 6477737509..71f10b8bff 100644 --- a/k8s/gateway/lb/svc.yaml +++ b/k8s/gateway/lb/svc.yaml @@ -20,10 +20,10 @@ metadata: name: vald-lb-gateway labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: gateway-lb spec: ports: diff --git a/k8s/manager/index/configmap.yaml b/k8s/manager/index/configmap.yaml index a1ffc2fb85..fb1f79b1fe 100644 --- a/k8s/manager/index/configmap.yaml +++ b/k8s/manager/index/configmap.yaml @@ -20,10 +20,10 @@ metadata: name: vald-manager-index-config labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: manager-index data: config.yaml: | diff --git a/k8s/manager/index/deployment.yaml b/k8s/manager/index/deployment.yaml index c4ff868c60..4f9e03c6fd 100644 --- a/k8s/manager/index/deployment.yaml +++ b/k8s/manager/index/deployment.yaml @@ -21,10 +21,10 @@ metadata: labels: app: vald-manager-index app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: manager-index spec: progressDeadlineSeconds: 600 @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: manager-index annotations: - checksum/configmap: 4b9dba68fee39c3ddca9e47b033afd6e63e7ae603007a1bb2b381a8eee79154a + checksum/configmap: bba5e07242ed041636e98ef75845a491ec2cd009e3c350f3d8b6d47bfd234888 profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-manager-index diff --git a/k8s/manager/index/pdb.yaml b/k8s/manager/index/pdb.yaml index 241f47e9a4..d32d8dc02b 100644 --- a/k8s/manager/index/pdb.yaml +++ b/k8s/manager/index/pdb.yaml @@ -20,10 +20,10 @@ metadata: name: vald-manager-index labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: manager-index spec: maxUnavailable: 50% diff --git a/k8s/manager/index/priorityclass.yaml b/k8s/manager/index/priorityclass.yaml index 3ba618b0fd..aac678e2cb 100644 --- a/k8s/manager/index/priorityclass.yaml +++ b/k8s/manager/index/priorityclass.yaml @@ -20,10 +20,10 @@ metadata: name: default-vald-manager-index-priority labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: manager-index value: 1e+06 globalDefault: false diff --git a/k8s/manager/index/svc.yaml b/k8s/manager/index/svc.yaml index 410cd9c95b..3dccfe08aa 100644 --- a/k8s/manager/index/svc.yaml +++ b/k8s/manager/index/svc.yaml @@ -20,10 +20,10 @@ metadata: name: vald-manager-index labels: app.kubernetes.io/name: vald - helm.sh/chart: vald-v1.7.8 + helm.sh/chart: vald-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: manager-index spec: ports: diff --git a/k8s/operator/helm/operator.yaml b/k8s/operator/helm/operator.yaml index 55397546d9..8944685df0 100644 --- a/k8s/operator/helm/operator.yaml +++ b/k8s/operator/helm/operator.yaml @@ -22,10 +22,10 @@ metadata: labels: app: vald-helm-operator app.kubernetes.io/name: vald-helm-operator - helm.sh/chart: vald-helm-operator-v1.7.8 + helm.sh/chart: vald-helm-operator-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: helm-operator spec: replicas: 2 @@ -43,7 +43,7 @@ spec: serviceAccountName: vald-helm-operator containers: - name: vald-helm-operator - image: "vdaas/vald-helm-operator:v1.7.8" + image: "vdaas/vald-helm-operator:v1.7.9" imagePullPolicy: Always args: - "run" diff --git a/k8s/operator/helm/svc.yaml b/k8s/operator/helm/svc.yaml index 6e5c7b9618..b458c79d17 100644 --- a/k8s/operator/helm/svc.yaml +++ b/k8s/operator/helm/svc.yaml @@ -20,10 +20,10 @@ metadata: name: vald-helm-operator labels: app.kubernetes.io/name: vald-helm-operator - helm.sh/chart: vald-helm-operator-v1.7.8 + helm.sh/chart: vald-helm-operator-v1.7.9 app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: release-name - app.kubernetes.io/version: v1.7.8 + app.kubernetes.io/version: v1.7.9 app.kubernetes.io/component: helm-operator spec: ports: diff --git a/versions/VALD_VERSION b/versions/VALD_VERSION index 257d138aae..9767916651 100644 --- a/versions/VALD_VERSION +++ b/versions/VALD_VERSION @@ -1 +1 @@ -v1.7.8 +v1.7.9 From 4fddfb02ea76f534121a7360461a27c4f3679dcd Mon Sep 17 00:00:00 2001 From: Yusuke Kadowaki Date: Wed, 6 Dec 2023 16:52:23 +0900 Subject: [PATCH 4/4] Add cronjob for readreplica rotator (#2242) * Implement sample read replica rotation logic * Add external-snapshotter in go.mod * Add readreplica initial implementation * Add service implementation of readreplica rotator * Add readreplica rotate config * Refactor to read labels * replace id to _MY_TARGET_REPLICA_ID_ * Add snapshot k8s client * Format * Fix snapshot client initialization * Add Apache License to main.go * Use GetConfigOrDie * Use internal/k8s client * Refactor * Use controller-runtime for CRUD in readreplica * Remove snapshot client and use controller-runtime * Move LabelSelector into internal/k8s * Report error to span * Update go modules * Remove old example * Refactor * Disable exhaustruct for now * Fix predeclared * Fix stylecheck * nolint:gomnd * Add test template * Add test for getNewBaseName * Add readreplica-rotate build scripts * Add service account and clusterroles for read replica rotator * Update charts * Update comment * update charts * Update docker image name in Makefile.d/docker.mk * Fix scheme * Update docs * Fix comment * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in 6dba952 according to the output from Gofumpt and Prettier. Details: https://github.com/vdaas/vald/pull/2242 * Fix indent * Add network policy for readreplica rotator * Update README.md --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- .../workflows/dockers-readreplica-rotate.yml | 78 + Makefile | 1 + Makefile.d/build.mk | 29 + Makefile.d/docker.mk | 14 + Makefile.d/k8s.mk | 8 + .../vald-helm-operator/crds/valdrelease.yaml | 625 +++++++ charts/vald/README.md | 1562 +++++++++-------- .../job/readreplica/rotate/clusterrole.yaml | 59 + .../rotate/clusterrolebinding.yaml | 37 + .../job/readreplica/rotate/configmap.yaml | 52 + .../index/job/readreplica/rotate/cronjob.yaml | 79 + .../job/readreplica/rotate/networkpolicy.yaml | 46 + .../readreplica/rotate/serviceaccount.yaml | 29 + charts/vald/values.schema.json | 1103 ++++++++++++ charts/vald/values.yaml | 88 + .../index/job/readreplica/rotate/Dockerfile | 93 + 16 files changed, 3131 insertions(+), 772 deletions(-) create mode 100644 .github/workflows/dockers-readreplica-rotate.yml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/clusterrole.yaml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/clusterrolebinding.yaml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/configmap.yaml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/cronjob.yaml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/networkpolicy.yaml create mode 100644 charts/vald/templates/index/job/readreplica/rotate/serviceaccount.yaml create mode 100644 dockers/index/job/readreplica/rotate/Dockerfile diff --git a/.github/workflows/dockers-readreplica-rotate.yml b/.github/workflows/dockers-readreplica-rotate.yml new file mode 100644 index 0000000000..74eabf441d --- /dev/null +++ b/.github/workflows/dockers-readreplica-rotate.yml @@ -0,0 +1,78 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: "Build docker image: readreplica-rotate" +on: + push: + branches: + - main + tags: + - "*.*.*" + - "v*.*.*" + - "*.*.*-*" + - "v*.*.*-*" + paths: + - ".github/actions/docker-build/actions.yaml" + - ".github/workflows/dockers-readreplica-rotate.yml" + - "go.mod" + - "go.sum" + - "internal/**" + - "!internal/**/*_test.go" + - "!internal/db/**" + - "!internal/k8s/**" + - "apis/grpc/**" + - "pkg/index/job/readreplica/rotate/**" + - "cmd/index/job/readreplica/rotate/**" + - "dockers/index/job/readreplica/rotate/Dockerfile" + - "versions/GO_VERSION" + pull_request: + paths: + - ".github/actions/docker-build/actions.yaml" + - ".github/workflows/_docker-image.yaml" + - ".github/workflows/dockers-readreplica-rotate.yml" + - "go.mod" + - "go.sum" + - "internal/**" + - "!internal/**/*_test.go" + - "!internal/db/**" + - "!internal/k8s/**" + - "apis/grpc/**" + - "pkg/index/job/readreplica/rotate/**" + - "cmd/index/job/readreplica/rotate/**" + - "dockers/index/job/readreplica/rotate/Dockerfile" + - "versions/GO_VERSION" + pull_request_target: + paths: + - ".github/actions/docker-build/actions.yaml" + - ".github/workflows/_docker-image.yaml" + - ".github/workflows/dockers-readreplica-rotate.yml" + - "go.mod" + - "go.sum" + - "internal/**" + - "!internal/**/*_test.go" + - "!internal/db/**" + - "!internal/k8s/**" + - "apis/grpc/**" + - "pkg/index/job/readreplica/rotate/**" + - "cmd/index/job/readreplica/rotate/**" + - "dockers/index/job/readreplica/rotate/Dockerfile" + - "versions/GO_VERSION" + +jobs: + build: + uses: ./.github/workflows/_docker-image.yaml + with: + target: readreplica-rotate + secrets: inherit diff --git a/Makefile b/Makefile index 4a82f747b6..47278d014c 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ LOADTEST_IMAGE = $(NAME)-loadtest INDEX_CORRECTION_IMAGE = $(NAME)-index-correction INDEX_CREATION_IMAGE = $(NAME)-index-creation INDEX_SAVE_IMAGE = $(NAME)-index-save +READREPLICA_ROTATE_IMAGE = $(NAME)-readreplica-rotate MANAGER_INDEX_IMAGE = $(NAME)-manager-index MAINTAINER = "$(ORG).org $(NAME) team <$(NAME)@$(ORG).org>" diff --git a/Makefile.d/build.mk b/Makefile.d/build.mk index 8bc4fbb444..0911abaf4f 100644 --- a/Makefile.d/build.mk +++ b/Makefile.d/build.mk @@ -293,6 +293,35 @@ cmd/index/job/save/index-save: \ $(dir $@)main.go $@ -version +cmd/index/job/readreplica/rotate/readreplica-rotate: \ + $(GO_SOURCES_INTERNAL) \ + $(PBGOS) \ + $(shell find $(ROOTDIR)/cmd/index/job/readreplica/rotate -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ + $(shell find $(ROOTDIR)/pkg/index/job/readreplica/rotate -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') + $(eval CGO_ENABLED = 0) + CGO_ENABLED=$(CGO_ENABLED) \ + GO111MODULE=on \ + GOPRIVATE=$(GOPRIVATE) \ + go build \ + --ldflags "-w -extldflags=-static \ + -X '$(GOPKG)/internal/info.Version=$(VERSION)' \ + -X '$(GOPKG)/internal/info.GitCommit=$(GIT_COMMIT)' \ + -X '$(GOPKG)/internal/info.BuildTime=$(DATETIME)' \ + -X '$(GOPKG)/internal/info.GoVersion=$(GO_VERSION)' \ + -X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \ + -X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \ + -X '$(GOPKG)/internal/info.CGOEnabled=$(CGO_ENABLED)' \ + -X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \ + -buildid=" \ + -mod=readonly \ + -modcacherw \ + -a \ + -tags "osusergo netgo static_build" \ + -trimpath \ + -o $@ \ + $(dir $@)main.go + $@ -version + .PHONY: binary/build/zip ## build all binaries and zip them binary/build/zip: \ diff --git a/Makefile.d/docker.mk b/Makefile.d/docker.mk index 7c1bb74e7c..b630073223 100644 --- a/Makefile.d/docker.mk +++ b/Makefile.d/docker.mk @@ -230,3 +230,17 @@ docker/build/index-save: -t $(ORG)/$(INDEX_SAVE_IMAGE):$(TAG) . \ --build-arg MAINTAINER=$(MAINTAINER) \ --build-arg GO_VERSION=$(GO_VERSION) + +.PHONY: docker/name/readreplica-rotate +docker/name/readreplica-rotate: + @echo "$(ORG)/$(READREPLICA_ROTATE_IMAGE)" + +.PHONY: docker/build/readreplica-rotate +## build readreplica-rotate image +docker/build/readreplica-rotate: + $(DOCKER) build \ + $(DOCKER_OPTS) \ + -f dockers/index/job/readreplica/rotate/Dockerfile \ + -t $(ORG)/$(READREPLICA_ROTATE_IMAGE):$(TAG) . \ + --build-arg MAINTAINER=$(MAINTAINER) \ + --build-arg GO_VERSION=$(GO_VERSION) diff --git a/Makefile.d/k8s.mk b/Makefile.d/k8s.mk index 6ee28a3bae..c55c533659 100644 --- a/Makefile.d/k8s.mk +++ b/Makefile.d/k8s.mk @@ -38,6 +38,7 @@ k8s/manifest/update: \ mkdir -p k8s/gateway mkdir -p k8s/manager mkdir -p k8s/index/job + mkdir -p k8s/index/job/readreplica mv $(TEMP_DIR)/vald/templates/agent k8s/agent mv $(TEMP_DIR)/vald/templates/discoverer k8s/discoverer mv $(TEMP_DIR)/vald/templates/gateway/lb k8s/gateway/lb @@ -45,6 +46,7 @@ k8s/manifest/update: \ mv $(TEMP_DIR)/vald/templates/index/job/correction k8s/index/job/correction mv $(TEMP_DIR)/vald/templates/index/job/creation k8s/index/job/creation mv $(TEMP_DIR)/vald/templates/index/job/save k8s/index/job/save + mv $(TEMP_DIR)/vald/templates/index/job/readreplica/rotate k8s/index/job/readreplica/rotate rm -rf $(TEMP_DIR) .PHONY: k8s/manifest/helm-operator/clean @@ -87,6 +89,9 @@ k8s/vald/deploy: kubectl apply -f $(TEMP_DIR)/vald/templates/discoverer || true kubectl apply -f $(TEMP_DIR)/vald/templates/gateway/lb || true kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/correction || true + kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/creation || true + kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/save || true + kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/readreplica/rotate || true rm -rf $(TEMP_DIR) kubectl get pods -o jsonpath="{.items[*].spec.containers[*].image}" | tr " " "\n" @@ -104,6 +109,9 @@ k8s/vald/delete: --set manager.index.image.repository=$(CRORG)/$(MANAGER_INDEX_IMAGE) \ --output-dir $(TEMP_DIR) \ charts/vald + kubectl delete -f $(TEMP_DIR)/vald/templates/index/job/readreplica/rotate + kubectl delete -f $(TEMP_DIR)/vald/templates/index/job/save + kubectl delete -f $(TEMP_DIR)/vald/templates/index/job/creation kubectl delete -f $(TEMP_DIR)/vald/templates/index/job/correction kubectl delete -f $(TEMP_DIR)/vald/templates/gateway/lb kubectl delete -f $(TEMP_DIR)/vald/templates/manager/index diff --git a/charts/vald-helm-operator/crds/valdrelease.yaml b/charts/vald-helm-operator/crds/valdrelease.yaml index d61dde21d6..936f1093e1 100644 --- a/charts/vald-helm-operator/crds/valdrelease.yaml +++ b/charts/vald-helm-operator/crds/valdrelease.yaml @@ -8536,6 +8536,631 @@ spec: x-kubernetes-preserve-unknown-fields: true progressDeadlineSeconds: type: integer + readreplica: + type: object + properties: + rotator: + type: object + properties: + agent_namespace: + type: string + clusterRole: + type: object + properties: + enabled: + type: boolean + name: + type: string + clusterRoleBinding: + type: object + properties: + enabled: + type: boolean + name: + type: string + env: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + image: + type: object + properties: + pullPolicy: + type: string + enum: + - Always + - Never + - IfNotPresent + repository: + type: string + tag: + type: string + initContainers: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + name: + type: string + observability: + type: object + properties: + enabled: + type: boolean + metrics: + type: object + properties: + enable_cgo: + type: boolean + enable_goroutine: + type: boolean + enable_memory: + type: boolean + enable_version_info: + type: boolean + version_info_labels: + type: array + items: + type: string + enum: + - vald_version + - server_name + - git_commit + - build_time + - go_version + - go_os + - go_arch + - cgo_enabled + - ngt_version + - build_cpu_info_flags + otlp: + type: object + properties: + attribute: + type: object + properties: + namespace: + type: string + node_name: + type: string + pod_name: + type: string + service_name: + type: string + collector_endpoint: + type: string + metrics_export_interval: + type: string + metrics_export_timeout: + type: string + trace_batch_timeout: + type: string + trace_export_timeout: + type: string + trace_max_export_batch_size: + type: integer + trace_max_queue_size: + type: integer + trace: + type: object + properties: + enabled: + type: boolean + read_replica_id: + type: string + server_config: + type: object + properties: + full_shutdown_duration: + type: string + healths: + type: object + properties: + liveness: + type: object + properties: + enabled: + type: boolean + host: + type: string + livenessProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + socket_option: + type: object + properties: + ip_recover_destination_addr: + type: boolean + ip_transparent: + type: boolean + reuse_addr: + type: boolean + reuse_port: + type: boolean + tcp_cork: + type: boolean + tcp_defer_accept: + type: boolean + tcp_fast_open: + type: boolean + tcp_no_delay: + type: boolean + tcp_quick_ack: + type: boolean + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + readiness: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + readinessProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + socket_option: + type: object + properties: + ip_recover_destination_addr: + type: boolean + ip_transparent: + type: boolean + reuse_addr: + type: boolean + reuse_port: + type: boolean + tcp_cork: + type: boolean + tcp_defer_accept: + type: boolean + tcp_fast_open: + type: boolean + tcp_no_delay: + type: boolean + tcp_quick_ack: + type: boolean + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + startup: + type: object + properties: + enabled: + type: boolean + port: + type: integer + maximum: 65535 + minimum: 0 + startupProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + metrics: + type: object + properties: + pprof: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + socket_option: + type: object + properties: + ip_recover_destination_addr: + type: boolean + ip_transparent: + type: boolean + reuse_addr: + type: boolean + reuse_port: + type: boolean + tcp_cork: + type: boolean + tcp_defer_accept: + type: boolean + tcp_fast_open: + type: boolean + tcp_no_delay: + type: boolean + tcp_quick_ack: + type: boolean + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + servers: + type: object + properties: + grpc: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + grpc: + type: object + properties: + bidirectional_stream_concurrency: + type: integer + connection_timeout: + type: string + enable_reflection: + type: boolean + header_table_size: + type: integer + initial_conn_window_size: + type: integer + initial_window_size: + type: integer + interceptors: + type: array + items: + type: string + enum: + - RecoverInterceptor + - AccessLogInterceptor + - TraceInterceptor + - MetricInterceptor + keepalive: + type: object + properties: + max_conn_age: + type: string + max_conn_age_grace: + type: string + max_conn_idle: + type: string + min_time: + type: string + permit_without_stream: + type: boolean + time: + type: string + timeout: + type: string + max_header_list_size: + type: integer + max_receive_message_size: + type: integer + max_send_message_size: + type: integer + read_buffer_size: + type: integer + write_buffer_size: + type: integer + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + restart: + type: boolean + socket_option: + type: object + properties: + ip_recover_destination_addr: + type: boolean + ip_transparent: + type: boolean + reuse_addr: + type: boolean + reuse_port: + type: boolean + tcp_cork: + type: boolean + tcp_defer_accept: + type: boolean + tcp_fast_open: + type: boolean + tcp_no_delay: + type: boolean + tcp_quick_ack: + type: boolean + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + rest: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + socket_option: + type: object + properties: + ip_recover_destination_addr: + type: boolean + ip_transparent: + type: boolean + reuse_addr: + type: boolean + reuse_port: + type: boolean + tcp_cork: + type: boolean + tcp_defer_accept: + type: boolean + tcp_fast_open: + type: boolean + tcp_no_delay: + type: boolean + tcp_quick_ack: + type: boolean + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + tls: + type: object + properties: + ca: + type: string + cert: + type: string + enabled: + type: boolean + insecure_skip_verify: + type: boolean + key: + type: string + serviceAccount: + type: object + properties: + enabled: + type: boolean + name: + type: string + ttlSecondsAfterFinished: + type: integer + version: + type: string + pattern: ^v[0-9]+\.[0-9]+\.[0-9]$ replicas: type: integer minimum: 0 diff --git a/charts/vald/README.md b/charts/vald/README.md index 84f15e818e..a2d089acc5 100644 --- a/charts/vald/README.md +++ b/charts/vald/README.md @@ -44,775 +44,793 @@ Run the following command to install the chart, ### Parameters -| Key | Type | Default | Description | -| ----------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| agent.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | -| agent.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | -| agent.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | -| agent.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| agent.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-agent-ngt"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | -| agent.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | -| agent.annotations | object | `{}` | deployment annotations | -| agent.enabled | bool | `true` | agent enabled | -| agent.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| agent.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| agent.hpa.enabled | bool | `false` | HPA enabled | -| agent.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | -| agent.image.pullPolicy | string | `"Always"` | image pull policy | -| agent.image.repository | string | `"vdaas/vald-agent-ngt"` | image repository | -| agent.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| agent.initContainers | list | `[]` | init containers | -| agent.kind | string | `"StatefulSet"` | deployment kind: Deployment, DaemonSet or StatefulSet | -| agent.logging | object | `{}` | logging config (overrides defaults.logging) | -| agent.maxReplicas | int | `300` | maximum number of replicas. if HPA is disabled, this value will be ignored. | -| agent.maxUnavailable | string | `"1"` | maximum number of unavailable replicas | -| agent.minReplicas | int | `20` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | -| agent.name | string | `"vald-agent-ngt"` | name of agent deployment | -| agent.ngt.auto_create_index_pool_size | int | `16` | batch process pool size of automatic create index operation | -| agent.ngt.auto_index_check_duration | string | `"30m"` | check duration of automatic indexing | -| agent.ngt.auto_index_duration_limit | string | `"24h"` | limit duration of automatic indexing | -| agent.ngt.auto_index_length | int | `100` | number of cache to trigger automatic indexing | -| agent.ngt.auto_save_index_duration | string | `"35m"` | duration of automatic save index | -| agent.ngt.broken_index_history_limit | int | `0` | maximum number of broken index generations to backup | -| agent.ngt.bulk_insert_chunk_size | int | `10` | bulk insert chunk size | -| agent.ngt.creation_edge_size | int | `20` | creation edge size | -| agent.ngt.default_epsilon | float | `0.1` | default epsilon used for search | -| agent.ngt.default_pool_size | int | `16` | default create index batch pool size | -| agent.ngt.default_radius | float | `-1` | default radius used for search | -| agent.ngt.dimension | int | `4096` | vector dimension | -| agent.ngt.distance_type | string | `"l2"` | distance type. it should be `l1`, `l2`, `angle`, `hamming`, `cosine`,`poincare`, `lorentz`, `jaccard`, `sparsejaccard`, `normalizedangle` or `normalizedcosine`. for further details about NGT libraries supported distance is https://github.com/yahoojapan/NGT/wiki/Command-Quick-Reference and vald agent's supported NGT distance type is https://pkg.go.dev/github.com/vdaas/vald/internal/core/algorithm/ngt#pkg-constants | -| agent.ngt.enable_copy_on_write | bool | `false` | enable copy on write saving for more stable backup | -| agent.ngt.enable_in_memory_mode | bool | `true` | in-memory mode enabled | -| agent.ngt.enable_proactive_gc | bool | `false` | enable proactive GC call for reducing heap memory allocation | -| agent.ngt.error_buffer_limit | int | `10` | maximum number of core ngt error buffer pool size limit | -| agent.ngt.index_path | string | `""` | path to index data | -| agent.ngt.initial_delay_max_duration | string | `"3m"` | maximum duration for initial delay | -| agent.ngt.kvsdb.concurrency | int | `6` | kvsdb processing concurrency | -| agent.ngt.load_index_timeout_factor | string | `"1ms"` | a factor of load index timeout. timeout duration will be calculated by (index count to be loaded) \* (factor). | -| agent.ngt.max_load_index_timeout | string | `"10m"` | maximum duration of load index timeout | -| agent.ngt.min_load_index_timeout | string | `"3m"` | minimum duration of load index timeout | -| agent.ngt.object_type | string | `"float"` | object type. it should be `float` or `uint8` or `float16`. for further details: https://github.com/yahoojapan/NGT/wiki/Command-Quick-Reference | -| agent.ngt.search_edge_size | int | `10` | search edge size | -| agent.ngt.vqueue.delete_buffer_pool_size | int | `5000` | delete slice pool buffer size | -| agent.ngt.vqueue.insert_buffer_pool_size | int | `10000` | insert slice pool buffer size | -| agent.nodeName | string | `""` | node name | -| agent.nodeSelector | object | `{}` | node selector | -| agent.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent-ngt"}}}` | observability config (overrides defaults.observability) | -| agent.persistentVolume.accessMode | string | `"ReadWriteOncePod"` | agent pod storage accessMode | -| agent.persistentVolume.enabled | bool | `false` | enables PVC. It is required to enable if agent pod's file store functionality is enabled with non in-memory mode | -| agent.persistentVolume.mountPropagation | string | `"None"` | agent pod storage mountPropagation | -| agent.persistentVolume.size | string | `"100Gi"` | size of agent pod volume | -| agent.persistentVolume.storageClass | string | `"vald-sc"` | storageClass name for agent pod volume | -| agent.podAnnotations | object | `{}` | pod annotations | -| agent.podManagementPolicy | string | `"OrderedReady"` | pod management policy: OrderedReady or Parallel | -| agent.podPriority.enabled | bool | `true` | agent pod PriorityClass enabled | -| agent.podPriority.value | int | `1000000000` | agent pod PriorityClass value | -| agent.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | -| agent.progressDeadlineSeconds | int | `600` | progress deadline seconds | -| agent.resources | object | `{"requests":{"cpu":"300m","memory":"4Gi"}}` | compute resources. recommended setting of memory requests = cluster memory \* 0.4 / number of agent pods | -| agent.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | -| agent.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | -| agent.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | -| agent.rollingUpdate.partition | int | `0` | StatefulSet partition | -| agent.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":false,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | -| agent.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{"startupProbe":{"failureThreshold":200,"periodSeconds":5}}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| agent.service.annotations | object | `{}` | service annotations | -| agent.service.labels | object | `{}` | service labels | -| agent.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| agent.sidecar.config.auto_backup_duration | string | `"24h"` | auto backup duration | -| agent.sidecar.config.auto_backup_enabled | bool | `true` | auto backup triggered by timer is enabled | -| agent.sidecar.config.blob_storage.bucket | string | `""` | bucket name | -| agent.sidecar.config.blob_storage.cloud_storage.client.credentials_file_path | string | `""` | credentials file path | -| agent.sidecar.config.blob_storage.cloud_storage.client.credentials_json | string | `""` | credentials json | -| agent.sidecar.config.blob_storage.cloud_storage.url | string | `""` | cloud storage url | -| agent.sidecar.config.blob_storage.cloud_storage.write_buffer_size | int | `0` | bytes of the chunks for upload | -| agent.sidecar.config.blob_storage.cloud_storage.write_cache_control | string | `""` | Cache-Control of HTTP Header | -| agent.sidecar.config.blob_storage.cloud_storage.write_content_disposition | string | `""` | Content-Disposition of HTTP Header | -| agent.sidecar.config.blob_storage.cloud_storage.write_content_encoding | string | `""` | the encoding of the blob's content | -| agent.sidecar.config.blob_storage.cloud_storage.write_content_language | string | `""` | the language of blob's content | -| agent.sidecar.config.blob_storage.cloud_storage.write_content_type | string | `""` | MIME type of the blob | -| agent.sidecar.config.blob_storage.s3.access_key | string | `"_AWS_ACCESS_KEY_"` | s3 access key | -| agent.sidecar.config.blob_storage.s3.enable_100_continue | bool | `true` | enable AWS SDK adding the 'Expect: 100-Continue' header to PUT requests over 2MB of content. | -| agent.sidecar.config.blob_storage.s3.enable_content_md5_validation | bool | `true` | enable the S3 client to add MD5 checksum to upload API calls. | -| agent.sidecar.config.blob_storage.s3.enable_endpoint_discovery | bool | `false` | enable endpoint discovery | -| agent.sidecar.config.blob_storage.s3.enable_endpoint_host_prefix | bool | `true` | enable prefixing request endpoint hosts with modeled information | -| agent.sidecar.config.blob_storage.s3.enable_param_validation | bool | `true` | enables semantic parameter validation | -| agent.sidecar.config.blob_storage.s3.enable_ssl | bool | `true` | enable ssl for s3 session | -| agent.sidecar.config.blob_storage.s3.endpoint | string | `""` | s3 endpoint | -| agent.sidecar.config.blob_storage.s3.force_path_style | bool | `false` | use path-style addressing | -| agent.sidecar.config.blob_storage.s3.max_chunk_size | string | `"64mb"` | s3 download max chunk size | -| agent.sidecar.config.blob_storage.s3.max_part_size | string | `"64mb"` | s3 multipart upload max part size | -| agent.sidecar.config.blob_storage.s3.max_retries | int | `3` | maximum number of retries of s3 client | -| agent.sidecar.config.blob_storage.s3.region | string | `""` | s3 region | -| agent.sidecar.config.blob_storage.s3.secret_access_key | string | `"_AWS_SECRET_ACCESS_KEY_"` | s3 secret access key | -| agent.sidecar.config.blob_storage.s3.token | string | `""` | s3 token | -| agent.sidecar.config.blob_storage.s3.use_accelerate | bool | `false` | enable s3 accelerate feature | -| agent.sidecar.config.blob_storage.s3.use_arn_region | bool | `false` | s3 service client to use the region specified in the ARN | -| agent.sidecar.config.blob_storage.s3.use_dual_stack | bool | `false` | use dual stack | -| agent.sidecar.config.blob_storage.storage_type | string | `"s3"` | storage type | -| agent.sidecar.config.client.net.dialer.dual_stack_enabled | bool | `false` | HTTP client TCP dialer dual stack enabled | -| agent.sidecar.config.client.net.dialer.keepalive | string | `"5m"` | HTTP client TCP dialer keep alive | -| agent.sidecar.config.client.net.dialer.timeout | string | `"5s"` | HTTP client TCP dialer connect timeout | -| agent.sidecar.config.client.net.dns.cache_enabled | bool | `true` | HTTP client TCP DNS cache enabled | -| agent.sidecar.config.client.net.dns.cache_expiration | string | `"24h"` | | -| agent.sidecar.config.client.net.dns.refresh_duration | string | `"1h"` | HTTP client TCP DNS cache expiration | -| agent.sidecar.config.client.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| agent.sidecar.config.client.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| agent.sidecar.config.client.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| agent.sidecar.config.client.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| agent.sidecar.config.client.net.socket_option.tcp_cork | bool | `true` | server listen socket option for tcp_cork functionality | -| agent.sidecar.config.client.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| agent.sidecar.config.client.net.socket_option.tcp_fast_open | bool | `true` | server listen socket option for tcp_fast_open functionality | -| agent.sidecar.config.client.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| agent.sidecar.config.client.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| agent.sidecar.config.client.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | -| agent.sidecar.config.client.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | -| agent.sidecar.config.client.net.tls.enabled | bool | `false` | TLS enabled | -| agent.sidecar.config.client.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | -| agent.sidecar.config.client.net.tls.key | string | `"/path/to/key"` | TLS key path | -| agent.sidecar.config.client.transport.backoff.backoff_factor | float | `1.1` | backoff backoff factor | -| agent.sidecar.config.client.transport.backoff.backoff_time_limit | string | `"5s"` | backoff time limit | -| agent.sidecar.config.client.transport.backoff.enable_error_log | bool | `true` | backoff error log enabled | -| agent.sidecar.config.client.transport.backoff.initial_duration | string | `"5ms"` | backoff initial duration | -| agent.sidecar.config.client.transport.backoff.jitter_limit | string | `"100ms"` | backoff jitter limit | -| agent.sidecar.config.client.transport.backoff.maximum_duration | string | `"5s"` | backoff maximum duration | -| agent.sidecar.config.client.transport.backoff.retry_count | int | `100` | backoff retry count | -| agent.sidecar.config.client.transport.round_tripper.expect_continue_timeout | string | `"5s"` | expect continue timeout | -| agent.sidecar.config.client.transport.round_tripper.force_attempt_http_2 | bool | `true` | force attempt HTTP2 | -| agent.sidecar.config.client.transport.round_tripper.idle_conn_timeout | string | `"90s"` | timeout for idle connections | -| agent.sidecar.config.client.transport.round_tripper.max_conns_per_host | int | `10` | maximum count of connections per host | -| agent.sidecar.config.client.transport.round_tripper.max_idle_conns | int | `100` | maximum count of idle connections | -| agent.sidecar.config.client.transport.round_tripper.max_idle_conns_per_host | int | `10` | maximum count of idle connections per host | -| agent.sidecar.config.client.transport.round_tripper.max_response_header_size | int | `0` | maximum response header size | -| agent.sidecar.config.client.transport.round_tripper.read_buffer_size | int | `0` | read buffer size | -| agent.sidecar.config.client.transport.round_tripper.response_header_timeout | string | `"5s"` | timeout for response header | -| agent.sidecar.config.client.transport.round_tripper.tls_handshake_timeout | string | `"5s"` | TLS handshake timeout | -| agent.sidecar.config.client.transport.round_tripper.write_buffer_size | int | `0` | write buffer size | -| agent.sidecar.config.compress.compress_algorithm | string | `"gzip"` | compression algorithm. must be `gob`, `gzip`, `lz4` or `zstd` | -| agent.sidecar.config.compress.compression_level | int | `-1` | compression level. value range relies on which algorithm is used. `gob`: level will be ignored. `gzip`: -1 (default compression), 0 (no compression), or 1 (best speed) to 9 (best compression). `lz4`: >= 0, higher is better compression. `zstd`: 1 (fastest) to 22 (best), however implementation relies on klauspost/compress. | -| agent.sidecar.config.filename | string | `"_MY_POD_NAME_"` | backup filename | -| agent.sidecar.config.filename_suffix | string | `".tar.gz"` | suffix for backup filename | -| agent.sidecar.config.post_stop_timeout | string | `"2m"` | timeout for observing file changes during post stop | -| agent.sidecar.config.restore_backoff.backoff_factor | float | `1.2` | restore backoff factor | -| agent.sidecar.config.restore_backoff.backoff_time_limit | string | `"30m"` | restore backoff time limit | -| agent.sidecar.config.restore_backoff.enable_error_log | bool | `true` | restore backoff log enabled | -| agent.sidecar.config.restore_backoff.initial_duration | string | `"1s"` | restore backoff initial duration | -| agent.sidecar.config.restore_backoff.jitter_limit | string | `"10s"` | restore backoff jitter limit | -| agent.sidecar.config.restore_backoff.maximum_duration | string | `"1m"` | restore backoff maximum duration | -| agent.sidecar.config.restore_backoff.retry_count | int | `100` | restore backoff retry count | -| agent.sidecar.config.restore_backoff_enabled | bool | `false` | restore backoff enabled | -| agent.sidecar.config.watch_enabled | bool | `true` | auto backup triggered by file changes is enabled | -| agent.sidecar.enabled | bool | `false` | sidecar enabled | -| agent.sidecar.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}},{"name":"AWS_ACCESS_KEY","valueFrom":{"secretKeyRef":{"key":"access-key","name":"aws-secret"}}},{"name":"AWS_SECRET_ACCESS_KEY","valueFrom":{"secretKeyRef":{"key":"secret-access-key","name":"aws-secret"}}}]` | environment variables | -| agent.sidecar.image.pullPolicy | string | `"Always"` | image pull policy | -| agent.sidecar.image.repository | string | `"vdaas/vald-agent-sidecar"` | image repository | -| agent.sidecar.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| agent.sidecar.initContainerEnabled | bool | `false` | sidecar on initContainer mode enabled. | -| agent.sidecar.logging | object | `{}` | logging config (overrides defaults.logging) | -| agent.sidecar.name | string | `"vald-agent-sidecar"` | name of agent sidecar | -| agent.sidecar.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent-sidecar"}}}` | observability config (overrides defaults.observability) | -| agent.sidecar.resources | object | `{"requests":{"cpu":"100m","memory":"100Mi"}}` | compute resources. | -| agent.sidecar.server_config | object | `{"healths":{"liveness":{"enabled":false,"port":13000,"servicePort":13000},"readiness":{"enabled":false,"port":13001,"servicePort":13001},"startup":{"enabled":false,"port":13001}},"metrics":{"pprof":{"port":16060,"servicePort":16060}},"servers":{"grpc":{"enabled":false,"port":18081,"servicePort":18081},"rest":{"enabled":false,"port":18080,"servicePort":18080}}}` | server config (overrides defaults.server_config) | -| agent.sidecar.service.annotations | object | `{}` | agent sidecar service annotations | -| agent.sidecar.service.enabled | bool | `false` | agent sidecar service enabled | -| agent.sidecar.service.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| agent.sidecar.service.labels | object | `{}` | agent sidecar service labels | -| agent.sidecar.service.type | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| agent.sidecar.time_zone | string | `""` | Time zone | -| agent.sidecar.version | string | `"v0.0.0"` | version of agent sidecar config | -| agent.terminationGracePeriodSeconds | int | `120` | duration in seconds pod needs to terminate gracefully | -| agent.time_zone | string | `""` | Time zone | -| agent.tolerations | list | `[]` | tolerations | -| agent.topologySpreadConstraints | list | `[]` | topology spread constraints for agent pods | -| agent.version | string | `"v0.0.0"` | version of agent config | -| agent.volumeMounts | list | `[]` | volume mounts | -| agent.volumes | list | `[]` | volumes | -| defaults.grpc.client.addrs | list | `[]` | gRPC client addresses | -| defaults.grpc.client.backoff.backoff_factor | float | `1.1` | gRPC client backoff factor | -| defaults.grpc.client.backoff.backoff_time_limit | string | `"5s"` | gRPC client backoff time limit | -| defaults.grpc.client.backoff.enable_error_log | bool | `true` | gRPC client backoff log enabled | -| defaults.grpc.client.backoff.initial_duration | string | `"5ms"` | gRPC client backoff initial duration | -| defaults.grpc.client.backoff.jitter_limit | string | `"100ms"` | gRPC client backoff jitter limit | -| defaults.grpc.client.backoff.maximum_duration | string | `"5s"` | gRPC client backoff maximum duration | -| defaults.grpc.client.backoff.retry_count | int | `100` | gRPC client backoff retry count | -| defaults.grpc.client.call_option.max_recv_msg_size | int | `0` | gRPC client call option max receive message size | -| defaults.grpc.client.call_option.max_retry_rpc_buffer_size | int | `0` | gRPC client call option max retry rpc buffer size | -| defaults.grpc.client.call_option.max_send_msg_size | int | `0` | gRPC client call option max send message size | -| defaults.grpc.client.call_option.wait_for_ready | bool | `true` | gRPC client call option wait for ready | -| defaults.grpc.client.circuit_breaker.closed_error_rate | float | `0.7` | gRPC client circuitbreaker closed error rate | -| defaults.grpc.client.circuit_breaker.closed_refresh_timeout | string | `"10s"` | gRPC client circuitbreaker closed refresh timeout | -| defaults.grpc.client.circuit_breaker.half_open_error_rate | float | `0.5` | gRPC client circuitbreaker half-open error rate | -| defaults.grpc.client.circuit_breaker.min_samples | int | `1000` | gRPC client circuitbreaker minimum sampling count | -| defaults.grpc.client.circuit_breaker.open_timeout | string | `"1s"` | gRPC client circuitbreaker open timeout | -| defaults.grpc.client.connection_pool.enable_dns_resolver | bool | `true` | enables gRPC client connection pool dns resolver, when enabled vald uses ip handshake exclude dns discovery which improves network performance | -| defaults.grpc.client.connection_pool.enable_rebalance | bool | `true` | enables gRPC client connection pool rebalance | -| defaults.grpc.client.connection_pool.old_conn_close_duration | string | `"2m"` | makes delay before gRPC client connection closing during connection pool rebalance | -| defaults.grpc.client.connection_pool.rebalance_duration | string | `"30m"` | gRPC client connection pool rebalance duration | -| defaults.grpc.client.connection_pool.size | int | `3` | gRPC client connection pool size | -| defaults.grpc.client.dial_option.backoff_base_delay | string | `"1s"` | gRPC client dial option base backoff delay | -| defaults.grpc.client.dial_option.backoff_jitter | float | `0.2` | gRPC client dial option base backoff delay | -| defaults.grpc.client.dial_option.backoff_max_delay | string | `"120s"` | gRPC client dial option max backoff delay | -| defaults.grpc.client.dial_option.backoff_multiplier | float | `1.6` | gRPC client dial option base backoff delay | -| defaults.grpc.client.dial_option.enable_backoff | bool | `false` | gRPC client dial option backoff enabled | -| defaults.grpc.client.dial_option.initial_connection_window_size | int | `2097152` | gRPC client dial option initial connection window size | -| defaults.grpc.client.dial_option.initial_window_size | int | `1048576` | gRPC client dial option initial window size | -| defaults.grpc.client.dial_option.insecure | bool | `true` | gRPC client dial option insecure enabled | -| defaults.grpc.client.dial_option.interceptors | list | `[]` | gRPC client interceptors | -| defaults.grpc.client.dial_option.keepalive.permit_without_stream | bool | `false` | gRPC client keep alive permit without stream | -| defaults.grpc.client.dial_option.keepalive.time | string | `""` | gRPC client keep alive time | -| defaults.grpc.client.dial_option.keepalive.timeout | string | `"30s"` | gRPC client keep alive timeout | -| defaults.grpc.client.dial_option.max_msg_size | int | `0` | gRPC client dial option max message size | -| defaults.grpc.client.dial_option.min_connection_timeout | string | `"20s"` | gRPC client dial option minimum connection timeout | -| defaults.grpc.client.dial_option.net.dialer.dual_stack_enabled | bool | `true` | gRPC client TCP dialer dual stack enabled | -| defaults.grpc.client.dial_option.net.dialer.keepalive | string | `""` | gRPC client TCP dialer keep alive | -| defaults.grpc.client.dial_option.net.dialer.timeout | string | `""` | gRPC client TCP dialer timeout | -| defaults.grpc.client.dial_option.net.dns.cache_enabled | bool | `true` | gRPC client TCP DNS cache enabled | -| defaults.grpc.client.dial_option.net.dns.cache_expiration | string | `"1h"` | gRPC client TCP DNS cache expiration | -| defaults.grpc.client.dial_option.net.dns.refresh_duration | string | `"30m"` | gRPC client TCP DNS cache refresh duration | -| defaults.grpc.client.dial_option.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.grpc.client.dial_option.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.grpc.client.dial_option.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.grpc.client.dial_option.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.grpc.client.dial_option.net.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| defaults.grpc.client.dial_option.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.grpc.client.dial_option.net.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | -| defaults.grpc.client.dial_option.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| defaults.grpc.client.dial_option.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| defaults.grpc.client.dial_option.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | -| defaults.grpc.client.dial_option.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | -| defaults.grpc.client.dial_option.net.tls.enabled | bool | `false` | TLS enabled | -| defaults.grpc.client.dial_option.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | -| defaults.grpc.client.dial_option.net.tls.key | string | `"/path/to/key"` | TLS key path | -| defaults.grpc.client.dial_option.read_buffer_size | int | `0` | gRPC client dial option read buffer size | -| defaults.grpc.client.dial_option.timeout | string | `""` | gRPC client dial option timeout | -| defaults.grpc.client.dial_option.write_buffer_size | int | `0` | gRPC client dial option write buffer size | -| defaults.grpc.client.health_check_duration | string | `"1s"` | gRPC client health check duration | -| defaults.grpc.client.tls.ca | string | `"/path/to/ca"` | TLS ca path | -| defaults.grpc.client.tls.cert | string | `"/path/to/cert"` | TLS cert path | -| defaults.grpc.client.tls.enabled | bool | `false` | TLS enabled | -| defaults.grpc.client.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | -| defaults.grpc.client.tls.key | string | `"/path/to/key"` | TLS key path | -| defaults.image.tag | string | `"v1.7.9"` | docker image tag | -| defaults.logging.format | string | `"raw"` | logging format. logging format must be `raw` or `json` | -| defaults.logging.level | string | `"debug"` | logging level. logging level must be `debug`, `info`, `warn`, `error` or `fatal`. | -| defaults.logging.logger | string | `"glg"` | logger name. currently logger must be `glg` or `zap`. | -| defaults.networkPolicy.custom | object | `{"egress":[],"ingress":[]}` | custom network policies that a user can add | -| defaults.networkPolicy.custom.egress | list | `[]` | custom egress network policies that a user can add | -| defaults.networkPolicy.custom.ingress | list | `[]` | custom ingress network policies that a user can add | -| defaults.networkPolicy.enabled | bool | `false` | if network policy enabled | -| defaults.observability.enabled | bool | `false` | observability features enabled | -| defaults.observability.metrics.enable_cgo | bool | `true` | CGO metrics enabled | -| defaults.observability.metrics.enable_goroutine | bool | `true` | goroutine metrics enabled | -| defaults.observability.metrics.enable_memory | bool | `true` | memory metrics enabled | -| defaults.observability.metrics.enable_version_info | bool | `true` | version info metrics enabled | -| defaults.observability.metrics.version_info_labels | list | `["vald_version","server_name","git_commit","build_time","go_version","go_os","go_arch","ngt_version"]` | enabled label names of version info | -| defaults.observability.otlp.attribute | object | `{"namespace":"_MY_POD_NAMESPACE_","node_name":"_MY_NODE_NAME_","pod_name":"_MY_POD_NAME_","service_name":"vald"}` | default resource attribute | -| defaults.observability.otlp.attribute.namespace | string | `"_MY_POD_NAMESPACE_"` | namespace | -| defaults.observability.otlp.attribute.node_name | string | `"_MY_NODE_NAME_"` | node name | -| defaults.observability.otlp.attribute.pod_name | string | `"_MY_POD_NAME_"` | pod name | -| defaults.observability.otlp.attribute.service_name | string | `"vald"` | service name | -| defaults.observability.otlp.collector_endpoint | string | `""` | OpenTelemetry Collector endpoint | -| defaults.observability.otlp.metrics_export_interval | string | `"1s"` | metrics export interval | -| defaults.observability.otlp.metrics_export_timeout | string | `"1m"` | metrics export timeout | -| defaults.observability.otlp.trace_batch_timeout | string | `"1s"` | trace batch timeout | -| defaults.observability.otlp.trace_export_timeout | string | `"1m"` | trace export timeout | -| defaults.observability.otlp.trace_max_export_batch_size | int | `1024` | trace maximum export batch size | -| defaults.observability.otlp.trace_max_queue_size | int | `256` | trace maximum queue size | -| defaults.observability.trace.enabled | bool | `false` | trace enabled | -| defaults.server_config.full_shutdown_duration | string | `"600s"` | server full shutdown duration | -| defaults.server_config.healths.liveness.enabled | bool | `true` | liveness server enabled | -| defaults.server_config.healths.liveness.host | string | `"0.0.0.0"` | liveness server host | -| defaults.server_config.healths.liveness.livenessProbe.failureThreshold | int | `2` | liveness probe failure threshold | -| defaults.server_config.healths.liveness.livenessProbe.httpGet.path | string | `"/liveness"` | liveness probe path | -| defaults.server_config.healths.liveness.livenessProbe.httpGet.port | string | `"liveness"` | liveness probe port | -| defaults.server_config.healths.liveness.livenessProbe.httpGet.scheme | string | `"HTTP"` | liveness probe scheme | -| defaults.server_config.healths.liveness.livenessProbe.initialDelaySeconds | int | `5` | liveness probe initial delay seconds | -| defaults.server_config.healths.liveness.livenessProbe.periodSeconds | int | `3` | liveness probe period seconds | -| defaults.server_config.healths.liveness.livenessProbe.successThreshold | int | `1` | liveness probe success threshold | -| defaults.server_config.healths.liveness.livenessProbe.timeoutSeconds | int | `2` | liveness probe timeout seconds | -| defaults.server_config.healths.liveness.port | int | `3000` | liveness server port | -| defaults.server_config.healths.liveness.server.http.handler_timeout | string | `""` | liveness server handler timeout | -| defaults.server_config.healths.liveness.server.http.idle_timeout | string | `""` | liveness server idle timeout | -| defaults.server_config.healths.liveness.server.http.read_header_timeout | string | `""` | liveness server read header timeout | -| defaults.server_config.healths.liveness.server.http.read_timeout | string | `""` | liveness server read timeout | -| defaults.server_config.healths.liveness.server.http.shutdown_duration | string | `"5s"` | liveness server shutdown duration | -| defaults.server_config.healths.liveness.server.http.write_timeout | string | `""` | liveness server write timeout | -| defaults.server_config.healths.liveness.server.mode | string | `""` | liveness server mode | -| defaults.server_config.healths.liveness.server.network | string | `"tcp"` | mysql network | -| defaults.server_config.healths.liveness.server.probe_wait_time | string | `"3s"` | liveness server probe wait time | -| defaults.server_config.healths.liveness.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.server_config.healths.liveness.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.server_config.healths.liveness.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.server_config.healths.liveness.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.server_config.healths.liveness.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| defaults.server_config.healths.liveness.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.server_config.healths.liveness.server.socket_option.tcp_fast_open | bool | `true` | server listen socket option for tcp_fast_open functionality | -| defaults.server_config.healths.liveness.server.socket_option.tcp_no_delay | bool | `true` | server listen socket option for tcp_no_delay functionality | -| defaults.server_config.healths.liveness.server.socket_option.tcp_quick_ack | bool | `true` | server listen socket option for tcp_quick_ack functionality | -| defaults.server_config.healths.liveness.server.socket_path | string | `""` | mysql socket_path | -| defaults.server_config.healths.liveness.servicePort | int | `3000` | liveness server service port | -| defaults.server_config.healths.readiness.enabled | bool | `true` | readiness server enabled | -| defaults.server_config.healths.readiness.host | string | `"0.0.0.0"` | readiness server host | -| defaults.server_config.healths.readiness.port | int | `3001` | readiness server port | -| defaults.server_config.healths.readiness.readinessProbe.failureThreshold | int | `2` | readiness probe failure threshold | -| defaults.server_config.healths.readiness.readinessProbe.httpGet.path | string | `"/readiness"` | readiness probe path | -| defaults.server_config.healths.readiness.readinessProbe.httpGet.port | string | `"readiness"` | readiness probe port | -| defaults.server_config.healths.readiness.readinessProbe.httpGet.scheme | string | `"HTTP"` | readiness probe scheme | -| defaults.server_config.healths.readiness.readinessProbe.initialDelaySeconds | int | `10` | readiness probe initial delay seconds | -| defaults.server_config.healths.readiness.readinessProbe.periodSeconds | int | `3` | readiness probe period seconds | -| defaults.server_config.healths.readiness.readinessProbe.successThreshold | int | `1` | readiness probe success threshold | -| defaults.server_config.healths.readiness.readinessProbe.timeoutSeconds | int | `2` | readiness probe timeout seconds | -| defaults.server_config.healths.readiness.server.http.handler_timeout | string | `""` | readiness server handler timeout | -| defaults.server_config.healths.readiness.server.http.idle_timeout | string | `""` | readiness server idle timeout | -| defaults.server_config.healths.readiness.server.http.read_header_timeout | string | `""` | readiness server read header timeout | -| defaults.server_config.healths.readiness.server.http.read_timeout | string | `""` | readiness server read timeout | -| defaults.server_config.healths.readiness.server.http.shutdown_duration | string | `"0s"` | readiness server shutdown duration | -| defaults.server_config.healths.readiness.server.http.write_timeout | string | `""` | readiness server write timeout | -| defaults.server_config.healths.readiness.server.mode | string | `""` | readiness server mode | -| defaults.server_config.healths.readiness.server.network | string | `"tcp"` | mysql network | -| defaults.server_config.healths.readiness.server.probe_wait_time | string | `"3s"` | readiness server probe wait time | -| defaults.server_config.healths.readiness.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.server_config.healths.readiness.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.server_config.healths.readiness.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.server_config.healths.readiness.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.server_config.healths.readiness.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| defaults.server_config.healths.readiness.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.server_config.healths.readiness.server.socket_option.tcp_fast_open | bool | `true` | | -| defaults.server_config.healths.readiness.server.socket_option.tcp_no_delay | bool | `true` | server listen socket option for tcp_no_delay functionality | -| defaults.server_config.healths.readiness.server.socket_option.tcp_quick_ack | bool | `true` | server listen socket option for tcp_quick_ack functionality | -| defaults.server_config.healths.readiness.server.socket_path | string | `""` | mysql socket_path | -| defaults.server_config.healths.readiness.servicePort | int | `3001` | readiness server service port | -| defaults.server_config.healths.startup.enabled | bool | `true` | startup server enabled | -| defaults.server_config.healths.startup.port | int | `3000` | startup server port | -| defaults.server_config.healths.startup.startupProbe.failureThreshold | int | `30` | startup probe failure threshold | -| defaults.server_config.healths.startup.startupProbe.httpGet.path | string | `"/liveness"` | startup probe path | -| defaults.server_config.healths.startup.startupProbe.httpGet.port | string | `"liveness"` | startup probe port | -| defaults.server_config.healths.startup.startupProbe.httpGet.scheme | string | `"HTTP"` | startup probe scheme | -| defaults.server_config.healths.startup.startupProbe.initialDelaySeconds | int | `5` | startup probe initial delay seconds | -| defaults.server_config.healths.startup.startupProbe.periodSeconds | int | `5` | startup probe period seconds | -| defaults.server_config.healths.startup.startupProbe.successThreshold | int | `1` | startup probe success threshold | -| defaults.server_config.healths.startup.startupProbe.timeoutSeconds | int | `2` | startup probe timeout seconds | -| defaults.server_config.metrics.pprof.enabled | bool | `false` | pprof server enabled | -| defaults.server_config.metrics.pprof.host | string | `"0.0.0.0"` | pprof server host | -| defaults.server_config.metrics.pprof.port | int | `6060` | pprof server port | -| defaults.server_config.metrics.pprof.server.http.handler_timeout | string | `"5s"` | pprof server handler timeout | -| defaults.server_config.metrics.pprof.server.http.idle_timeout | string | `"2s"` | pprof server idle timeout | -| defaults.server_config.metrics.pprof.server.http.read_header_timeout | string | `"1s"` | pprof server read header timeout | -| defaults.server_config.metrics.pprof.server.http.read_timeout | string | `"1s"` | pprof server read timeout | -| defaults.server_config.metrics.pprof.server.http.shutdown_duration | string | `"5s"` | pprof server shutdown duration | -| defaults.server_config.metrics.pprof.server.http.write_timeout | string | `"1m"` | pprof server write timeout | -| defaults.server_config.metrics.pprof.server.mode | string | `"REST"` | pprof server mode | -| defaults.server_config.metrics.pprof.server.network | string | `"tcp"` | mysql network | -| defaults.server_config.metrics.pprof.server.probe_wait_time | string | `"3s"` | pprof server probe wait time | -| defaults.server_config.metrics.pprof.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.server_config.metrics.pprof.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.server_config.metrics.pprof.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.server_config.metrics.pprof.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.server_config.metrics.pprof.server.socket_option.tcp_cork | bool | `true` | server listen socket option for tcp_cork functionality | -| defaults.server_config.metrics.pprof.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.server_config.metrics.pprof.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | -| defaults.server_config.metrics.pprof.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| defaults.server_config.metrics.pprof.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| defaults.server_config.metrics.pprof.server.socket_path | string | `""` | mysql socket_path | -| defaults.server_config.metrics.pprof.servicePort | int | `6060` | pprof server service port | -| defaults.server_config.servers.grpc.enabled | bool | `true` | gRPC server enabled | -| defaults.server_config.servers.grpc.host | string | `"0.0.0.0"` | gRPC server host | -| defaults.server_config.servers.grpc.port | int | `8081` | gRPC server port | -| defaults.server_config.servers.grpc.server.grpc.bidirectional_stream_concurrency | int | `20` | gRPC server bidirectional stream concurrency | -| defaults.server_config.servers.grpc.server.grpc.connection_timeout | string | `""` | gRPC server connection timeout | -| defaults.server_config.servers.grpc.server.grpc.enable_reflection | bool | `true` | gRPC server reflection option | -| defaults.server_config.servers.grpc.server.grpc.header_table_size | int | `0` | gRPC server header table size | -| defaults.server_config.servers.grpc.server.grpc.initial_conn_window_size | int | `2097152` | gRPC server initial connection window size | -| defaults.server_config.servers.grpc.server.grpc.initial_window_size | int | `1048576` | gRPC server initial window size | -| defaults.server_config.servers.grpc.server.grpc.interceptors | list | `["RecoverInterceptor"]` | gRPC server interceptors | -| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_age | string | `""` | gRPC server keep alive max connection age | -| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_age_grace | string | `""` | gRPC server keep alive max connection age grace | -| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_idle | string | `""` | gRPC server keep alive max connection idle | -| defaults.server_config.servers.grpc.server.grpc.keepalive.min_time | string | `"10m"` | gRPC server keep alive min_time | -| defaults.server_config.servers.grpc.server.grpc.keepalive.permit_without_stream | bool | `false` | gRPC server keep alive permit_without_stream | -| defaults.server_config.servers.grpc.server.grpc.keepalive.time | string | `"3h"` | gRPC server keep alive time | -| defaults.server_config.servers.grpc.server.grpc.keepalive.timeout | string | `"60s"` | gRPC server keep alive timeout | -| defaults.server_config.servers.grpc.server.grpc.max_header_list_size | int | `0` | gRPC server max header list size | -| defaults.server_config.servers.grpc.server.grpc.max_receive_message_size | int | `0` | gRPC server max receive message size | -| defaults.server_config.servers.grpc.server.grpc.max_send_message_size | int | `0` | gRPC server max send message size | -| defaults.server_config.servers.grpc.server.grpc.read_buffer_size | int | `0` | gRPC server read buffer size | -| defaults.server_config.servers.grpc.server.grpc.write_buffer_size | int | `0` | gRPC server write buffer size | -| defaults.server_config.servers.grpc.server.mode | string | `"GRPC"` | gRPC server server mode | -| defaults.server_config.servers.grpc.server.network | string | `"tcp"` | mysql network | -| defaults.server_config.servers.grpc.server.probe_wait_time | string | `"3s"` | gRPC server probe wait time | -| defaults.server_config.servers.grpc.server.restart | bool | `true` | gRPC server restart | -| defaults.server_config.servers.grpc.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.server_config.servers.grpc.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.server_config.servers.grpc.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.server_config.servers.grpc.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.server_config.servers.grpc.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| defaults.server_config.servers.grpc.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.server_config.servers.grpc.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | -| defaults.server_config.servers.grpc.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| defaults.server_config.servers.grpc.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| defaults.server_config.servers.grpc.server.socket_path | string | `""` | mysql socket_path | -| defaults.server_config.servers.grpc.servicePort | int | `8081` | gRPC server service port | -| defaults.server_config.servers.rest.enabled | bool | `false` | REST server enabled | -| defaults.server_config.servers.rest.host | string | `"0.0.0.0"` | REST server host | -| defaults.server_config.servers.rest.port | int | `8080` | REST server port | -| defaults.server_config.servers.rest.server.http.handler_timeout | string | `"5s"` | REST server handler timeout | -| defaults.server_config.servers.rest.server.http.idle_timeout | string | `"2s"` | REST server idle timeout | -| defaults.server_config.servers.rest.server.http.read_header_timeout | string | `"1s"` | REST server read header timeout | -| defaults.server_config.servers.rest.server.http.read_timeout | string | `"1s"` | REST server read timeout | -| defaults.server_config.servers.rest.server.http.shutdown_duration | string | `"5s"` | REST server shutdown duration | -| defaults.server_config.servers.rest.server.http.write_timeout | string | `"1s"` | REST server write timeout | -| defaults.server_config.servers.rest.server.mode | string | `"REST"` | REST server server mode | -| defaults.server_config.servers.rest.server.network | string | `"tcp"` | mysql network | -| defaults.server_config.servers.rest.server.probe_wait_time | string | `"3s"` | REST server probe wait time | -| defaults.server_config.servers.rest.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| defaults.server_config.servers.rest.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| defaults.server_config.servers.rest.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| defaults.server_config.servers.rest.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| defaults.server_config.servers.rest.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| defaults.server_config.servers.rest.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| defaults.server_config.servers.rest.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | -| defaults.server_config.servers.rest.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| defaults.server_config.servers.rest.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| defaults.server_config.servers.rest.server.socket_path | string | `""` | mysql socket_path | -| defaults.server_config.servers.rest.servicePort | int | `8080` | REST server service port | -| defaults.server_config.tls.ca | string | `"/path/to/ca"` | TLS ca path | -| defaults.server_config.tls.cert | string | `"/path/to/cert"` | TLS cert path | -| defaults.server_config.tls.enabled | bool | `false` | TLS enabled | -| defaults.server_config.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | -| defaults.server_config.tls.key | string | `"/path/to/key"` | TLS key path | -| defaults.time_zone | string | `"UTC"` | Time zone | -| discoverer.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | -| discoverer.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | -| discoverer.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | -| discoverer.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| discoverer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-discoverer"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | -| discoverer.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | -| discoverer.annotations | object | `{}` | deployment annotations | -| discoverer.clusterRole.enabled | bool | `true` | creates clusterRole resource | -| discoverer.clusterRole.name | string | `"discoverer"` | name of clusterRole | -| discoverer.clusterRoleBinding.enabled | bool | `true` | creates clusterRoleBinding resource | -| discoverer.clusterRoleBinding.name | string | `"discoverer"` | name of clusterRoleBinding | -| discoverer.discoverer.discovery_duration | string | `"3s"` | duration to discovery | -| discoverer.discoverer.name | string | `""` | name to discovery | -| discoverer.discoverer.namespace | string | `"_MY_POD_NAMESPACE_"` | namespace to discovery | -| discoverer.discoverer.net.dialer.dual_stack_enabled | bool | `false` | TCP dialer dual stack enabled | -| discoverer.discoverer.net.dialer.keepalive | string | `"10m"` | TCP dialer keep alive | -| discoverer.discoverer.net.dialer.timeout | string | `"30s"` | TCP dialer timeout | -| discoverer.discoverer.net.dns.cache_enabled | bool | `true` | TCP DNS cache enabled | -| discoverer.discoverer.net.dns.cache_expiration | string | `"24h"` | TCP DNS cache expiration | -| discoverer.discoverer.net.dns.refresh_duration | string | `"5m"` | TCP DNS cache refresh duration | -| discoverer.discoverer.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | -| discoverer.discoverer.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | -| discoverer.discoverer.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | -| discoverer.discoverer.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | -| discoverer.discoverer.net.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | -| discoverer.discoverer.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | -| discoverer.discoverer.net.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | -| discoverer.discoverer.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | -| discoverer.discoverer.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | -| discoverer.discoverer.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | -| discoverer.discoverer.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | -| discoverer.discoverer.net.tls.enabled | bool | `false` | TLS enabled | -| discoverer.discoverer.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | -| discoverer.discoverer.net.tls.key | string | `"/path/to/key"` | TLS key path | -| discoverer.discoverer.selectors | object | `{"node":{"fields":{},"labels":{}},"node_metrics":{"fields":{},"labels":{}},"pod":{"fields":{},"labels":{}},"pod_metrics":{"fields":{},"labels":{}}}` | k8s resource selectors | -| discoverer.discoverer.selectors.node | object | `{"fields":{},"labels":{}}` | k8s resource selectors for node discovery | -| discoverer.discoverer.selectors.node.fields | object | `{}` | k8s field selectors for node discovery | -| discoverer.discoverer.selectors.node.labels | object | `{}` | k8s label selectors for node discovery | -| discoverer.discoverer.selectors.node_metrics | object | `{"fields":{},"labels":{}}` | k8s resource selectors for node_metrics discovery | -| discoverer.discoverer.selectors.node_metrics.fields | object | `{}` | k8s field selectors for node_metrics discovery | -| discoverer.discoverer.selectors.node_metrics.labels | object | `{}` | k8s label selectors for node_metrics discovery | -| discoverer.discoverer.selectors.pod | object | `{"fields":{},"labels":{}}` | k8s resource selectors for pod discovery | -| discoverer.discoverer.selectors.pod.fields | object | `{}` | k8s field selectors for pod discovery | -| discoverer.discoverer.selectors.pod.labels | object | `{}` | k8s label selectors for pod discovery | -| discoverer.discoverer.selectors.pod_metrics | object | `{"fields":{},"labels":{}}` | k8s resource selectors for pod_metrics discovery | -| discoverer.discoverer.selectors.pod_metrics.fields | object | `{}` | k8s field selectors for pod_metrics discovery | -| discoverer.discoverer.selectors.pod_metrics.labels | object | `{}` | k8s label selectors for pod_metrics discovery | -| discoverer.enabled | bool | `true` | discoverer enabled | -| discoverer.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| discoverer.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| discoverer.hpa.enabled | bool | `false` | HPA enabled | -| discoverer.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | -| discoverer.image.pullPolicy | string | `"Always"` | image pull policy | -| discoverer.image.repository | string | `"vdaas/vald-discoverer-k8s"` | image repository | -| discoverer.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| discoverer.initContainers | list | `[]` | init containers | -| discoverer.internalTrafficPolicy | string | `""` | internal traffic policy : Cluster or Local | -| discoverer.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | -| discoverer.logging | object | `{}` | logging config (overrides defaults.logging) | -| discoverer.maxReplicas | int | `2` | maximum number of replicas. if HPA is disabled, this value will be ignored. | -| discoverer.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | -| discoverer.minReplicas | int | `1` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | -| discoverer.name | string | `"vald-discoverer"` | name of discoverer deployment | -| discoverer.nodeName | string | `""` | node name | -| discoverer.nodeSelector | object | `{}` | node selector | -| discoverer.observability | object | `{"otlp":{"attribute":{"service_name":"vald-discoverer"}}}` | observability config (overrides defaults.observability) | -| discoverer.podAnnotations | object | `{}` | pod annotations | -| discoverer.podPriority.enabled | bool | `true` | discoverer pod PriorityClass enabled | -| discoverer.podPriority.value | int | `1000000` | discoverer pod PriorityClass value | -| discoverer.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | -| discoverer.progressDeadlineSeconds | int | `600` | progress deadline seconds | -| discoverer.resources | object | `{"limits":{"cpu":"600m","memory":"200Mi"},"requests":{"cpu":"200m","memory":"65Mi"}}` | compute resources | -| discoverer.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | -| discoverer.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | -| discoverer.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | -| discoverer.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | -| discoverer.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| discoverer.service.annotations | object | `{}` | service annotations | -| discoverer.service.labels | object | `{}` | service labels | -| discoverer.serviceAccount.enabled | bool | `true` | creates service account | -| discoverer.serviceAccount.name | string | `"vald"` | name of service account | -| discoverer.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| discoverer.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | -| discoverer.time_zone | string | `""` | Time zone | -| discoverer.tolerations | list | `[]` | tolerations | -| discoverer.topologySpreadConstraints | list | `[]` | topology spread constraints of discoverer pods | -| discoverer.version | string | `"v0.0.0"` | version of discoverer config | -| discoverer.volumeMounts | list | `[]` | volume mounts | -| discoverer.volumes | list | `[]` | volumes | -| gateway.filter.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | -| gateway.filter.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | -| gateway.filter.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | -| gateway.filter.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| gateway.filter.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-filter-gateway"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | -| gateway.filter.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | -| gateway.filter.annotations | object | `{}` | deployment annotations | -| gateway.filter.enabled | bool | `false` | gateway enabled | -| gateway.filter.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| gateway.filter.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| gateway.filter.gateway_config.egress_filter | object | `{"client":{},"distance_filters":[],"object_filters":[]}` | gRPC client config for egress filter | -| gateway.filter.gateway_config.egress_filter.client | object | `{}` | gRPC client config for egress filter (overrides defaults.grpc.client) | -| gateway.filter.gateway_config.egress_filter.distance_filters | list | `[]` | distance egress vector filter targets | -| gateway.filter.gateway_config.egress_filter.object_filters | list | `[]` | object egress vector filter targets | -| gateway.filter.gateway_config.gateway_client | object | `{}` | gRPC client for next gateway (overrides defaults.grpc.client) | -| gateway.filter.gateway_config.ingress_filter | object | `{"client":{},"insert_filters":[],"search_filters":[],"update_filters":[],"upsert_filters":[],"vectorizer":""}` | gRPC client config for ingress filter | -| gateway.filter.gateway_config.ingress_filter.client | object | `{}` | gRPC client for ingress filter (overrides defaults.grpc.client) | -| gateway.filter.gateway_config.ingress_filter.insert_filters | list | `[]` | insert ingress vector filter targets | -| gateway.filter.gateway_config.ingress_filter.search_filters | list | `[]` | search ingress vector filter targets | -| gateway.filter.gateway_config.ingress_filter.update_filters | list | `[]` | update ingress vector filter targets | -| gateway.filter.gateway_config.ingress_filter.upsert_filters | list | `[]` | upsert ingress vector filter targets | -| gateway.filter.gateway_config.ingress_filter.vectorizer | string | `""` | object ingress vectorize filter targets | -| gateway.filter.hpa.enabled | bool | `true` | HPA enabled | -| gateway.filter.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | -| gateway.filter.image.pullPolicy | string | `"Always"` | image pull policy | -| gateway.filter.image.repository | string | `"vdaas/vald-filter-gateway"` | image repository | -| gateway.filter.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| gateway.filter.ingress.annotations | object | `{"nginx.ingress.kubernetes.io/grpc-backend":"true"}` | annotations for ingress | -| gateway.filter.ingress.defaultBackend | object | `{"enabled":true}` | defaultBackend config | -| gateway.filter.ingress.defaultBackend.enabled | bool | `true` | gateway ingress defaultBackend enabled | -| gateway.filter.ingress.enabled | bool | `false` | gateway ingress enabled | -| gateway.filter.ingress.host | string | `"filter.gateway.vald.vdaas.org"` | ingress hostname | -| gateway.filter.ingress.pathType | string | `"ImplementationSpecific"` | gateway ingress pathType | -| gateway.filter.ingress.servicePort | string | `"grpc"` | service port to be exposed by ingress | -| gateway.filter.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-gateway-lb","sleepDuration":2,"target":"gateway-lb","type":"wait-for"}]` | init containers | -| gateway.filter.internalTrafficPolicy | string | `""` | internal traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| gateway.filter.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | -| gateway.filter.logging | object | `{}` | logging config (overrides defaults.logging) | -| gateway.filter.maxReplicas | int | `9` | maximum number of replicas. if HPA is disabled, this value will be ignored. | -| gateway.filter.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | -| gateway.filter.minReplicas | int | `3` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | -| gateway.filter.name | string | `"vald-filter-gateway"` | name of filter gateway deployment | -| gateway.filter.nodeName | string | `""` | node name | -| gateway.filter.nodeSelector | object | `{}` | node selector | -| gateway.filter.observability | object | `{"otlp":{"attribute":{"service_name":"vald-filter-gateway"}}}` | observability config (overrides defaults.observability) | -| gateway.filter.podAnnotations | object | `{}` | pod annotations | -| gateway.filter.podPriority.enabled | bool | `true` | gateway pod PriorityClass enabled | -| gateway.filter.podPriority.value | int | `1000000` | gateway pod PriorityClass value | -| gateway.filter.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | -| gateway.filter.progressDeadlineSeconds | int | `600` | progress deadline seconds | -| gateway.filter.resources | object | `{"limits":{"cpu":"2000m","memory":"700Mi"},"requests":{"cpu":"200m","memory":"150Mi"}}` | compute resources | -| gateway.filter.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | -| gateway.filter.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | -| gateway.filter.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | -| gateway.filter.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | -| gateway.filter.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| gateway.filter.service.annotations | object | `{}` | service annotations | -| gateway.filter.service.labels | object | `{}` | service labels | -| gateway.filter.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| gateway.filter.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | -| gateway.filter.time_zone | string | `""` | Time zone | -| gateway.filter.tolerations | list | `[]` | tolerations | -| gateway.filter.topologySpreadConstraints | list | `[]` | topology spread constraints of gateway pods | -| gateway.filter.version | string | `"v0.0.0"` | version of gateway config | -| gateway.filter.volumeMounts | list | `[]` | volume mounts | -| gateway.filter.volumes | list | `[]` | volumes | -| gateway.lb.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | -| gateway.lb.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | -| gateway.lb.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | -| gateway.lb.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| gateway.lb.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-lb-gateway"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | -| gateway.lb.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | -| gateway.lb.annotations | object | `{}` | deployment annotations | -| gateway.lb.enabled | bool | `true` | gateway enabled | -| gateway.lb.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| gateway.lb.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| gateway.lb.gateway_config.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | agent namespace | -| gateway.lb.gateway_config.discoverer.agent_client_options | object | `{}` | gRPC client options for agents (overrides defaults.grpc.client) | -| gateway.lb.gateway_config.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | -| gateway.lb.gateway_config.discoverer.duration | string | `"200ms"` | | -| gateway.lb.gateway_config.index_replica | int | `3` | number of index replica | -| gateway.lb.gateway_config.multi_operation_concurrency | int | `20` | number of concurrency of multiXXX api's operation | -| gateway.lb.gateway_config.node_name | string | `""` | node name | -| gateway.lb.hpa.enabled | bool | `true` | HPA enabled | -| gateway.lb.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | -| gateway.lb.image.pullPolicy | string | `"Always"` | image pull policy | -| gateway.lb.image.repository | string | `"vdaas/vald-lb-gateway"` | image repository | -| gateway.lb.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| gateway.lb.ingress.annotations | object | `{"nginx.ingress.kubernetes.io/grpc-backend":"true"}` | annotations for ingress | -| gateway.lb.ingress.defaultBackend | object | `{"enabled":true}` | defaultBackend config | -| gateway.lb.ingress.defaultBackend.enabled | bool | `true` | gateway ingress defaultBackend enabled | -| gateway.lb.ingress.enabled | bool | `false` | gateway ingress enabled | -| gateway.lb.ingress.host | string | `"lb.gateway.vald.vdaas.org"` | ingress hostname | -| gateway.lb.ingress.pathType | string | `"ImplementationSpecific"` | gateway ingress pathType | -| gateway.lb.ingress.servicePort | string | `"grpc"` | service port to be exposed by ingress | -| gateway.lb.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"}]` | init containers | -| gateway.lb.internalTrafficPolicy | string | `""` | internal traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| gateway.lb.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | -| gateway.lb.logging | object | `{}` | logging config (overrides defaults.logging) | -| gateway.lb.maxReplicas | int | `9` | maximum number of replicas. if HPA is disabled, this value will be ignored. | -| gateway.lb.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | -| gateway.lb.minReplicas | int | `3` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | -| gateway.lb.name | string | `"vald-lb-gateway"` | name of gateway deployment | -| gateway.lb.nodeName | string | `""` | node name | -| gateway.lb.nodeSelector | object | `{}` | node selector | -| gateway.lb.observability | object | `{"otlp":{"attribute":{"service_name":"vald-lb-gateway"}}}` | observability config (overrides defaults.observability) | -| gateway.lb.podAnnotations | object | `{}` | pod annotations | -| gateway.lb.podPriority.enabled | bool | `true` | gateway pod PriorityClass enabled | -| gateway.lb.podPriority.value | int | `1000000` | gateway pod PriorityClass value | -| gateway.lb.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | -| gateway.lb.progressDeadlineSeconds | int | `600` | progress deadline seconds | -| gateway.lb.resources | object | `{"limits":{"cpu":"2000m","memory":"700Mi"},"requests":{"cpu":"200m","memory":"150Mi"}}` | compute resources | -| gateway.lb.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | -| gateway.lb.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | -| gateway.lb.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | -| gateway.lb.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | -| gateway.lb.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| gateway.lb.service.annotations | object | `{}` | service annotations | -| gateway.lb.service.labels | object | `{}` | service labels | -| gateway.lb.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| gateway.lb.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | -| gateway.lb.time_zone | string | `""` | Time zone | -| gateway.lb.tolerations | list | `[]` | tolerations | -| gateway.lb.topologySpreadConstraints | list | `[]` | topology spread constraints of gateway pods | -| gateway.lb.version | string | `"v0.0.0"` | version of gateway config | -| gateway.lb.volumeMounts | list | `[]` | volume mounts | -| gateway.lb.volumes | list | `[]` | volumes | -| manager.index.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | -| manager.index.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | -| manager.index.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | -| manager.index.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| manager.index.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity preferred scheduling terms | -| manager.index.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | -| manager.index.annotations | object | `{}` | deployment annotations | -| manager.index.corrector.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | -| manager.index.corrector.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | -| manager.index.corrector.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | -| manager.index.corrector.discoverer.duration | string | `"500ms"` | refresh duration to discover | -| manager.index.corrector.enabled | bool | `false` | enable index correction CronJob | -| manager.index.corrector.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| manager.index.corrector.image.pullPolicy | string | `"Always"` | | -| manager.index.corrector.image.repository | string | `"vdaas/vald-index-correction"` | image repository | -| manager.index.corrector.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| manager.index.corrector.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | -| manager.index.corrector.kvs_async_write_concurrency | int | `2048` | concurrency for kvs async write | -| manager.index.corrector.name | string | `"vald-index-correction"` | name of index correction job | -| manager.index.corrector.node_name | string | `""` | node name | -| manager.index.corrector.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-correction"}}}` | observability config (overrides defaults.observability) | -| manager.index.corrector.schedule | string | `"6 3 * * *"` | CronJob schedule setting for index correction | -| manager.index.corrector.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| manager.index.corrector.startingDeadlineSeconds | int | `86400` | startingDeadlineSeconds setting for K8s completed jobs | -| manager.index.corrector.stream_list_concurrency | int | `200` | concurrency for stream list object rpc | -| manager.index.corrector.suspend | bool | `false` | CronJob suspend setting for index correction | -| manager.index.corrector.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | -| manager.index.corrector.version | string | `"v0.0.0"` | version of index manager config | -| manager.index.creator.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | -| manager.index.creator.concurrency | int | `1` | concurrency for indexing | -| manager.index.creator.creation_pool_size | int | `16` | number of pool size of create index processing | -| manager.index.creator.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | -| manager.index.creator.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | -| manager.index.creator.discoverer.duration | string | `"500ms"` | refresh duration to discover | -| manager.index.creator.enabled | bool | `false` | enable index creation CronJob | -| manager.index.creator.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| manager.index.creator.image.pullPolicy | string | `"Always"` | | -| manager.index.creator.image.repository | string | `"vdaas/vald-index-creation"` | image repository | -| manager.index.creator.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| manager.index.creator.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | -| manager.index.creator.name | string | `"vald-index-creation"` | name of index creation job | -| manager.index.creator.node_name | string | `""` | node name | -| manager.index.creator.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-creation"}}}` | observability config (overrides defaults.observability) | -| manager.index.creator.schedule | string | `"* * * * *"` | CronJob schedule setting for index creation | -| manager.index.creator.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| manager.index.creator.startingDeadlineSeconds | int | `43200` | startingDeadlineSeconds setting for K8s completed jobs | -| manager.index.creator.suspend | bool | `false` | CronJob suspend setting for index creation | -| manager.index.creator.target_addrs | list | `[]` | indexing target addresses | -| manager.index.creator.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | -| manager.index.creator.version | string | `"v0.0.0"` | version of index manager config | -| manager.index.enabled | bool | `true` | index manager enabled | -| manager.index.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| manager.index.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | -| manager.index.image.pullPolicy | string | `"Always"` | image pull policy | -| manager.index.image.repository | string | `"vdaas/vald-manager-index"` | image repository | -| manager.index.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| manager.index.indexer.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | -| manager.index.indexer.auto_index_check_duration | string | `"1m"` | check duration of automatic indexing | -| manager.index.indexer.auto_index_duration_limit | string | `"30m"` | limit duration of automatic indexing | -| manager.index.indexer.auto_index_length | int | `100` | number of cache to trigger automatic indexing | -| manager.index.indexer.auto_save_index_duration_limit | string | `"3h"` | limit duration of automatic index saving | -| manager.index.indexer.auto_save_index_wait_duration | string | `"10m"` | duration of automatic index saving wait duration for next saving | -| manager.index.indexer.concurrency | int | `1` | concurrency | -| manager.index.indexer.creation_pool_size | int | `16` | number of pool size of create index processing | -| manager.index.indexer.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | -| manager.index.indexer.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | -| manager.index.indexer.discoverer.duration | string | `"500ms"` | refresh duration to discover | -| manager.index.indexer.node_name | string | `""` | node name | -| manager.index.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | -| manager.index.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | -| manager.index.logging | object | `{}` | logging config (overrides defaults.logging) | -| manager.index.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | -| manager.index.name | string | `"vald-manager-index"` | name of index manager deployment | -| manager.index.nodeName | string | `""` | node name | -| manager.index.nodeSelector | object | `{}` | node selector | -| manager.index.observability | object | `{"otlp":{"attribute":{"service_name":"vald-manager-index"}}}` | observability config (overrides defaults.observability) | -| manager.index.podAnnotations | object | `{}` | pod annotations | -| manager.index.podPriority.enabled | bool | `true` | index manager pod PriorityClass enabled | -| manager.index.podPriority.value | int | `1000000` | index manager pod PriorityClass value | -| manager.index.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | -| manager.index.progressDeadlineSeconds | int | `600` | progress deadline seconds | -| manager.index.replicas | int | `1` | number of replicas | -| manager.index.resources | object | `{"limits":{"cpu":"1000m","memory":"500Mi"},"requests":{"cpu":"200m","memory":"80Mi"}}` | compute resources | -| manager.index.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | -| manager.index.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | -| manager.index.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | -| manager.index.saver.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | -| manager.index.saver.concurrency | int | `1` | concurrency for index saving | -| manager.index.saver.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | -| manager.index.saver.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | -| manager.index.saver.discoverer.duration | string | `"500ms"` | refresh duration to discover | -| manager.index.saver.enabled | bool | `false` | enable index save CronJob | -| manager.index.saver.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | -| manager.index.saver.image.pullPolicy | string | `"Always"` | | -| manager.index.saver.image.repository | string | `"vdaas/vald-index-save"` | image repository | -| manager.index.saver.image.tag | string | `""` | image tag (overrides defaults.image.tag) | -| manager.index.saver.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | -| manager.index.saver.name | string | `"vald-index-save"` | name of index save job | -| manager.index.saver.node_name | string | `""` | node name | -| manager.index.saver.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-save"}}}` | observability config (overrides defaults.observability) | -| manager.index.saver.schedule | string | `"0 */3 * * *"` | CronJob schedule setting for index save | -| manager.index.saver.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| manager.index.saver.startingDeadlineSeconds | int | `43200` | startingDeadlineSeconds setting for K8s completed jobs | -| manager.index.saver.suspend | bool | `false` | CronJob suspend setting for index creation | -| manager.index.saver.target_addrs | list | `[]` | index saving target addresses | -| manager.index.saver.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | -| manager.index.saver.version | string | `"v0.0.0"` | version of index manager config | -| manager.index.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | -| manager.index.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | -| manager.index.service.annotations | object | `{}` | service annotations | -| manager.index.service.labels | object | `{}` | service labels | -| manager.index.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | -| manager.index.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | -| manager.index.time_zone | string | `""` | Time zone | -| manager.index.tolerations | list | `[]` | tolerations | -| manager.index.topologySpreadConstraints | list | `[]` | topology spread constraints of index manager pods | -| manager.index.version | string | `"v0.0.0"` | version of index manager config | -| manager.index.volumeMounts | list | `[]` | volume mounts | -| manager.index.volumes | list | `[]` | volumes | +| Key | Type | Default | Description | +| ----------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| agent.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | +| agent.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | +| agent.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | +| agent.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | +| agent.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-agent-ngt"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | +| agent.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| agent.annotations | object | `{}` | deployment annotations | +| agent.enabled | bool | `true` | agent enabled | +| agent.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| agent.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| agent.hpa.enabled | bool | `false` | HPA enabled | +| agent.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | +| agent.image.pullPolicy | string | `"Always"` | image pull policy | +| agent.image.repository | string | `"vdaas/vald-agent-ngt"` | image repository | +| agent.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| agent.initContainers | list | `[]` | init containers | +| agent.kind | string | `"StatefulSet"` | deployment kind: Deployment, DaemonSet or StatefulSet | +| agent.logging | object | `{}` | logging config (overrides defaults.logging) | +| agent.maxReplicas | int | `300` | maximum number of replicas. if HPA is disabled, this value will be ignored. | +| agent.maxUnavailable | string | `"1"` | maximum number of unavailable replicas | +| agent.minReplicas | int | `20` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | +| agent.name | string | `"vald-agent-ngt"` | name of agent deployment | +| agent.ngt.auto_create_index_pool_size | int | `16` | batch process pool size of automatic create index operation | +| agent.ngt.auto_index_check_duration | string | `"30m"` | check duration of automatic indexing | +| agent.ngt.auto_index_duration_limit | string | `"24h"` | limit duration of automatic indexing | +| agent.ngt.auto_index_length | int | `100` | number of cache to trigger automatic indexing | +| agent.ngt.auto_save_index_duration | string | `"35m"` | duration of automatic save index | +| agent.ngt.broken_index_history_limit | int | `0` | maximum number of broken index generations to backup | +| agent.ngt.bulk_insert_chunk_size | int | `10` | bulk insert chunk size | +| agent.ngt.creation_edge_size | int | `20` | creation edge size | +| agent.ngt.default_epsilon | float | `0.1` | default epsilon used for search | +| agent.ngt.default_pool_size | int | `16` | default create index batch pool size | +| agent.ngt.default_radius | float | `-1` | default radius used for search | +| agent.ngt.dimension | int | `4096` | vector dimension | +| agent.ngt.distance_type | string | `"l2"` | distance type. it should be `l1`, `l2`, `angle`, `hamming`, `cosine`,`poincare`, `lorentz`, `jaccard`, `sparsejaccard`, `normalizedangle` or `normalizedcosine`. for further details about NGT libraries supported distance is https://github.com/yahoojapan/NGT/wiki/Command-Quick-Reference and vald agent's supported NGT distance type is https://pkg.go.dev/github.com/vdaas/vald/internal/core/algorithm/ngt#pkg-constants | +| agent.ngt.enable_copy_on_write | bool | `false` | enable copy on write saving for more stable backup | +| agent.ngt.enable_in_memory_mode | bool | `true` | in-memory mode enabled | +| agent.ngt.enable_proactive_gc | bool | `false` | enable proactive GC call for reducing heap memory allocation | +| agent.ngt.error_buffer_limit | int | `10` | maximum number of core ngt error buffer pool size limit | +| agent.ngt.index_path | string | `""` | path to index data | +| agent.ngt.initial_delay_max_duration | string | `"3m"` | maximum duration for initial delay | +| agent.ngt.kvsdb.concurrency | int | `6` | kvsdb processing concurrency | +| agent.ngt.load_index_timeout_factor | string | `"1ms"` | a factor of load index timeout. timeout duration will be calculated by (index count to be loaded) \* (factor). | +| agent.ngt.max_load_index_timeout | string | `"10m"` | maximum duration of load index timeout | +| agent.ngt.min_load_index_timeout | string | `"3m"` | minimum duration of load index timeout | +| agent.ngt.object_type | string | `"float"` | object type. it should be `float` or `uint8` or `float16`. for further details: https://github.com/yahoojapan/NGT/wiki/Command-Quick-Reference | +| agent.ngt.search_edge_size | int | `10` | search edge size | +| agent.ngt.vqueue.delete_buffer_pool_size | int | `5000` | delete slice pool buffer size | +| agent.ngt.vqueue.insert_buffer_pool_size | int | `10000` | insert slice pool buffer size | +| agent.nodeName | string | `""` | node name | +| agent.nodeSelector | object | `{}` | node selector | +| agent.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent-ngt"}}}` | observability config (overrides defaults.observability) | +| agent.persistentVolume.accessMode | string | `"ReadWriteOncePod"` | agent pod storage accessMode | +| agent.persistentVolume.enabled | bool | `false` | enables PVC. It is required to enable if agent pod's file store functionality is enabled with non in-memory mode | +| agent.persistentVolume.mountPropagation | string | `"None"` | agent pod storage mountPropagation | +| agent.persistentVolume.size | string | `"100Gi"` | size of agent pod volume | +| agent.persistentVolume.storageClass | string | `"vald-sc"` | storageClass name for agent pod volume | +| agent.podAnnotations | object | `{}` | pod annotations | +| agent.podManagementPolicy | string | `"OrderedReady"` | pod management policy: OrderedReady or Parallel | +| agent.podPriority.enabled | bool | `true` | agent pod PriorityClass enabled | +| agent.podPriority.value | int | `1000000000` | agent pod PriorityClass value | +| agent.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | +| agent.progressDeadlineSeconds | int | `600` | progress deadline seconds | +| agent.resources | object | `{"requests":{"cpu":"300m","memory":"4Gi"}}` | compute resources. recommended setting of memory requests = cluster memory \* 0.4 / number of agent pods | +| agent.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | +| agent.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | +| agent.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | +| agent.rollingUpdate.partition | int | `0` | StatefulSet partition | +| agent.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":false,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | +| agent.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{"startupProbe":{"failureThreshold":200,"periodSeconds":5}}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| agent.service.annotations | object | `{}` | service annotations | +| agent.service.labels | object | `{}` | service labels | +| agent.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| agent.sidecar.config.auto_backup_duration | string | `"24h"` | auto backup duration | +| agent.sidecar.config.auto_backup_enabled | bool | `true` | auto backup triggered by timer is enabled | +| agent.sidecar.config.blob_storage.bucket | string | `""` | bucket name | +| agent.sidecar.config.blob_storage.cloud_storage.client.credentials_file_path | string | `""` | credentials file path | +| agent.sidecar.config.blob_storage.cloud_storage.client.credentials_json | string | `""` | credentials json | +| agent.sidecar.config.blob_storage.cloud_storage.url | string | `""` | cloud storage url | +| agent.sidecar.config.blob_storage.cloud_storage.write_buffer_size | int | `0` | bytes of the chunks for upload | +| agent.sidecar.config.blob_storage.cloud_storage.write_cache_control | string | `""` | Cache-Control of HTTP Header | +| agent.sidecar.config.blob_storage.cloud_storage.write_content_disposition | string | `""` | Content-Disposition of HTTP Header | +| agent.sidecar.config.blob_storage.cloud_storage.write_content_encoding | string | `""` | the encoding of the blob's content | +| agent.sidecar.config.blob_storage.cloud_storage.write_content_language | string | `""` | the language of blob's content | +| agent.sidecar.config.blob_storage.cloud_storage.write_content_type | string | `""` | MIME type of the blob | +| agent.sidecar.config.blob_storage.s3.access_key | string | `"_AWS_ACCESS_KEY_"` | s3 access key | +| agent.sidecar.config.blob_storage.s3.enable_100_continue | bool | `true` | enable AWS SDK adding the 'Expect: 100-Continue' header to PUT requests over 2MB of content. | +| agent.sidecar.config.blob_storage.s3.enable_content_md5_validation | bool | `true` | enable the S3 client to add MD5 checksum to upload API calls. | +| agent.sidecar.config.blob_storage.s3.enable_endpoint_discovery | bool | `false` | enable endpoint discovery | +| agent.sidecar.config.blob_storage.s3.enable_endpoint_host_prefix | bool | `true` | enable prefixing request endpoint hosts with modeled information | +| agent.sidecar.config.blob_storage.s3.enable_param_validation | bool | `true` | enables semantic parameter validation | +| agent.sidecar.config.blob_storage.s3.enable_ssl | bool | `true` | enable ssl for s3 session | +| agent.sidecar.config.blob_storage.s3.endpoint | string | `""` | s3 endpoint | +| agent.sidecar.config.blob_storage.s3.force_path_style | bool | `false` | use path-style addressing | +| agent.sidecar.config.blob_storage.s3.max_chunk_size | string | `"64mb"` | s3 download max chunk size | +| agent.sidecar.config.blob_storage.s3.max_part_size | string | `"64mb"` | s3 multipart upload max part size | +| agent.sidecar.config.blob_storage.s3.max_retries | int | `3` | maximum number of retries of s3 client | +| agent.sidecar.config.blob_storage.s3.region | string | `""` | s3 region | +| agent.sidecar.config.blob_storage.s3.secret_access_key | string | `"_AWS_SECRET_ACCESS_KEY_"` | s3 secret access key | +| agent.sidecar.config.blob_storage.s3.token | string | `""` | s3 token | +| agent.sidecar.config.blob_storage.s3.use_accelerate | bool | `false` | enable s3 accelerate feature | +| agent.sidecar.config.blob_storage.s3.use_arn_region | bool | `false` | s3 service client to use the region specified in the ARN | +| agent.sidecar.config.blob_storage.s3.use_dual_stack | bool | `false` | use dual stack | +| agent.sidecar.config.blob_storage.storage_type | string | `"s3"` | storage type | +| agent.sidecar.config.client.net.dialer.dual_stack_enabled | bool | `false` | HTTP client TCP dialer dual stack enabled | +| agent.sidecar.config.client.net.dialer.keepalive | string | `"5m"` | HTTP client TCP dialer keep alive | +| agent.sidecar.config.client.net.dialer.timeout | string | `"5s"` | HTTP client TCP dialer connect timeout | +| agent.sidecar.config.client.net.dns.cache_enabled | bool | `true` | HTTP client TCP DNS cache enabled | +| agent.sidecar.config.client.net.dns.cache_expiration | string | `"24h"` | | +| agent.sidecar.config.client.net.dns.refresh_duration | string | `"1h"` | HTTP client TCP DNS cache expiration | +| agent.sidecar.config.client.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| agent.sidecar.config.client.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| agent.sidecar.config.client.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| agent.sidecar.config.client.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| agent.sidecar.config.client.net.socket_option.tcp_cork | bool | `true` | server listen socket option for tcp_cork functionality | +| agent.sidecar.config.client.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| agent.sidecar.config.client.net.socket_option.tcp_fast_open | bool | `true` | server listen socket option for tcp_fast_open functionality | +| agent.sidecar.config.client.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| agent.sidecar.config.client.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| agent.sidecar.config.client.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | +| agent.sidecar.config.client.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | +| agent.sidecar.config.client.net.tls.enabled | bool | `false` | TLS enabled | +| agent.sidecar.config.client.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | +| agent.sidecar.config.client.net.tls.key | string | `"/path/to/key"` | TLS key path | +| agent.sidecar.config.client.transport.backoff.backoff_factor | float | `1.1` | backoff backoff factor | +| agent.sidecar.config.client.transport.backoff.backoff_time_limit | string | `"5s"` | backoff time limit | +| agent.sidecar.config.client.transport.backoff.enable_error_log | bool | `true` | backoff error log enabled | +| agent.sidecar.config.client.transport.backoff.initial_duration | string | `"5ms"` | backoff initial duration | +| agent.sidecar.config.client.transport.backoff.jitter_limit | string | `"100ms"` | backoff jitter limit | +| agent.sidecar.config.client.transport.backoff.maximum_duration | string | `"5s"` | backoff maximum duration | +| agent.sidecar.config.client.transport.backoff.retry_count | int | `100` | backoff retry count | +| agent.sidecar.config.client.transport.round_tripper.expect_continue_timeout | string | `"5s"` | expect continue timeout | +| agent.sidecar.config.client.transport.round_tripper.force_attempt_http_2 | bool | `true` | force attempt HTTP2 | +| agent.sidecar.config.client.transport.round_tripper.idle_conn_timeout | string | `"90s"` | timeout for idle connections | +| agent.sidecar.config.client.transport.round_tripper.max_conns_per_host | int | `10` | maximum count of connections per host | +| agent.sidecar.config.client.transport.round_tripper.max_idle_conns | int | `100` | maximum count of idle connections | +| agent.sidecar.config.client.transport.round_tripper.max_idle_conns_per_host | int | `10` | maximum count of idle connections per host | +| agent.sidecar.config.client.transport.round_tripper.max_response_header_size | int | `0` | maximum response header size | +| agent.sidecar.config.client.transport.round_tripper.read_buffer_size | int | `0` | read buffer size | +| agent.sidecar.config.client.transport.round_tripper.response_header_timeout | string | `"5s"` | timeout for response header | +| agent.sidecar.config.client.transport.round_tripper.tls_handshake_timeout | string | `"5s"` | TLS handshake timeout | +| agent.sidecar.config.client.transport.round_tripper.write_buffer_size | int | `0` | write buffer size | +| agent.sidecar.config.compress.compress_algorithm | string | `"gzip"` | compression algorithm. must be `gob`, `gzip`, `lz4` or `zstd` | +| agent.sidecar.config.compress.compression_level | int | `-1` | compression level. value range relies on which algorithm is used. `gob`: level will be ignored. `gzip`: -1 (default compression), 0 (no compression), or 1 (best speed) to 9 (best compression). `lz4`: >= 0, higher is better compression. `zstd`: 1 (fastest) to 22 (best), however implementation relies on klauspost/compress. | +| agent.sidecar.config.filename | string | `"_MY_POD_NAME_"` | backup filename | +| agent.sidecar.config.filename_suffix | string | `".tar.gz"` | suffix for backup filename | +| agent.sidecar.config.post_stop_timeout | string | `"2m"` | timeout for observing file changes during post stop | +| agent.sidecar.config.restore_backoff.backoff_factor | float | `1.2` | restore backoff factor | +| agent.sidecar.config.restore_backoff.backoff_time_limit | string | `"30m"` | restore backoff time limit | +| agent.sidecar.config.restore_backoff.enable_error_log | bool | `true` | restore backoff log enabled | +| agent.sidecar.config.restore_backoff.initial_duration | string | `"1s"` | restore backoff initial duration | +| agent.sidecar.config.restore_backoff.jitter_limit | string | `"10s"` | restore backoff jitter limit | +| agent.sidecar.config.restore_backoff.maximum_duration | string | `"1m"` | restore backoff maximum duration | +| agent.sidecar.config.restore_backoff.retry_count | int | `100` | restore backoff retry count | +| agent.sidecar.config.restore_backoff_enabled | bool | `false` | restore backoff enabled | +| agent.sidecar.config.watch_enabled | bool | `true` | auto backup triggered by file changes is enabled | +| agent.sidecar.enabled | bool | `false` | sidecar enabled | +| agent.sidecar.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}},{"name":"AWS_ACCESS_KEY","valueFrom":{"secretKeyRef":{"key":"access-key","name":"aws-secret"}}},{"name":"AWS_SECRET_ACCESS_KEY","valueFrom":{"secretKeyRef":{"key":"secret-access-key","name":"aws-secret"}}}]` | environment variables | +| agent.sidecar.image.pullPolicy | string | `"Always"` | image pull policy | +| agent.sidecar.image.repository | string | `"vdaas/vald-agent-sidecar"` | image repository | +| agent.sidecar.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| agent.sidecar.initContainerEnabled | bool | `false` | sidecar on initContainer mode enabled. | +| agent.sidecar.logging | object | `{}` | logging config (overrides defaults.logging) | +| agent.sidecar.name | string | `"vald-agent-sidecar"` | name of agent sidecar | +| agent.sidecar.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent-sidecar"}}}` | observability config (overrides defaults.observability) | +| agent.sidecar.resources | object | `{"requests":{"cpu":"100m","memory":"100Mi"}}` | compute resources. | +| agent.sidecar.server_config | object | `{"healths":{"liveness":{"enabled":false,"port":13000,"servicePort":13000},"readiness":{"enabled":false,"port":13001,"servicePort":13001},"startup":{"enabled":false,"port":13001}},"metrics":{"pprof":{"port":16060,"servicePort":16060}},"servers":{"grpc":{"enabled":false,"port":18081,"servicePort":18081},"rest":{"enabled":false,"port":18080,"servicePort":18080}}}` | server config (overrides defaults.server_config) | +| agent.sidecar.service.annotations | object | `{}` | agent sidecar service annotations | +| agent.sidecar.service.enabled | bool | `false` | agent sidecar service enabled | +| agent.sidecar.service.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| agent.sidecar.service.labels | object | `{}` | agent sidecar service labels | +| agent.sidecar.service.type | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| agent.sidecar.time_zone | string | `""` | Time zone | +| agent.sidecar.version | string | `"v0.0.0"` | version of agent sidecar config | +| agent.terminationGracePeriodSeconds | int | `120` | duration in seconds pod needs to terminate gracefully | +| agent.time_zone | string | `""` | Time zone | +| agent.tolerations | list | `[]` | tolerations | +| agent.topologySpreadConstraints | list | `[]` | topology spread constraints for agent pods | +| agent.version | string | `"v0.0.0"` | version of agent config | +| agent.volumeMounts | list | `[]` | volume mounts | +| agent.volumes | list | `[]` | volumes | +| defaults.grpc.client.addrs | list | `[]` | gRPC client addresses | +| defaults.grpc.client.backoff.backoff_factor | float | `1.1` | gRPC client backoff factor | +| defaults.grpc.client.backoff.backoff_time_limit | string | `"5s"` | gRPC client backoff time limit | +| defaults.grpc.client.backoff.enable_error_log | bool | `true` | gRPC client backoff log enabled | +| defaults.grpc.client.backoff.initial_duration | string | `"5ms"` | gRPC client backoff initial duration | +| defaults.grpc.client.backoff.jitter_limit | string | `"100ms"` | gRPC client backoff jitter limit | +| defaults.grpc.client.backoff.maximum_duration | string | `"5s"` | gRPC client backoff maximum duration | +| defaults.grpc.client.backoff.retry_count | int | `100` | gRPC client backoff retry count | +| defaults.grpc.client.call_option.max_recv_msg_size | int | `0` | gRPC client call option max receive message size | +| defaults.grpc.client.call_option.max_retry_rpc_buffer_size | int | `0` | gRPC client call option max retry rpc buffer size | +| defaults.grpc.client.call_option.max_send_msg_size | int | `0` | gRPC client call option max send message size | +| defaults.grpc.client.call_option.wait_for_ready | bool | `true` | gRPC client call option wait for ready | +| defaults.grpc.client.circuit_breaker.closed_error_rate | float | `0.7` | gRPC client circuitbreaker closed error rate | +| defaults.grpc.client.circuit_breaker.closed_refresh_timeout | string | `"10s"` | gRPC client circuitbreaker closed refresh timeout | +| defaults.grpc.client.circuit_breaker.half_open_error_rate | float | `0.5` | gRPC client circuitbreaker half-open error rate | +| defaults.grpc.client.circuit_breaker.min_samples | int | `1000` | gRPC client circuitbreaker minimum sampling count | +| defaults.grpc.client.circuit_breaker.open_timeout | string | `"1s"` | gRPC client circuitbreaker open timeout | +| defaults.grpc.client.connection_pool.enable_dns_resolver | bool | `true` | enables gRPC client connection pool dns resolver, when enabled vald uses ip handshake exclude dns discovery which improves network performance | +| defaults.grpc.client.connection_pool.enable_rebalance | bool | `true` | enables gRPC client connection pool rebalance | +| defaults.grpc.client.connection_pool.old_conn_close_duration | string | `"2m"` | makes delay before gRPC client connection closing during connection pool rebalance | +| defaults.grpc.client.connection_pool.rebalance_duration | string | `"30m"` | gRPC client connection pool rebalance duration | +| defaults.grpc.client.connection_pool.size | int | `3` | gRPC client connection pool size | +| defaults.grpc.client.dial_option.backoff_base_delay | string | `"1s"` | gRPC client dial option base backoff delay | +| defaults.grpc.client.dial_option.backoff_jitter | float | `0.2` | gRPC client dial option base backoff delay | +| defaults.grpc.client.dial_option.backoff_max_delay | string | `"120s"` | gRPC client dial option max backoff delay | +| defaults.grpc.client.dial_option.backoff_multiplier | float | `1.6` | gRPC client dial option base backoff delay | +| defaults.grpc.client.dial_option.enable_backoff | bool | `false` | gRPC client dial option backoff enabled | +| defaults.grpc.client.dial_option.initial_connection_window_size | int | `2097152` | gRPC client dial option initial connection window size | +| defaults.grpc.client.dial_option.initial_window_size | int | `1048576` | gRPC client dial option initial window size | +| defaults.grpc.client.dial_option.insecure | bool | `true` | gRPC client dial option insecure enabled | +| defaults.grpc.client.dial_option.interceptors | list | `[]` | gRPC client interceptors | +| defaults.grpc.client.dial_option.keepalive.permit_without_stream | bool | `false` | gRPC client keep alive permit without stream | +| defaults.grpc.client.dial_option.keepalive.time | string | `""` | gRPC client keep alive time | +| defaults.grpc.client.dial_option.keepalive.timeout | string | `"30s"` | gRPC client keep alive timeout | +| defaults.grpc.client.dial_option.max_msg_size | int | `0` | gRPC client dial option max message size | +| defaults.grpc.client.dial_option.min_connection_timeout | string | `"20s"` | gRPC client dial option minimum connection timeout | +| defaults.grpc.client.dial_option.net.dialer.dual_stack_enabled | bool | `true` | gRPC client TCP dialer dual stack enabled | +| defaults.grpc.client.dial_option.net.dialer.keepalive | string | `""` | gRPC client TCP dialer keep alive | +| defaults.grpc.client.dial_option.net.dialer.timeout | string | `""` | gRPC client TCP dialer timeout | +| defaults.grpc.client.dial_option.net.dns.cache_enabled | bool | `true` | gRPC client TCP DNS cache enabled | +| defaults.grpc.client.dial_option.net.dns.cache_expiration | string | `"1h"` | gRPC client TCP DNS cache expiration | +| defaults.grpc.client.dial_option.net.dns.refresh_duration | string | `"30m"` | gRPC client TCP DNS cache refresh duration | +| defaults.grpc.client.dial_option.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.grpc.client.dial_option.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.grpc.client.dial_option.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.grpc.client.dial_option.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.grpc.client.dial_option.net.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| defaults.grpc.client.dial_option.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.grpc.client.dial_option.net.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | +| defaults.grpc.client.dial_option.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| defaults.grpc.client.dial_option.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| defaults.grpc.client.dial_option.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | +| defaults.grpc.client.dial_option.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | +| defaults.grpc.client.dial_option.net.tls.enabled | bool | `false` | TLS enabled | +| defaults.grpc.client.dial_option.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | +| defaults.grpc.client.dial_option.net.tls.key | string | `"/path/to/key"` | TLS key path | +| defaults.grpc.client.dial_option.read_buffer_size | int | `0` | gRPC client dial option read buffer size | +| defaults.grpc.client.dial_option.timeout | string | `""` | gRPC client dial option timeout | +| defaults.grpc.client.dial_option.write_buffer_size | int | `0` | gRPC client dial option write buffer size | +| defaults.grpc.client.health_check_duration | string | `"1s"` | gRPC client health check duration | +| defaults.grpc.client.tls.ca | string | `"/path/to/ca"` | TLS ca path | +| defaults.grpc.client.tls.cert | string | `"/path/to/cert"` | TLS cert path | +| defaults.grpc.client.tls.enabled | bool | `false` | TLS enabled | +| defaults.grpc.client.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | +| defaults.grpc.client.tls.key | string | `"/path/to/key"` | TLS key path | +| defaults.image.tag | string | `"v1.7.9"` | docker image tag | +| defaults.logging.format | string | `"raw"` | logging format. logging format must be `raw` or `json` | +| defaults.logging.level | string | `"debug"` | logging level. logging level must be `debug`, `info`, `warn`, `error` or `fatal`. | +| defaults.logging.logger | string | `"glg"` | logger name. currently logger must be `glg` or `zap`. | +| defaults.networkPolicy.custom | object | `{"egress":[],"ingress":[]}` | custom network policies that a user can add | +| defaults.networkPolicy.custom.egress | list | `[]` | custom egress network policies that a user can add | +| defaults.networkPolicy.custom.ingress | list | `[]` | custom ingress network policies that a user can add | +| defaults.networkPolicy.enabled | bool | `false` | if network policy enabled | +| defaults.observability.enabled | bool | `false` | observability features enabled | +| defaults.observability.metrics.enable_cgo | bool | `true` | CGO metrics enabled | +| defaults.observability.metrics.enable_goroutine | bool | `true` | goroutine metrics enabled | +| defaults.observability.metrics.enable_memory | bool | `true` | memory metrics enabled | +| defaults.observability.metrics.enable_version_info | bool | `true` | version info metrics enabled | +| defaults.observability.metrics.version_info_labels | list | `["vald_version","server_name","git_commit","build_time","go_version","go_os","go_arch","ngt_version"]` | enabled label names of version info | +| defaults.observability.otlp.attribute | object | `{"namespace":"_MY_POD_NAMESPACE_","node_name":"_MY_NODE_NAME_","pod_name":"_MY_POD_NAME_","service_name":"vald"}` | default resource attribute | +| defaults.observability.otlp.attribute.namespace | string | `"_MY_POD_NAMESPACE_"` | namespace | +| defaults.observability.otlp.attribute.node_name | string | `"_MY_NODE_NAME_"` | node name | +| defaults.observability.otlp.attribute.pod_name | string | `"_MY_POD_NAME_"` | pod name | +| defaults.observability.otlp.attribute.service_name | string | `"vald"` | service name | +| defaults.observability.otlp.collector_endpoint | string | `""` | OpenTelemetry Collector endpoint | +| defaults.observability.otlp.metrics_export_interval | string | `"1s"` | metrics export interval | +| defaults.observability.otlp.metrics_export_timeout | string | `"1m"` | metrics export timeout | +| defaults.observability.otlp.trace_batch_timeout | string | `"1s"` | trace batch timeout | +| defaults.observability.otlp.trace_export_timeout | string | `"1m"` | trace export timeout | +| defaults.observability.otlp.trace_max_export_batch_size | int | `1024` | trace maximum export batch size | +| defaults.observability.otlp.trace_max_queue_size | int | `256` | trace maximum queue size | +| defaults.observability.trace.enabled | bool | `false` | trace enabled | +| defaults.server_config.full_shutdown_duration | string | `"600s"` | server full shutdown duration | +| defaults.server_config.healths.liveness.enabled | bool | `true` | liveness server enabled | +| defaults.server_config.healths.liveness.host | string | `"0.0.0.0"` | liveness server host | +| defaults.server_config.healths.liveness.livenessProbe.failureThreshold | int | `2` | liveness probe failure threshold | +| defaults.server_config.healths.liveness.livenessProbe.httpGet.path | string | `"/liveness"` | liveness probe path | +| defaults.server_config.healths.liveness.livenessProbe.httpGet.port | string | `"liveness"` | liveness probe port | +| defaults.server_config.healths.liveness.livenessProbe.httpGet.scheme | string | `"HTTP"` | liveness probe scheme | +| defaults.server_config.healths.liveness.livenessProbe.initialDelaySeconds | int | `5` | liveness probe initial delay seconds | +| defaults.server_config.healths.liveness.livenessProbe.periodSeconds | int | `3` | liveness probe period seconds | +| defaults.server_config.healths.liveness.livenessProbe.successThreshold | int | `1` | liveness probe success threshold | +| defaults.server_config.healths.liveness.livenessProbe.timeoutSeconds | int | `2` | liveness probe timeout seconds | +| defaults.server_config.healths.liveness.port | int | `3000` | liveness server port | +| defaults.server_config.healths.liveness.server.http.handler_timeout | string | `""` | liveness server handler timeout | +| defaults.server_config.healths.liveness.server.http.idle_timeout | string | `""` | liveness server idle timeout | +| defaults.server_config.healths.liveness.server.http.read_header_timeout | string | `""` | liveness server read header timeout | +| defaults.server_config.healths.liveness.server.http.read_timeout | string | `""` | liveness server read timeout | +| defaults.server_config.healths.liveness.server.http.shutdown_duration | string | `"5s"` | liveness server shutdown duration | +| defaults.server_config.healths.liveness.server.http.write_timeout | string | `""` | liveness server write timeout | +| defaults.server_config.healths.liveness.server.mode | string | `""` | liveness server mode | +| defaults.server_config.healths.liveness.server.network | string | `"tcp"` | mysql network | +| defaults.server_config.healths.liveness.server.probe_wait_time | string | `"3s"` | liveness server probe wait time | +| defaults.server_config.healths.liveness.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.server_config.healths.liveness.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.server_config.healths.liveness.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.server_config.healths.liveness.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.server_config.healths.liveness.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| defaults.server_config.healths.liveness.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.server_config.healths.liveness.server.socket_option.tcp_fast_open | bool | `true` | server listen socket option for tcp_fast_open functionality | +| defaults.server_config.healths.liveness.server.socket_option.tcp_no_delay | bool | `true` | server listen socket option for tcp_no_delay functionality | +| defaults.server_config.healths.liveness.server.socket_option.tcp_quick_ack | bool | `true` | server listen socket option for tcp_quick_ack functionality | +| defaults.server_config.healths.liveness.server.socket_path | string | `""` | mysql socket_path | +| defaults.server_config.healths.liveness.servicePort | int | `3000` | liveness server service port | +| defaults.server_config.healths.readiness.enabled | bool | `true` | readiness server enabled | +| defaults.server_config.healths.readiness.host | string | `"0.0.0.0"` | readiness server host | +| defaults.server_config.healths.readiness.port | int | `3001` | readiness server port | +| defaults.server_config.healths.readiness.readinessProbe.failureThreshold | int | `2` | readiness probe failure threshold | +| defaults.server_config.healths.readiness.readinessProbe.httpGet.path | string | `"/readiness"` | readiness probe path | +| defaults.server_config.healths.readiness.readinessProbe.httpGet.port | string | `"readiness"` | readiness probe port | +| defaults.server_config.healths.readiness.readinessProbe.httpGet.scheme | string | `"HTTP"` | readiness probe scheme | +| defaults.server_config.healths.readiness.readinessProbe.initialDelaySeconds | int | `10` | readiness probe initial delay seconds | +| defaults.server_config.healths.readiness.readinessProbe.periodSeconds | int | `3` | readiness probe period seconds | +| defaults.server_config.healths.readiness.readinessProbe.successThreshold | int | `1` | readiness probe success threshold | +| defaults.server_config.healths.readiness.readinessProbe.timeoutSeconds | int | `2` | readiness probe timeout seconds | +| defaults.server_config.healths.readiness.server.http.handler_timeout | string | `""` | readiness server handler timeout | +| defaults.server_config.healths.readiness.server.http.idle_timeout | string | `""` | readiness server idle timeout | +| defaults.server_config.healths.readiness.server.http.read_header_timeout | string | `""` | readiness server read header timeout | +| defaults.server_config.healths.readiness.server.http.read_timeout | string | `""` | readiness server read timeout | +| defaults.server_config.healths.readiness.server.http.shutdown_duration | string | `"0s"` | readiness server shutdown duration | +| defaults.server_config.healths.readiness.server.http.write_timeout | string | `""` | readiness server write timeout | +| defaults.server_config.healths.readiness.server.mode | string | `""` | readiness server mode | +| defaults.server_config.healths.readiness.server.network | string | `"tcp"` | mysql network | +| defaults.server_config.healths.readiness.server.probe_wait_time | string | `"3s"` | readiness server probe wait time | +| defaults.server_config.healths.readiness.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.server_config.healths.readiness.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.server_config.healths.readiness.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.server_config.healths.readiness.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.server_config.healths.readiness.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| defaults.server_config.healths.readiness.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.server_config.healths.readiness.server.socket_option.tcp_fast_open | bool | `true` | | +| defaults.server_config.healths.readiness.server.socket_option.tcp_no_delay | bool | `true` | server listen socket option for tcp_no_delay functionality | +| defaults.server_config.healths.readiness.server.socket_option.tcp_quick_ack | bool | `true` | server listen socket option for tcp_quick_ack functionality | +| defaults.server_config.healths.readiness.server.socket_path | string | `""` | mysql socket_path | +| defaults.server_config.healths.readiness.servicePort | int | `3001` | readiness server service port | +| defaults.server_config.healths.startup.enabled | bool | `true` | startup server enabled | +| defaults.server_config.healths.startup.port | int | `3000` | startup server port | +| defaults.server_config.healths.startup.startupProbe.failureThreshold | int | `30` | startup probe failure threshold | +| defaults.server_config.healths.startup.startupProbe.httpGet.path | string | `"/liveness"` | startup probe path | +| defaults.server_config.healths.startup.startupProbe.httpGet.port | string | `"liveness"` | startup probe port | +| defaults.server_config.healths.startup.startupProbe.httpGet.scheme | string | `"HTTP"` | startup probe scheme | +| defaults.server_config.healths.startup.startupProbe.initialDelaySeconds | int | `5` | startup probe initial delay seconds | +| defaults.server_config.healths.startup.startupProbe.periodSeconds | int | `5` | startup probe period seconds | +| defaults.server_config.healths.startup.startupProbe.successThreshold | int | `1` | startup probe success threshold | +| defaults.server_config.healths.startup.startupProbe.timeoutSeconds | int | `2` | startup probe timeout seconds | +| defaults.server_config.metrics.pprof.enabled | bool | `false` | pprof server enabled | +| defaults.server_config.metrics.pprof.host | string | `"0.0.0.0"` | pprof server host | +| defaults.server_config.metrics.pprof.port | int | `6060` | pprof server port | +| defaults.server_config.metrics.pprof.server.http.handler_timeout | string | `"5s"` | pprof server handler timeout | +| defaults.server_config.metrics.pprof.server.http.idle_timeout | string | `"2s"` | pprof server idle timeout | +| defaults.server_config.metrics.pprof.server.http.read_header_timeout | string | `"1s"` | pprof server read header timeout | +| defaults.server_config.metrics.pprof.server.http.read_timeout | string | `"1s"` | pprof server read timeout | +| defaults.server_config.metrics.pprof.server.http.shutdown_duration | string | `"5s"` | pprof server shutdown duration | +| defaults.server_config.metrics.pprof.server.http.write_timeout | string | `"1m"` | pprof server write timeout | +| defaults.server_config.metrics.pprof.server.mode | string | `"REST"` | pprof server mode | +| defaults.server_config.metrics.pprof.server.network | string | `"tcp"` | mysql network | +| defaults.server_config.metrics.pprof.server.probe_wait_time | string | `"3s"` | pprof server probe wait time | +| defaults.server_config.metrics.pprof.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.server_config.metrics.pprof.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.server_config.metrics.pprof.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.server_config.metrics.pprof.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.server_config.metrics.pprof.server.socket_option.tcp_cork | bool | `true` | server listen socket option for tcp_cork functionality | +| defaults.server_config.metrics.pprof.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.server_config.metrics.pprof.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | +| defaults.server_config.metrics.pprof.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| defaults.server_config.metrics.pprof.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| defaults.server_config.metrics.pprof.server.socket_path | string | `""` | mysql socket_path | +| defaults.server_config.metrics.pprof.servicePort | int | `6060` | pprof server service port | +| defaults.server_config.servers.grpc.enabled | bool | `true` | gRPC server enabled | +| defaults.server_config.servers.grpc.host | string | `"0.0.0.0"` | gRPC server host | +| defaults.server_config.servers.grpc.port | int | `8081` | gRPC server port | +| defaults.server_config.servers.grpc.server.grpc.bidirectional_stream_concurrency | int | `20` | gRPC server bidirectional stream concurrency | +| defaults.server_config.servers.grpc.server.grpc.connection_timeout | string | `""` | gRPC server connection timeout | +| defaults.server_config.servers.grpc.server.grpc.enable_reflection | bool | `true` | gRPC server reflection option | +| defaults.server_config.servers.grpc.server.grpc.header_table_size | int | `0` | gRPC server header table size | +| defaults.server_config.servers.grpc.server.grpc.initial_conn_window_size | int | `2097152` | gRPC server initial connection window size | +| defaults.server_config.servers.grpc.server.grpc.initial_window_size | int | `1048576` | gRPC server initial window size | +| defaults.server_config.servers.grpc.server.grpc.interceptors | list | `["RecoverInterceptor"]` | gRPC server interceptors | +| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_age | string | `""` | gRPC server keep alive max connection age | +| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_age_grace | string | `""` | gRPC server keep alive max connection age grace | +| defaults.server_config.servers.grpc.server.grpc.keepalive.max_conn_idle | string | `""` | gRPC server keep alive max connection idle | +| defaults.server_config.servers.grpc.server.grpc.keepalive.min_time | string | `"10m"` | gRPC server keep alive min_time | +| defaults.server_config.servers.grpc.server.grpc.keepalive.permit_without_stream | bool | `false` | gRPC server keep alive permit_without_stream | +| defaults.server_config.servers.grpc.server.grpc.keepalive.time | string | `"3h"` | gRPC server keep alive time | +| defaults.server_config.servers.grpc.server.grpc.keepalive.timeout | string | `"60s"` | gRPC server keep alive timeout | +| defaults.server_config.servers.grpc.server.grpc.max_header_list_size | int | `0` | gRPC server max header list size | +| defaults.server_config.servers.grpc.server.grpc.max_receive_message_size | int | `0` | gRPC server max receive message size | +| defaults.server_config.servers.grpc.server.grpc.max_send_message_size | int | `0` | gRPC server max send message size | +| defaults.server_config.servers.grpc.server.grpc.read_buffer_size | int | `0` | gRPC server read buffer size | +| defaults.server_config.servers.grpc.server.grpc.write_buffer_size | int | `0` | gRPC server write buffer size | +| defaults.server_config.servers.grpc.server.mode | string | `"GRPC"` | gRPC server server mode | +| defaults.server_config.servers.grpc.server.network | string | `"tcp"` | mysql network | +| defaults.server_config.servers.grpc.server.probe_wait_time | string | `"3s"` | gRPC server probe wait time | +| defaults.server_config.servers.grpc.server.restart | bool | `true` | gRPC server restart | +| defaults.server_config.servers.grpc.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.server_config.servers.grpc.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.server_config.servers.grpc.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.server_config.servers.grpc.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.server_config.servers.grpc.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| defaults.server_config.servers.grpc.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.server_config.servers.grpc.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | +| defaults.server_config.servers.grpc.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| defaults.server_config.servers.grpc.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| defaults.server_config.servers.grpc.server.socket_path | string | `""` | mysql socket_path | +| defaults.server_config.servers.grpc.servicePort | int | `8081` | gRPC server service port | +| defaults.server_config.servers.rest.enabled | bool | `false` | REST server enabled | +| defaults.server_config.servers.rest.host | string | `"0.0.0.0"` | REST server host | +| defaults.server_config.servers.rest.port | int | `8080` | REST server port | +| defaults.server_config.servers.rest.server.http.handler_timeout | string | `"5s"` | REST server handler timeout | +| defaults.server_config.servers.rest.server.http.idle_timeout | string | `"2s"` | REST server idle timeout | +| defaults.server_config.servers.rest.server.http.read_header_timeout | string | `"1s"` | REST server read header timeout | +| defaults.server_config.servers.rest.server.http.read_timeout | string | `"1s"` | REST server read timeout | +| defaults.server_config.servers.rest.server.http.shutdown_duration | string | `"5s"` | REST server shutdown duration | +| defaults.server_config.servers.rest.server.http.write_timeout | string | `"1s"` | REST server write timeout | +| defaults.server_config.servers.rest.server.mode | string | `"REST"` | REST server server mode | +| defaults.server_config.servers.rest.server.network | string | `"tcp"` | mysql network | +| defaults.server_config.servers.rest.server.probe_wait_time | string | `"3s"` | REST server probe wait time | +| defaults.server_config.servers.rest.server.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| defaults.server_config.servers.rest.server.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| defaults.server_config.servers.rest.server.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| defaults.server_config.servers.rest.server.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| defaults.server_config.servers.rest.server.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| defaults.server_config.servers.rest.server.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| defaults.server_config.servers.rest.server.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | +| defaults.server_config.servers.rest.server.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| defaults.server_config.servers.rest.server.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| defaults.server_config.servers.rest.server.socket_path | string | `""` | mysql socket_path | +| defaults.server_config.servers.rest.servicePort | int | `8080` | REST server service port | +| defaults.server_config.tls.ca | string | `"/path/to/ca"` | TLS ca path | +| defaults.server_config.tls.cert | string | `"/path/to/cert"` | TLS cert path | +| defaults.server_config.tls.enabled | bool | `false` | TLS enabled | +| defaults.server_config.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | +| defaults.server_config.tls.key | string | `"/path/to/key"` | TLS key path | +| defaults.time_zone | string | `"UTC"` | Time zone | +| discoverer.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | +| discoverer.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | +| discoverer.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | +| discoverer.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | +| discoverer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-discoverer"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | +| discoverer.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| discoverer.annotations | object | `{}` | deployment annotations | +| discoverer.clusterRole.enabled | bool | `true` | creates clusterRole resource | +| discoverer.clusterRole.name | string | `"discoverer"` | name of clusterRole | +| discoverer.clusterRoleBinding.enabled | bool | `true` | creates clusterRoleBinding resource | +| discoverer.clusterRoleBinding.name | string | `"discoverer"` | name of clusterRoleBinding | +| discoverer.discoverer.discovery_duration | string | `"3s"` | duration to discovery | +| discoverer.discoverer.name | string | `""` | name to discovery | +| discoverer.discoverer.namespace | string | `"_MY_POD_NAMESPACE_"` | namespace to discovery | +| discoverer.discoverer.net.dialer.dual_stack_enabled | bool | `false` | TCP dialer dual stack enabled | +| discoverer.discoverer.net.dialer.keepalive | string | `"10m"` | TCP dialer keep alive | +| discoverer.discoverer.net.dialer.timeout | string | `"30s"` | TCP dialer timeout | +| discoverer.discoverer.net.dns.cache_enabled | bool | `true` | TCP DNS cache enabled | +| discoverer.discoverer.net.dns.cache_expiration | string | `"24h"` | TCP DNS cache expiration | +| discoverer.discoverer.net.dns.refresh_duration | string | `"5m"` | TCP DNS cache refresh duration | +| discoverer.discoverer.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | +| discoverer.discoverer.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | +| discoverer.discoverer.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | +| discoverer.discoverer.net.socket_option.reuse_port | bool | `true` | server listen socket option for reuse_port functionality | +| discoverer.discoverer.net.socket_option.tcp_cork | bool | `false` | server listen socket option for tcp_cork functionality | +| discoverer.discoverer.net.socket_option.tcp_defer_accept | bool | `false` | server listen socket option for tcp_defer_accept functionality | +| discoverer.discoverer.net.socket_option.tcp_fast_open | bool | `false` | server listen socket option for tcp_fast_open functionality | +| discoverer.discoverer.net.socket_option.tcp_no_delay | bool | `false` | server listen socket option for tcp_no_delay functionality | +| discoverer.discoverer.net.socket_option.tcp_quick_ack | bool | `false` | server listen socket option for tcp_quick_ack functionality | +| discoverer.discoverer.net.tls.ca | string | `"/path/to/ca"` | TLS ca path | +| discoverer.discoverer.net.tls.cert | string | `"/path/to/cert"` | TLS cert path | +| discoverer.discoverer.net.tls.enabled | bool | `false` | TLS enabled | +| discoverer.discoverer.net.tls.insecure_skip_verify | bool | `false` | enable/disable skip SSL certificate verification | +| discoverer.discoverer.net.tls.key | string | `"/path/to/key"` | TLS key path | +| discoverer.discoverer.selectors | object | `{"node":{"fields":{},"labels":{}},"node_metrics":{"fields":{},"labels":{}},"pod":{"fields":{},"labels":{}},"pod_metrics":{"fields":{},"labels":{}}}` | k8s resource selectors | +| discoverer.discoverer.selectors.node | object | `{"fields":{},"labels":{}}` | k8s resource selectors for node discovery | +| discoverer.discoverer.selectors.node.fields | object | `{}` | k8s field selectors for node discovery | +| discoverer.discoverer.selectors.node.labels | object | `{}` | k8s label selectors for node discovery | +| discoverer.discoverer.selectors.node_metrics | object | `{"fields":{},"labels":{}}` | k8s resource selectors for node_metrics discovery | +| discoverer.discoverer.selectors.node_metrics.fields | object | `{}` | k8s field selectors for node_metrics discovery | +| discoverer.discoverer.selectors.node_metrics.labels | object | `{}` | k8s label selectors for node_metrics discovery | +| discoverer.discoverer.selectors.pod | object | `{"fields":{},"labels":{}}` | k8s resource selectors for pod discovery | +| discoverer.discoverer.selectors.pod.fields | object | `{}` | k8s field selectors for pod discovery | +| discoverer.discoverer.selectors.pod.labels | object | `{}` | k8s label selectors for pod discovery | +| discoverer.discoverer.selectors.pod_metrics | object | `{"fields":{},"labels":{}}` | k8s resource selectors for pod_metrics discovery | +| discoverer.discoverer.selectors.pod_metrics.fields | object | `{}` | k8s field selectors for pod_metrics discovery | +| discoverer.discoverer.selectors.pod_metrics.labels | object | `{}` | k8s label selectors for pod_metrics discovery | +| discoverer.enabled | bool | `true` | discoverer enabled | +| discoverer.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| discoverer.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| discoverer.hpa.enabled | bool | `false` | HPA enabled | +| discoverer.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | +| discoverer.image.pullPolicy | string | `"Always"` | image pull policy | +| discoverer.image.repository | string | `"vdaas/vald-discoverer-k8s"` | image repository | +| discoverer.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| discoverer.initContainers | list | `[]` | init containers | +| discoverer.internalTrafficPolicy | string | `""` | internal traffic policy : Cluster or Local | +| discoverer.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | +| discoverer.logging | object | `{}` | logging config (overrides defaults.logging) | +| discoverer.maxReplicas | int | `2` | maximum number of replicas. if HPA is disabled, this value will be ignored. | +| discoverer.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | +| discoverer.minReplicas | int | `1` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | +| discoverer.name | string | `"vald-discoverer"` | name of discoverer deployment | +| discoverer.nodeName | string | `""` | node name | +| discoverer.nodeSelector | object | `{}` | node selector | +| discoverer.observability | object | `{"otlp":{"attribute":{"service_name":"vald-discoverer"}}}` | observability config (overrides defaults.observability) | +| discoverer.podAnnotations | object | `{}` | pod annotations | +| discoverer.podPriority.enabled | bool | `true` | discoverer pod PriorityClass enabled | +| discoverer.podPriority.value | int | `1000000` | discoverer pod PriorityClass value | +| discoverer.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | +| discoverer.progressDeadlineSeconds | int | `600` | progress deadline seconds | +| discoverer.resources | object | `{"limits":{"cpu":"600m","memory":"200Mi"},"requests":{"cpu":"200m","memory":"65Mi"}}` | compute resources | +| discoverer.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | +| discoverer.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | +| discoverer.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | +| discoverer.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | +| discoverer.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| discoverer.service.annotations | object | `{}` | service annotations | +| discoverer.service.labels | object | `{}` | service labels | +| discoverer.serviceAccount.enabled | bool | `true` | creates service account | +| discoverer.serviceAccount.name | string | `"vald"` | name of service account | +| discoverer.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| discoverer.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | +| discoverer.time_zone | string | `""` | Time zone | +| discoverer.tolerations | list | `[]` | tolerations | +| discoverer.topologySpreadConstraints | list | `[]` | topology spread constraints of discoverer pods | +| discoverer.version | string | `"v0.0.0"` | version of discoverer config | +| discoverer.volumeMounts | list | `[]` | volume mounts | +| discoverer.volumes | list | `[]` | volumes | +| gateway.filter.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | +| gateway.filter.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | +| gateway.filter.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | +| gateway.filter.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | +| gateway.filter.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-filter-gateway"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | +| gateway.filter.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| gateway.filter.annotations | object | `{}` | deployment annotations | +| gateway.filter.enabled | bool | `false` | gateway enabled | +| gateway.filter.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| gateway.filter.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| gateway.filter.gateway_config.egress_filter | object | `{"client":{},"distance_filters":[],"object_filters":[]}` | gRPC client config for egress filter | +| gateway.filter.gateway_config.egress_filter.client | object | `{}` | gRPC client config for egress filter (overrides defaults.grpc.client) | +| gateway.filter.gateway_config.egress_filter.distance_filters | list | `[]` | distance egress vector filter targets | +| gateway.filter.gateway_config.egress_filter.object_filters | list | `[]` | object egress vector filter targets | +| gateway.filter.gateway_config.gateway_client | object | `{}` | gRPC client for next gateway (overrides defaults.grpc.client) | +| gateway.filter.gateway_config.ingress_filter | object | `{"client":{},"insert_filters":[],"search_filters":[],"update_filters":[],"upsert_filters":[],"vectorizer":""}` | gRPC client config for ingress filter | +| gateway.filter.gateway_config.ingress_filter.client | object | `{}` | gRPC client for ingress filter (overrides defaults.grpc.client) | +| gateway.filter.gateway_config.ingress_filter.insert_filters | list | `[]` | insert ingress vector filter targets | +| gateway.filter.gateway_config.ingress_filter.search_filters | list | `[]` | search ingress vector filter targets | +| gateway.filter.gateway_config.ingress_filter.update_filters | list | `[]` | update ingress vector filter targets | +| gateway.filter.gateway_config.ingress_filter.upsert_filters | list | `[]` | upsert ingress vector filter targets | +| gateway.filter.gateway_config.ingress_filter.vectorizer | string | `""` | object ingress vectorize filter targets | +| gateway.filter.hpa.enabled | bool | `true` | HPA enabled | +| gateway.filter.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | +| gateway.filter.image.pullPolicy | string | `"Always"` | image pull policy | +| gateway.filter.image.repository | string | `"vdaas/vald-filter-gateway"` | image repository | +| gateway.filter.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| gateway.filter.ingress.annotations | object | `{"nginx.ingress.kubernetes.io/grpc-backend":"true"}` | annotations for ingress | +| gateway.filter.ingress.defaultBackend | object | `{"enabled":true}` | defaultBackend config | +| gateway.filter.ingress.defaultBackend.enabled | bool | `true` | gateway ingress defaultBackend enabled | +| gateway.filter.ingress.enabled | bool | `false` | gateway ingress enabled | +| gateway.filter.ingress.host | string | `"filter.gateway.vald.vdaas.org"` | ingress hostname | +| gateway.filter.ingress.pathType | string | `"ImplementationSpecific"` | gateway ingress pathType | +| gateway.filter.ingress.servicePort | string | `"grpc"` | service port to be exposed by ingress | +| gateway.filter.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-gateway-lb","sleepDuration":2,"target":"gateway-lb","type":"wait-for"}]` | init containers | +| gateway.filter.internalTrafficPolicy | string | `""` | internal traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| gateway.filter.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | +| gateway.filter.logging | object | `{}` | logging config (overrides defaults.logging) | +| gateway.filter.maxReplicas | int | `9` | maximum number of replicas. if HPA is disabled, this value will be ignored. | +| gateway.filter.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | +| gateway.filter.minReplicas | int | `3` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | +| gateway.filter.name | string | `"vald-filter-gateway"` | name of filter gateway deployment | +| gateway.filter.nodeName | string | `""` | node name | +| gateway.filter.nodeSelector | object | `{}` | node selector | +| gateway.filter.observability | object | `{"otlp":{"attribute":{"service_name":"vald-filter-gateway"}}}` | observability config (overrides defaults.observability) | +| gateway.filter.podAnnotations | object | `{}` | pod annotations | +| gateway.filter.podPriority.enabled | bool | `true` | gateway pod PriorityClass enabled | +| gateway.filter.podPriority.value | int | `1000000` | gateway pod PriorityClass value | +| gateway.filter.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | +| gateway.filter.progressDeadlineSeconds | int | `600` | progress deadline seconds | +| gateway.filter.resources | object | `{"limits":{"cpu":"2000m","memory":"700Mi"},"requests":{"cpu":"200m","memory":"150Mi"}}` | compute resources | +| gateway.filter.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | +| gateway.filter.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | +| gateway.filter.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | +| gateway.filter.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | +| gateway.filter.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| gateway.filter.service.annotations | object | `{}` | service annotations | +| gateway.filter.service.labels | object | `{}` | service labels | +| gateway.filter.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| gateway.filter.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | +| gateway.filter.time_zone | string | `""` | Time zone | +| gateway.filter.tolerations | list | `[]` | tolerations | +| gateway.filter.topologySpreadConstraints | list | `[]` | topology spread constraints of gateway pods | +| gateway.filter.version | string | `"v0.0.0"` | version of gateway config | +| gateway.filter.volumeMounts | list | `[]` | volume mounts | +| gateway.filter.volumes | list | `[]` | volumes | +| gateway.lb.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | +| gateway.lb.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | +| gateway.lb.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | +| gateway.lb.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | +| gateway.lb.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-lb-gateway"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | +| gateway.lb.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| gateway.lb.annotations | object | `{}` | deployment annotations | +| gateway.lb.enabled | bool | `true` | gateway enabled | +| gateway.lb.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| gateway.lb.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| gateway.lb.gateway_config.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | agent namespace | +| gateway.lb.gateway_config.discoverer.agent_client_options | object | `{}` | gRPC client options for agents (overrides defaults.grpc.client) | +| gateway.lb.gateway_config.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | +| gateway.lb.gateway_config.discoverer.duration | string | `"200ms"` | | +| gateway.lb.gateway_config.index_replica | int | `3` | number of index replica | +| gateway.lb.gateway_config.multi_operation_concurrency | int | `20` | number of concurrency of multiXXX api's operation | +| gateway.lb.gateway_config.node_name | string | `""` | node name | +| gateway.lb.hpa.enabled | bool | `true` | HPA enabled | +| gateway.lb.hpa.targetCPUUtilizationPercentage | int | `80` | HPA CPU utilization percentage | +| gateway.lb.image.pullPolicy | string | `"Always"` | image pull policy | +| gateway.lb.image.repository | string | `"vdaas/vald-lb-gateway"` | image repository | +| gateway.lb.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| gateway.lb.ingress.annotations | object | `{"nginx.ingress.kubernetes.io/grpc-backend":"true"}` | annotations for ingress | +| gateway.lb.ingress.defaultBackend | object | `{"enabled":true}` | defaultBackend config | +| gateway.lb.ingress.defaultBackend.enabled | bool | `true` | gateway ingress defaultBackend enabled | +| gateway.lb.ingress.enabled | bool | `false` | gateway ingress enabled | +| gateway.lb.ingress.host | string | `"lb.gateway.vald.vdaas.org"` | ingress hostname | +| gateway.lb.ingress.pathType | string | `"ImplementationSpecific"` | gateway ingress pathType | +| gateway.lb.ingress.servicePort | string | `"grpc"` | service port to be exposed by ingress | +| gateway.lb.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"}]` | init containers | +| gateway.lb.internalTrafficPolicy | string | `""` | internal traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| gateway.lb.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | +| gateway.lb.logging | object | `{}` | logging config (overrides defaults.logging) | +| gateway.lb.maxReplicas | int | `9` | maximum number of replicas. if HPA is disabled, this value will be ignored. | +| gateway.lb.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | +| gateway.lb.minReplicas | int | `3` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | +| gateway.lb.name | string | `"vald-lb-gateway"` | name of gateway deployment | +| gateway.lb.nodeName | string | `""` | node name | +| gateway.lb.nodeSelector | object | `{}` | node selector | +| gateway.lb.observability | object | `{"otlp":{"attribute":{"service_name":"vald-lb-gateway"}}}` | observability config (overrides defaults.observability) | +| gateway.lb.podAnnotations | object | `{}` | pod annotations | +| gateway.lb.podPriority.enabled | bool | `true` | gateway pod PriorityClass enabled | +| gateway.lb.podPriority.value | int | `1000000` | gateway pod PriorityClass value | +| gateway.lb.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | +| gateway.lb.progressDeadlineSeconds | int | `600` | progress deadline seconds | +| gateway.lb.resources | object | `{"limits":{"cpu":"2000m","memory":"700Mi"},"requests":{"cpu":"200m","memory":"150Mi"}}` | compute resources | +| gateway.lb.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | +| gateway.lb.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | +| gateway.lb.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | +| gateway.lb.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | +| gateway.lb.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| gateway.lb.service.annotations | object | `{}` | service annotations | +| gateway.lb.service.labels | object | `{}` | service labels | +| gateway.lb.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| gateway.lb.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | +| gateway.lb.time_zone | string | `""` | Time zone | +| gateway.lb.tolerations | list | `[]` | tolerations | +| gateway.lb.topologySpreadConstraints | list | `[]` | topology spread constraints of gateway pods | +| gateway.lb.version | string | `"v0.0.0"` | version of gateway config | +| gateway.lb.volumeMounts | list | `[]` | volume mounts | +| gateway.lb.volumes | list | `[]` | volumes | +| manager.index.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | node affinity preferred scheduling terms | +| manager.index.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | +| manager.index.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | +| manager.index.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | +| manager.index.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity preferred scheduling terms | +| manager.index.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| manager.index.annotations | object | `{}` | deployment annotations | +| manager.index.corrector.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | +| manager.index.corrector.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | +| manager.index.corrector.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | +| manager.index.corrector.discoverer.duration | string | `"500ms"` | refresh duration to discover | +| manager.index.corrector.enabled | bool | `false` | enable index correction CronJob | +| manager.index.corrector.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| manager.index.corrector.image.pullPolicy | string | `"Always"` | | +| manager.index.corrector.image.repository | string | `"vdaas/vald-index-correction"` | image repository | +| manager.index.corrector.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| manager.index.corrector.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | +| manager.index.corrector.kvs_async_write_concurrency | int | `2048` | concurrency for kvs async write | +| manager.index.corrector.name | string | `"vald-index-correction"` | name of index correction job | +| manager.index.corrector.node_name | string | `""` | node name | +| manager.index.corrector.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-correction"}}}` | observability config (overrides defaults.observability) | +| manager.index.corrector.schedule | string | `"6 3 * * *"` | CronJob schedule setting for index correction | +| manager.index.corrector.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| manager.index.corrector.startingDeadlineSeconds | int | `86400` | startingDeadlineSeconds setting for K8s completed jobs | +| manager.index.corrector.stream_list_concurrency | int | `200` | concurrency for stream list object rpc | +| manager.index.corrector.suspend | bool | `false` | CronJob suspend setting for index correction | +| manager.index.corrector.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | +| manager.index.corrector.version | string | `"v0.0.0"` | version of index manager config | +| manager.index.creator.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | +| manager.index.creator.concurrency | int | `1` | concurrency for indexing | +| manager.index.creator.creation_pool_size | int | `16` | number of pool size of create index processing | +| manager.index.creator.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | +| manager.index.creator.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | +| manager.index.creator.discoverer.duration | string | `"500ms"` | refresh duration to discover | +| manager.index.creator.enabled | bool | `false` | enable index creation CronJob | +| manager.index.creator.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| manager.index.creator.image.pullPolicy | string | `"Always"` | | +| manager.index.creator.image.repository | string | `"vdaas/vald-index-creation"` | image repository | +| manager.index.creator.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| manager.index.creator.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | +| manager.index.creator.name | string | `"vald-index-creation"` | name of index creation job | +| manager.index.creator.node_name | string | `""` | node name | +| manager.index.creator.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-creation"}}}` | observability config (overrides defaults.observability) | +| manager.index.creator.schedule | string | `"* * * * *"` | CronJob schedule setting for index creation | +| manager.index.creator.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| manager.index.creator.startingDeadlineSeconds | int | `43200` | startingDeadlineSeconds setting for K8s completed jobs | +| manager.index.creator.suspend | bool | `false` | CronJob suspend setting for index creation | +| manager.index.creator.target_addrs | list | `[]` | indexing target addresses | +| manager.index.creator.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | +| manager.index.creator.version | string | `"v0.0.0"` | version of index manager config | +| manager.index.enabled | bool | `true` | index manager enabled | +| manager.index.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| manager.index.externalTrafficPolicy | string | `""` | external traffic policy (can be specified when service type is LoadBalancer or NodePort) : Cluster or Local | +| manager.index.image.pullPolicy | string | `"Always"` | image pull policy | +| manager.index.image.repository | string | `"vdaas/vald-manager-index"` | image repository | +| manager.index.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| manager.index.indexer.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | +| manager.index.indexer.auto_index_check_duration | string | `"1m"` | check duration of automatic indexing | +| manager.index.indexer.auto_index_duration_limit | string | `"30m"` | limit duration of automatic indexing | +| manager.index.indexer.auto_index_length | int | `100` | number of cache to trigger automatic indexing | +| manager.index.indexer.auto_save_index_duration_limit | string | `"3h"` | limit duration of automatic index saving | +| manager.index.indexer.auto_save_index_wait_duration | string | `"10m"` | duration of automatic index saving wait duration for next saving | +| manager.index.indexer.concurrency | int | `1` | concurrency | +| manager.index.indexer.creation_pool_size | int | `16` | number of pool size of create index processing | +| manager.index.indexer.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | +| manager.index.indexer.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | +| manager.index.indexer.discoverer.duration | string | `"500ms"` | refresh duration to discover | +| manager.index.indexer.node_name | string | `""` | node name | +| manager.index.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | +| manager.index.kind | string | `"Deployment"` | deployment kind: Deployment or DaemonSet | +| manager.index.logging | object | `{}` | logging config (overrides defaults.logging) | +| manager.index.maxUnavailable | string | `"50%"` | maximum number of unavailable replicas | +| manager.index.name | string | `"vald-manager-index"` | name of index manager deployment | +| manager.index.nodeName | string | `""` | node name | +| manager.index.nodeSelector | object | `{}` | node selector | +| manager.index.observability | object | `{"otlp":{"attribute":{"service_name":"vald-manager-index"}}}` | observability config (overrides defaults.observability) | +| manager.index.podAnnotations | object | `{}` | pod annotations | +| manager.index.podPriority.enabled | bool | `true` | index manager pod PriorityClass enabled | +| manager.index.podPriority.value | int | `1000000` | index manager pod PriorityClass value | +| manager.index.podSecurityContext | object | `{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for pod | +| manager.index.progressDeadlineSeconds | int | `600` | progress deadline seconds | +| manager.index.readreplica.rotator | object | `{"agent_namespace":"_MY_POD_NAMESPACE_","clusterRole":{"enabled":true,"name":"vald-readreplica-rotate"},"clusterRoleBinding":{"enabled":true,"name":"vald-readreplica-rotate"},"env":[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}],"image":{"pullPolicy":"Always","repository":"vdaas/vald-readreplica-rotate","tag":""},"initContainers":[],"name":"vald-readreplica-rotate","observability":{"otlp":{"attribute":{"service_name":"vald-readreplica-rotation"}}},"read_replica_id":"_MY_TARGET_REPLICA_ID_","server_config":{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}},"serviceAccount":{"enabled":true,"name":"vald-readreplica-rotate"},"ttlSecondsAfterFinished":86400,"version":"v0.0.0"}` | [This feature is work in progress] readreplica agents rotation job | +| manager.index.readreplica.rotator.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | +| manager.index.readreplica.rotator.clusterRole.enabled | bool | `true` | creates clusterRole resource | +| manager.index.readreplica.rotator.clusterRole.name | string | `"vald-readreplica-rotate"` | name of clusterRole | +| manager.index.readreplica.rotator.clusterRoleBinding.enabled | bool | `true` | creates clusterRoleBinding resource | +| manager.index.readreplica.rotator.clusterRoleBinding.name | string | `"vald-readreplica-rotate"` | name of clusterRoleBinding | +| manager.index.readreplica.rotator.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| manager.index.readreplica.rotator.image.repository | string | `"vdaas/vald-readreplica-rotate"` | image repository | +| manager.index.readreplica.rotator.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| manager.index.readreplica.rotator.initContainers | list | `[]` | init containers | +| manager.index.readreplica.rotator.name | string | `"vald-readreplica-rotate"` | name of readreplica rotator job | +| manager.index.readreplica.rotator.observability | object | `{"otlp":{"attribute":{"service_name":"vald-readreplica-rotation"}}}` | observability config (overrides defaults.observability) | +| manager.index.readreplica.rotator.read_replica_id | string | `"_MY_TARGET_REPLICA_ID_"` | read replica id to perform rotation | +| manager.index.readreplica.rotator.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| manager.index.readreplica.rotator.serviceAccount.enabled | bool | `true` | creates service account | +| manager.index.readreplica.rotator.serviceAccount.name | string | `"vald-readreplica-rotate"` | name of service account | +| manager.index.readreplica.rotator.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | +| manager.index.readreplica.rotator.version | string | `"v0.0.0"` | version of readreplica rotator config | +| manager.index.replicas | int | `1` | number of replicas | +| manager.index.resources | object | `{"limits":{"cpu":"1000m","memory":"500Mi"},"requests":{"cpu":"200m","memory":"80Mi"}}` | compute resources | +| manager.index.revisionHistoryLimit | int | `2` | number of old history to retain to allow rollback | +| manager.index.rollingUpdate.maxSurge | string | `"25%"` | max surge of rolling update | +| manager.index.rollingUpdate.maxUnavailable | string | `"25%"` | max unavailable of rolling update | +| manager.index.saver.agent_namespace | string | `"_MY_POD_NAMESPACE_"` | namespace of agent pods to manage | +| manager.index.saver.concurrency | int | `1` | concurrency for index saving | +| manager.index.saver.discoverer.agent_client_options | object | `{"dial_option":{"net":{"dialer":{"keepalive":"15m"}}}}` | gRPC client options for agents (overrides defaults.grpc.client) | +| manager.index.saver.discoverer.client | object | `{}` | gRPC client for discoverer (overrides defaults.grpc.client) | +| manager.index.saver.discoverer.duration | string | `"500ms"` | refresh duration to discover | +| manager.index.saver.enabled | bool | `false` | enable index save CronJob | +| manager.index.saver.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | +| manager.index.saver.image.pullPolicy | string | `"Always"` | | +| manager.index.saver.image.repository | string | `"vdaas/vald-index-save"` | image repository | +| manager.index.saver.image.tag | string | `""` | image tag (overrides defaults.image.tag) | +| manager.index.saver.initContainers | list | `[{"image":"busybox:stable","name":"wait-for-agent","sleepDuration":2,"target":"agent","type":"wait-for"},{"image":"busybox:stable","name":"wait-for-discoverer","sleepDuration":2,"target":"discoverer","type":"wait-for"}]` | init containers | +| manager.index.saver.name | string | `"vald-index-save"` | name of index save job | +| manager.index.saver.node_name | string | `""` | node name | +| manager.index.saver.observability | object | `{"otlp":{"attribute":{"service_name":"vald-index-save"}}}` | observability config (overrides defaults.observability) | +| manager.index.saver.schedule | string | `"0 */3 * * *"` | CronJob schedule setting for index save | +| manager.index.saver.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| manager.index.saver.startingDeadlineSeconds | int | `43200` | startingDeadlineSeconds setting for K8s completed jobs | +| manager.index.saver.suspend | bool | `false` | CronJob suspend setting for index creation | +| manager.index.saver.target_addrs | list | `[]` | index saving target addresses | +| manager.index.saver.ttlSecondsAfterFinished | int | `86400` | ttl setting for K8s completed jobs | +| manager.index.saver.version | string | `"v0.0.0"` | version of index manager config | +| manager.index.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | security context for container | +| manager.index.server_config | object | `{"healths":{"liveness":{},"readiness":{},"startup":{}},"metrics":{"pprof":{}},"servers":{"grpc":{},"rest":{}}}` | server config (overrides defaults.server_config) | +| manager.index.service.annotations | object | `{}` | service annotations | +| manager.index.service.labels | object | `{}` | service labels | +| manager.index.serviceType | string | `"ClusterIP"` | service type: ClusterIP, LoadBalancer or NodePort | +| manager.index.terminationGracePeriodSeconds | int | `30` | duration in seconds pod needs to terminate gracefully | +| manager.index.time_zone | string | `""` | Time zone | +| manager.index.tolerations | list | `[]` | tolerations | +| manager.index.topologySpreadConstraints | list | `[]` | topology spread constraints of index manager pods | +| manager.index.version | string | `"v0.0.0"` | version of index manager config | +| manager.index.volumeMounts | list | `[]` | volume mounts | +| manager.index.volumes | list | `[]` | volumes | diff --git a/charts/vald/templates/index/job/readreplica/rotate/clusterrole.yaml b/charts/vald/templates/index/job/readreplica/rotate/clusterrole.yaml new file mode 100644 index 0000000000..921d78f061 --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/clusterrole.yaml @@ -0,0 +1,59 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- if and $rotator.enabled $rotator.clusterRole.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ $rotator.clusterRole.name }} + labels: + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} + app.kubernetes.io/component: rotator +rules: + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots + verbs: + - get + - list + - watch + - create + - delete + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - get + - list + - watch + - create + - delete + - apiGroups: + - "apps" + resources: + - deployments + verbs: + - get + - list + - watch + - update +{{- end }} diff --git a/charts/vald/templates/index/job/readreplica/rotate/clusterrolebinding.yaml b/charts/vald/templates/index/job/readreplica/rotate/clusterrolebinding.yaml new file mode 100644 index 0000000000..e69382eae5 --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/clusterrolebinding.yaml @@ -0,0 +1,37 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- if and $rotator.enabled $rotator.clusterRoleBinding.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ $rotator.clusterRoleBinding.name }} + labels: + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} + app.kubernetes.io/component: rotator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ $rotator.clusterRole.name }} +subjects: + - kind: ServiceAccount + name: {{ $rotator.serviceAccount.name }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/vald/templates/index/job/readreplica/rotate/configmap.yaml b/charts/vald/templates/index/job/readreplica/rotate/configmap.yaml new file mode 100644 index 0000000000..6402c217b0 --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/configmap.yaml @@ -0,0 +1,52 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- $gateway := .Values.gateway.lb -}} +{{- $index := .Values.manager.index -}} +{{- $agent := .Values.agent -}} +{{- $discoverer := .Values.discoverer -}} +{{- if $rotator.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $rotator.name }}-config + labels: + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} + app.kubernetes.io/component: {{ $rotator.name }} +data: + config.yaml: | + --- + version: {{ $rotator.version }} + time_zone: {{ default .Values.defaults.time_zone $rotator.time_zone }} + logging: + {{- $logging := dict "Values" $rotator.logging "default" .Values.defaults.logging }} + {{- include "vald.logging" $logging | nindent 6 }} + server_config: + {{- $servers := dict "Values" $rotator.server_config "default" .Values.defaults.server_config }} + {{- include "vald.servers" $servers | nindent 6 }} + observability: + {{- $observability := dict "Values" $rotator.observability "default" .Values.defaults.observability }} + {{- include "vald.observability" $observability | nindent 6 }} + rotator: + agent_namespace: {{ $rotator.agent_namespace | quote }} + read_replica_label_key: "vald-readreplica-id" + read_replica_id: "_MY_TARGET_REPLICA_ID_" + volume_name: "vald-agent-ngt-readreplica-pvc" +{{- end }} diff --git a/charts/vald/templates/index/job/readreplica/rotate/cronjob.yaml b/charts/vald/templates/index/job/readreplica/rotate/cronjob.yaml new file mode 100644 index 0000000000..4988b8af02 --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/cronjob.yaml @@ -0,0 +1,79 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- if $rotator.enabled }} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ $rotator.name }} + labels: + app: {{ $rotator.name }} + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} +spec: + schedule: "0 0 31 2 *" # This never happens as February never has 31 days so we can prevent this cronjob from running automatically + concurrencyPolicy: Forbid + suspend: true # This cronjob should only be run manually by index manager + startingDeadlineSeconds: 0 # To prevent being blocked in any case + jobTemplate: + spec: + ttlSecondsAfterFinished: {{ $rotator.ttlSecondsAfterFinished }} + template: + metadata: + labels: + app: {{ $rotator.name }} + app.kubernetes.io/name: {{ include "vald.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: {{ $rotator.name }} + annotations: + {{- $pprof := default .Values.defaults.server_config.metrics.pprof $rotator.server_config.metrics.pprof -}} + {{- if $pprof.enabled }} + pyroscope.io/scrape: "true" + pyroscope.io/application-name: {{ $rotator.name }} + pyroscope.io/profile-cpu-enabled: "true" + pyroscope.io/profile-mem-enabled: "true" + pyroscope.io/port: {{ $pprof.port | quote }} + {{- end }} + spec: + {{- if $rotator.initContainers }} + initContainers: + {{- $initContainers := dict "initContainers" $rotator.initContainers "Values" .Values "namespace" .Release.Namespace -}} + {{- include "vald.initContainers" $initContainers | trim | nindent 12 }} + {{- end }} + containers: + - name: {{ $rotator.name }} + image: "{{ $rotator.image.repository }}:{{ default .Values.defaults.image.tag $rotator.image.tag }}" + imagePullPolicy: {{ $rotator.image.pullPolicy }} + volumeMounts: + - name: {{ $rotator.name }}-config + mountPath: /etc/server/ + {{- $servers := dict "Values" $rotator.server_config "default" .Values.defaults.server_config -}} + {{- include "vald.containerPorts" $servers | trim | nindent 14 }} + {{- if $rotator.env }} + env: + {{- toYaml $rotator.env | nindent 16 }} + {{- end }} + restartPolicy: OnFailure + volumes: + - name: {{ $rotator.name }}-config + configMap: + defaultMode: 420 + name: {{ $rotator.name }}-config + serviceAccountName: {{ $rotator.serviceAccount.name }} +{{- end }} diff --git a/charts/vald/templates/index/job/readreplica/rotate/networkpolicy.yaml b/charts/vald/templates/index/job/readreplica/rotate/networkpolicy.yaml new file mode 100644 index 0000000000..adb7f7ae3f --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/networkpolicy.yaml @@ -0,0 +1,46 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- if and .Values.defaults.networkPolicy.enabled $rotator.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ $rotator.name }}-allow +spec: + podSelector: + matchLabels: + app: {{ $rotator.name }} + policyTypes: + - Ingress + - Egress + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + {{- if .Values.defaults.networkPolicy.custom.ingress }} + {{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }} + {{- end }} + egress: + - to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + {{- if .Values.defaults.networkPolicy.custom.egress }} + {{- toYaml .Values.defaults.networkPolicy.custom.egress | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/vald/templates/index/job/readreplica/rotate/serviceaccount.yaml b/charts/vald/templates/index/job/readreplica/rotate/serviceaccount.yaml new file mode 100644 index 0000000000..5afae0eeab --- /dev/null +++ b/charts/vald/templates/index/job/readreplica/rotate/serviceaccount.yaml @@ -0,0 +1,29 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $rotator := .Values.manager.index.readreplica.rotator -}} +{{- if and $rotator.enabled $rotator.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ $rotator.serviceAccount.name }} + labels: + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} + app.kubernetes.io/component: rotator +{{- end }} diff --git a/charts/vald/values.schema.json b/charts/vald/values.schema.json index dcfcc916fc..b4b3ca9576 100644 --- a/charts/vald/values.schema.json +++ b/charts/vald/values.schema.json @@ -14402,6 +14402,1109 @@ "type": "integer", "description": "progress deadline seconds" }, + "readreplica": { + "type": "object", + "description": "[This feature is work in progress] readreplica agents rotation job", + "properties": { + "": { "type": "object" }, + "agent_namespace": { + "type": "string", + "description": "namespace of agent pods to manage" + }, + "clusterRole": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "creates clusterRole resource" + }, + "name": { + "type": "string", + "description": "name of clusterRole" + } + } + }, + "clusterRoleBinding": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "creates clusterRoleBinding resource" + }, + "name": { + "type": "string", + "description": "name of clusterRoleBinding" + } + } + }, + "env": { + "type": "array", + "description": "environment variables", + "items": { "type": "object" } + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string", + "description": "image pull policy", + "enum": ["Always", "Never", "IfNotPresent"] + }, + "repository": { + "type": "string", + "description": "image repository" + }, + "tag": { + "type": "string", + "description": "image tag (overrides defaults.image.tag)" + } + } + }, + "initContainers": { + "type": "array", + "description": "init containers", + "items": { "type": "object" } + }, + "name": { + "type": "string", + "description": "name of readreplica rotator job" + }, + "observability": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "observability features enabled" + }, + "metrics": { + "type": "object", + "properties": { + "enable_cgo": { + "type": "boolean", + "description": "CGO metrics enabled" + }, + "enable_goroutine": { + "type": "boolean", + "description": "goroutine metrics enabled" + }, + "enable_memory": { + "type": "boolean", + "description": "memory metrics enabled" + }, + "enable_version_info": { + "type": "boolean", + "description": "version info metrics enabled" + }, + "version_info_labels": { + "type": "array", + "description": "enabled label names of version info", + "items": { + "type": "string", + "enum": [ + "vald_version", + "server_name", + "git_commit", + "build_time", + "go_version", + "go_os", + "go_arch", + "cgo_enabled", + "ngt_version", + "build_cpu_info_flags" + ] + } + } + } + }, + "otlp": { + "type": "object", + "properties": { + "attribute": { + "type": "object", + "description": "default resource attribute", + "properties": { + "namespace": { + "type": "string", + "description": "namespace" + }, + "node_name": { + "type": "string", + "description": "node name" + }, + "pod_name": { + "type": "string", + "description": "pod name" + }, + "service_name": { + "type": "string", + "description": "service name" + } + } + }, + "collector_endpoint": { + "type": "string", + "description": "OpenTelemetry Collector endpoint" + }, + "metrics_export_interval": { + "type": "string", + "description": "metrics export interval" + }, + "metrics_export_timeout": { + "type": "string", + "description": "metrics export timeout" + }, + "trace_batch_timeout": { + "type": "string", + "description": "trace batch timeout" + }, + "trace_export_timeout": { + "type": "string", + "description": "trace export timeout" + }, + "trace_max_export_batch_size": { + "type": "integer", + "description": "trace maximum export batch size" + }, + "trace_max_queue_size": { + "type": "integer", + "description": "trace maximum queue size" + } + } + }, + "trace": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "trace enabled" + } + } + } + } + }, + "read_replica_id": { + "type": "string", + "description": "read replica id to perform rotation" + }, + "server_config": { + "type": "object", + "properties": { + "full_shutdown_duration": { + "type": "string", + "description": "server full shutdown duration" + }, + "healths": { + "type": "object", + "properties": { + "liveness": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "liveness server enabled" + }, + "host": { + "type": "string", + "description": "liveness server host" + }, + "livenessProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer", + "description": "liveness probe failure threshold" + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "liveness probe path" + }, + "port": { + "type": "string", + "description": "liveness probe port" + }, + "scheme": { + "type": "string", + "description": "liveness probe scheme" + } + } + }, + "initialDelaySeconds": { + "type": "integer", + "description": "liveness probe initial delay seconds" + }, + "periodSeconds": { + "type": "integer", + "description": "liveness probe period seconds" + }, + "successThreshold": { + "type": "integer", + "description": "liveness probe success threshold" + }, + "timeoutSeconds": { + "type": "integer", + "description": "liveness probe timeout seconds" + } + } + }, + "port": { + "type": "integer", + "description": "liveness server port", + "maximum": 65535, + "minimum": 0 + }, + "server": { + "type": "object", + "properties": { + "http": { + "type": "object", + "properties": { + "handler_timeout": { + "type": "string", + "description": "REST server handler timeout" + }, + "idle_timeout": { + "type": "string", + "description": "REST server idle timeout" + }, + "read_header_timeout": { + "type": "string", + "description": "REST server read header timeout" + }, + "read_timeout": { + "type": "string", + "description": "REST server read timeout" + }, + "shutdown_duration": { + "type": "string", + "description": "REST server shutdown duration" + }, + "write_timeout": { + "type": "string", + "description": "REST server write timeout" + } + } + }, + "mode": { + "type": "string", + "description": "REST server server mode" + }, + "network": { + "type": "string", + "description": "mysql network", + "enum": [ + "tcp", + "tcp4", + "tcp6", + "udp", + "udp4", + "udp6", + "unix", + "unixgram", + "unixpacket" + ] + }, + "probe_wait_time": { + "type": "string", + "description": "REST server probe wait time" + }, + "socket_option": { + "type": "object", + "properties": { + "ip_recover_destination_addr": { + "type": "boolean", + "description": "server listen socket option for ip_recover_destination_addr functionality" + }, + "ip_transparent": { + "type": "boolean", + "description": "server listen socket option for ip_transparent functionality" + }, + "reuse_addr": { + "type": "boolean", + "description": "server listen socket option for reuse_addr functionality" + }, + "reuse_port": { + "type": "boolean", + "description": "server listen socket option for reuse_port functionality" + }, + "tcp_cork": { + "type": "boolean", + "description": "server listen socket option for tcp_cork functionality" + }, + "tcp_defer_accept": { + "type": "boolean", + "description": "server listen socket option for tcp_defer_accept functionality" + }, + "tcp_fast_open": { + "type": "boolean", + "description": "server listen socket option for tcp_fast_open functionality" + }, + "tcp_no_delay": { + "type": "boolean", + "description": "server listen socket option for tcp_no_delay functionality" + }, + "tcp_quick_ack": { + "type": "boolean", + "description": "server listen socket option for tcp_quick_ack functionality" + } + } + }, + "socket_path": { + "type": "string", + "description": "mysql socket_path" + } + } + }, + "servicePort": { + "type": "integer", + "description": "liveness server service port", + "maximum": 65535, + "minimum": 0 + } + } + }, + "readiness": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "readiness server enabled" + }, + "host": { + "type": "string", + "description": "readiness server host" + }, + "port": { + "type": "integer", + "description": "readiness server port", + "maximum": 65535, + "minimum": 0 + }, + "readinessProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer", + "description": "readiness probe failure threshold" + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "readiness probe path" + }, + "port": { + "type": "string", + "description": "readiness probe port" + }, + "scheme": { + "type": "string", + "description": "readiness probe scheme" + } + } + }, + "initialDelaySeconds": { + "type": "integer", + "description": "readiness probe initial delay seconds" + }, + "periodSeconds": { + "type": "integer", + "description": "readiness probe period seconds" + }, + "successThreshold": { + "type": "integer", + "description": "readiness probe success threshold" + }, + "timeoutSeconds": { + "type": "integer", + "description": "readiness probe timeout seconds" + } + } + }, + "server": { + "type": "object", + "properties": { + "http": { + "type": "object", + "properties": { + "handler_timeout": { + "type": "string", + "description": "REST server handler timeout" + }, + "idle_timeout": { + "type": "string", + "description": "REST server idle timeout" + }, + "read_header_timeout": { + "type": "string", + "description": "REST server read header timeout" + }, + "read_timeout": { + "type": "string", + "description": "REST server read timeout" + }, + "shutdown_duration": { + "type": "string", + "description": "REST server shutdown duration" + }, + "write_timeout": { + "type": "string", + "description": "REST server write timeout" + } + } + }, + "mode": { + "type": "string", + "description": "REST server server mode" + }, + "network": { + "type": "string", + "description": "mysql network", + "enum": [ + "tcp", + "tcp4", + "tcp6", + "udp", + "udp4", + "udp6", + "unix", + "unixgram", + "unixpacket" + ] + }, + "probe_wait_time": { + "type": "string", + "description": "REST server probe wait time" + }, + "socket_option": { + "type": "object", + "properties": { + "ip_recover_destination_addr": { + "type": "boolean", + "description": "server listen socket option for ip_recover_destination_addr functionality" + }, + "ip_transparent": { + "type": "boolean", + "description": "server listen socket option for ip_transparent functionality" + }, + "reuse_addr": { + "type": "boolean", + "description": "server listen socket option for reuse_addr functionality" + }, + "reuse_port": { + "type": "boolean", + "description": "server listen socket option for reuse_port functionality" + }, + "tcp_cork": { + "type": "boolean", + "description": "server listen socket option for tcp_cork functionality" + }, + "tcp_defer_accept": { + "type": "boolean", + "description": "server listen socket option for tcp_defer_accept functionality" + }, + "tcp_fast_open": { + "type": "boolean", + "description": "server listen socket option for tcp_fast_open functionality" + }, + "tcp_no_delay": { + "type": "boolean", + "description": "server listen socket option for tcp_no_delay functionality" + }, + "tcp_quick_ack": { + "type": "boolean", + "description": "server listen socket option for tcp_quick_ack functionality" + } + } + }, + "socket_path": { + "type": "string", + "description": "mysql socket_path" + } + } + }, + "servicePort": { + "type": "integer", + "description": "readiness server service port", + "maximum": 65535, + "minimum": 0 + } + } + }, + "startup": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "startup server enabled" + }, + "port": { + "type": "integer", + "description": "startup server port", + "maximum": 65535, + "minimum": 0 + }, + "startupProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer", + "description": "startup probe failure threshold" + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "startup probe path" + }, + "port": { + "type": "string", + "description": "startup probe port" + }, + "scheme": { + "type": "string", + "description": "startup probe scheme" + } + } + }, + "initialDelaySeconds": { + "type": "integer", + "description": "startup probe initial delay seconds" + }, + "periodSeconds": { + "type": "integer", + "description": "startup probe period seconds" + }, + "successThreshold": { + "type": "integer", + "description": "startup probe success threshold" + }, + "timeoutSeconds": { + "type": "integer", + "description": "startup probe timeout seconds" + } + } + } + } + } + } + }, + "metrics": { + "type": "object", + "properties": { + "pprof": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "pprof server enabled" + }, + "host": { + "type": "string", + "description": "pprof server host" + }, + "port": { + "type": "integer", + "description": "pprof server port", + "maximum": 65535, + "minimum": 0 + }, + "server": { + "type": "object", + "properties": { + "http": { + "type": "object", + "properties": { + "handler_timeout": { + "type": "string", + "description": "REST server handler timeout" + }, + "idle_timeout": { + "type": "string", + "description": "REST server idle timeout" + }, + "read_header_timeout": { + "type": "string", + "description": "REST server read header timeout" + }, + "read_timeout": { + "type": "string", + "description": "REST server read timeout" + }, + "shutdown_duration": { + "type": "string", + "description": "REST server shutdown duration" + }, + "write_timeout": { + "type": "string", + "description": "REST server write timeout" + } + } + }, + "mode": { + "type": "string", + "description": "REST server server mode" + }, + "network": { + "type": "string", + "description": "mysql network", + "enum": [ + "tcp", + "tcp4", + "tcp6", + "udp", + "udp4", + "udp6", + "unix", + "unixgram", + "unixpacket" + ] + }, + "probe_wait_time": { + "type": "string", + "description": "REST server probe wait time" + }, + "socket_option": { + "type": "object", + "properties": { + "ip_recover_destination_addr": { + "type": "boolean", + "description": "server listen socket option for ip_recover_destination_addr functionality" + }, + "ip_transparent": { + "type": "boolean", + "description": "server listen socket option for ip_transparent functionality" + }, + "reuse_addr": { + "type": "boolean", + "description": "server listen socket option for reuse_addr functionality" + }, + "reuse_port": { + "type": "boolean", + "description": "server listen socket option for reuse_port functionality" + }, + "tcp_cork": { + "type": "boolean", + "description": "server listen socket option for tcp_cork functionality" + }, + "tcp_defer_accept": { + "type": "boolean", + "description": "server listen socket option for tcp_defer_accept functionality" + }, + "tcp_fast_open": { + "type": "boolean", + "description": "server listen socket option for tcp_fast_open functionality" + }, + "tcp_no_delay": { + "type": "boolean", + "description": "server listen socket option for tcp_no_delay functionality" + }, + "tcp_quick_ack": { + "type": "boolean", + "description": "server listen socket option for tcp_quick_ack functionality" + } + } + }, + "socket_path": { + "type": "string", + "description": "mysql socket_path" + } + } + }, + "servicePort": { + "type": "integer", + "description": "pprof server service port", + "maximum": 65535, + "minimum": 0 + } + } + } + } + }, + "servers": { + "type": "object", + "properties": { + "grpc": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "gRPC server enabled" + }, + "host": { + "type": "string", + "description": "gRPC server host" + }, + "port": { + "type": "integer", + "description": "gRPC server port", + "maximum": 65535, + "minimum": 0 + }, + "server": { + "type": "object", + "properties": { + "grpc": { + "type": "object", + "properties": { + "bidirectional_stream_concurrency": { + "type": "integer", + "description": "gRPC server bidirectional stream concurrency" + }, + "connection_timeout": { + "type": "string", + "description": "gRPC server connection timeout" + }, + "enable_reflection": { + "type": "boolean", + "description": "gRPC server reflection option" + }, + "header_table_size": { + "type": "integer", + "description": "gRPC server header table size" + }, + "initial_conn_window_size": { + "type": "integer", + "description": "gRPC server initial connection window size" + }, + "initial_window_size": { + "type": "integer", + "description": "gRPC server initial window size" + }, + "interceptors": { + "type": "array", + "description": "gRPC server interceptors", + "items": { + "type": "string", + "enum": [ + "RecoverInterceptor", + "AccessLogInterceptor", + "TraceInterceptor", + "MetricInterceptor" + ] + } + }, + "keepalive": { + "type": "object", + "properties": { + "max_conn_age": { + "type": "string", + "description": "gRPC server keep alive max connection age" + }, + "max_conn_age_grace": { + "type": "string", + "description": "gRPC server keep alive max connection age grace" + }, + "max_conn_idle": { + "type": "string", + "description": "gRPC server keep alive max connection idle" + }, + "min_time": { + "type": "string", + "description": "gRPC server keep alive min_time" + }, + "permit_without_stream": { + "type": "boolean", + "description": "gRPC server keep alive permit_without_stream" + }, + "time": { + "type": "string", + "description": "gRPC server keep alive time" + }, + "timeout": { + "type": "string", + "description": "gRPC server keep alive timeout" + } + } + }, + "max_header_list_size": { + "type": "integer", + "description": "gRPC server max header list size" + }, + "max_receive_message_size": { + "type": "integer", + "description": "gRPC server max receive message size" + }, + "max_send_message_size": { + "type": "integer", + "description": "gRPC server max send message size" + }, + "read_buffer_size": { + "type": "integer", + "description": "gRPC server read buffer size" + }, + "write_buffer_size": { + "type": "integer", + "description": "gRPC server write buffer size" + } + } + }, + "mode": { + "type": "string", + "description": "gRPC server server mode" + }, + "network": { + "type": "string", + "description": "mysql network", + "enum": [ + "tcp", + "tcp4", + "tcp6", + "udp", + "udp4", + "udp6", + "unix", + "unixgram", + "unixpacket" + ] + }, + "probe_wait_time": { + "type": "string", + "description": "gRPC server probe wait time" + }, + "restart": { + "type": "boolean", + "description": "gRPC server restart" + }, + "socket_option": { + "type": "object", + "properties": { + "ip_recover_destination_addr": { + "type": "boolean", + "description": "server listen socket option for ip_recover_destination_addr functionality" + }, + "ip_transparent": { + "type": "boolean", + "description": "server listen socket option for ip_transparent functionality" + }, + "reuse_addr": { + "type": "boolean", + "description": "server listen socket option for reuse_addr functionality" + }, + "reuse_port": { + "type": "boolean", + "description": "server listen socket option for reuse_port functionality" + }, + "tcp_cork": { + "type": "boolean", + "description": "server listen socket option for tcp_cork functionality" + }, + "tcp_defer_accept": { + "type": "boolean", + "description": "server listen socket option for tcp_defer_accept functionality" + }, + "tcp_fast_open": { + "type": "boolean", + "description": "server listen socket option for tcp_fast_open functionality" + }, + "tcp_no_delay": { + "type": "boolean", + "description": "server listen socket option for tcp_no_delay functionality" + }, + "tcp_quick_ack": { + "type": "boolean", + "description": "server listen socket option for tcp_quick_ack functionality" + } + } + }, + "socket_path": { + "type": "string", + "description": "mysql socket_path" + } + } + }, + "servicePort": { + "type": "integer", + "description": "gRPC server service port", + "maximum": 65535, + "minimum": 0 + } + } + }, + "rest": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "REST server enabled" + }, + "host": { + "type": "string", + "description": "REST server host" + }, + "port": { + "type": "integer", + "description": "REST server port", + "maximum": 65535, + "minimum": 0 + }, + "server": { + "type": "object", + "properties": { + "http": { + "type": "object", + "properties": { + "handler_timeout": { + "type": "string", + "description": "REST server handler timeout" + }, + "idle_timeout": { + "type": "string", + "description": "REST server idle timeout" + }, + "read_header_timeout": { + "type": "string", + "description": "REST server read header timeout" + }, + "read_timeout": { + "type": "string", + "description": "REST server read timeout" + }, + "shutdown_duration": { + "type": "string", + "description": "REST server shutdown duration" + }, + "write_timeout": { + "type": "string", + "description": "REST server write timeout" + } + } + }, + "mode": { + "type": "string", + "description": "REST server server mode" + }, + "network": { + "type": "string", + "description": "mysql network", + "enum": [ + "tcp", + "tcp4", + "tcp6", + "udp", + "udp4", + "udp6", + "unix", + "unixgram", + "unixpacket" + ] + }, + "probe_wait_time": { + "type": "string", + "description": "REST server probe wait time" + }, + "socket_option": { + "type": "object", + "properties": { + "ip_recover_destination_addr": { + "type": "boolean", + "description": "server listen socket option for ip_recover_destination_addr functionality" + }, + "ip_transparent": { + "type": "boolean", + "description": "server listen socket option for ip_transparent functionality" + }, + "reuse_addr": { + "type": "boolean", + "description": "server listen socket option for reuse_addr functionality" + }, + "reuse_port": { + "type": "boolean", + "description": "server listen socket option for reuse_port functionality" + }, + "tcp_cork": { + "type": "boolean", + "description": "server listen socket option for tcp_cork functionality" + }, + "tcp_defer_accept": { + "type": "boolean", + "description": "server listen socket option for tcp_defer_accept functionality" + }, + "tcp_fast_open": { + "type": "boolean", + "description": "server listen socket option for tcp_fast_open functionality" + }, + "tcp_no_delay": { + "type": "boolean", + "description": "server listen socket option for tcp_no_delay functionality" + }, + "tcp_quick_ack": { + "type": "boolean", + "description": "server listen socket option for tcp_quick_ack functionality" + } + } + }, + "socket_path": { + "type": "string", + "description": "mysql socket_path" + } + } + }, + "servicePort": { + "type": "integer", + "description": "REST server service port", + "maximum": 65535, + "minimum": 0 + } + } + } + } + }, + "tls": { + "type": "object", + "properties": { + "ca": { + "type": "string", + "description": "TLS ca path" + }, + "cert": { + "type": "string", + "description": "TLS cert path" + }, + "enabled": { + "type": "boolean", + "description": "TLS enabled" + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "enable/disable skip SSL certificate verification" + }, + "key": { + "type": "string", + "description": "TLS key path" + } + } + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "creates service account" + }, + "name": { + "type": "string", + "description": "name of service account" + } + } + }, + "ttlSecondsAfterFinished": { + "type": "integer", + "description": "ttl setting for K8s completed jobs" + }, + "version": { + "type": "string", + "description": "version of gateway config", + "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]$" + } + } + }, "replicas": { "type": "integer", "description": "number of replicas", diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index becc93ce12..9d75a74753 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -2949,3 +2949,91 @@ manager: net: dialer: keepalive: 15m #indexer fetches uncommitted index length, which includes huge payload so we need to set keepalive longer than usual + # @schema {"name": "manager.index.readreplica", "type": "object"} + readreplica: + # @schema {"name": "manager.index.readreplica.rotator", "type": "object"} + # manager.index.readreplica.rotator -- [This feature is work in progress] readreplica agents rotation job + rotator: + # @schema {"name": "manager.index.readreplica.rotator.name", "type": "string"} + # manager.index.readreplica.rotator.name -- name of readreplica rotator job + name: vald-readreplica-rotate + # @schema {"name": "manager.index.readreplica.rotator.image", "alias": "image"} + image: + # manager.index.readreplica.rotator.image.repository -- image repository + repository: vdaas/vald-readreplica-rotate + # manager.index.readreplica.rotator.image.tag -- image tag (overrides defaults.image.tag) + tag: "" + # manager.index.image.pullPolicy -- image pull policy + pullPolicy: Always + # @schema {"name": "manager.index.readreplica.rotator.server_config", "alias": "server_config"} + # manager.index.readreplica.rotator.server_config -- server config (overrides defaults.server_config) + server_config: + servers: + rest: {} + grpc: {} + healths: + liveness: {} + readiness: {} + startup: {} + metrics: + pprof: {} + # @schema {"name": "manager.index.readreplica.rotator.initContainers", "alias": "initContainers"} + # manager.index.readreplica.rotator.initContainers -- init containers + initContainers: [] + # @schema {"name": "manager.index.readreplica.rotator.env", "alias": "env"} + # manager.index.readreplica.rotator.env -- environment variables + env: + - name: MY_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + # @schema {"name": "manager.index.readreplica.rotator.observability", "alias": "observability"} + # manager.index.readreplica.rotator.observability -- observability config (overrides defaults.observability) + observability: + otlp: + attribute: + service_name: vald-readreplica-rotation + # @schema {"name": "manager.index.readreplica.rotator.ttlSecondsAfterFinished", "type": "integer"} + # manager.index.readreplica.rotator.ttlSecondsAfterFinished -- ttl setting for K8s completed jobs + ttlSecondsAfterFinished: 86400 + # @schema {"name": "manager.index.readreplica.rotator.version", "alias": "version"} + # manager.index.readreplica.rotator.version -- version of readreplica rotator config + version: v0.0.0 + # @schema {"name": "manager.index.readreplica.rotator.agent_namespace", "type": "string"} + # manager.index.readreplica.rotator.agent_namespace -- namespace of agent pods to manage + agent_namespace: _MY_POD_NAMESPACE_ + # @schema {"name": "manager.index.readreplica.rotator.read_replica_id", "type": "string"} + # manager.index.readreplica.rotator.read_replica_id -- read replica id to perform rotation + read_replica_id: _MY_TARGET_REPLICA_ID_ + # @schema {"name": "manager.index.readreplica.rotator.serviceAccount", "type": "object"} + serviceAccount: + # @schema {"name": "manager.index.readreplica.rotator.serviceAccount.enabled", "type": "boolean"} + # manager.index.readreplica.rotator.serviceAccount.enabled -- creates service account + enabled: true + # @schema {"name": "manager.index.readreplica.rotator.serviceAccount.name", "type": "string"} + # manager.index.readreplica.rotator.serviceAccount.name -- name of service account + name: vald-readreplica-rotate + # @schema {"name": "manager.index.readreplica.rotator.clusterRole", "type": "object"} + clusterRole: + # @schema {"name": "manager.index.readreplica.rotator.clusterRole.enabled", "type": "boolean"} + # manager.index.readreplica.rotator.clusterRole.enabled -- creates clusterRole resource + enabled: true + # @schema {"name": "manager.index.readreplica.rotator.clusterRole.name", "type": "string"} + # manager.index.readreplica.rotator.clusterRole.name -- name of clusterRole + name: vald-readreplica-rotate + # @schema {"name": "manager.index.readreplica.rotator.clusterRoleBinding", "type": "object"} + clusterRoleBinding: + # @schema {"name": "manager.index.readreplica.rotator.clusterRoleBinding.enabled", "type": "boolean"} + # manager.index.readreplica.rotator.clusterRoleBinding.enabled -- creates clusterRoleBinding resource + enabled: true + # @schema {"name": "manager.index.readreplica.rotator.clusterRoleBinding.name", "type": "string"} + # manager.index.readreplica.rotator.clusterRoleBinding.name -- name of clusterRoleBinding + name: vald-readreplica-rotate diff --git a/dockers/index/job/readreplica/rotate/Dockerfile b/dockers/index/job/readreplica/rotate/Dockerfile new file mode 100644 index 0000000000..20531bf974 --- /dev/null +++ b/dockers/index/job/readreplica/rotate/Dockerfile @@ -0,0 +1,93 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ARG GO_VERSION=latest +ARG DISTROLESS_IMAGE=gcr.io/distroless/static +ARG DISTROLESS_IMAGE_TAG=nonroot +ARG MAINTAINER="vdaas.org vald team " + +FROM golang:${GO_VERSION} AS golang + +FROM ubuntu:devel AS builder + +ENV GO111MODULE on +ENV DEBIAN_FRONTEND noninteractive +ENV INITRD No +ENV LANG en_US.UTF-8 +ENV GOROOT /opt/go +ENV GOPATH /go +ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin +ENV ORG vdaas +ENV REPO vald +ENV PKG index/job/readreplica/rotate +ENV APP_NAME readreplica-rotate + +# skipcq: DOK-DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + build-essential \ + curl \ + upx \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=golang /usr/local/go $GOROOT +RUN mkdir -p "$GOPATH/src" + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d +COPY Makefile.d . +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} +COPY Makefile . +COPY .git . +COPY go.mod . +COPY go.sum . + +RUN make go/download + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal +COPY internal . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc +COPY apis/grpc . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} +COPY pkg/${PKG} . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} +COPY cmd/${PKG} . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions +COPY versions . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} +RUN make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ + && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} +RUN cp sample.yaml /tmp/config.yaml + +FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} +LABEL maintainer="${MAINTAINER}" + +ENV APP_NAME readreplica-rotate + +COPY --from=builder /usr/bin/${APP_NAME} /go/bin/${APP_NAME} +COPY --from=builder /tmp/config.yaml /etc/server/config.yaml + +USER nonroot:nonroot + +ENTRYPOINT ["/go/bin/readreplica-rotate"]