diff --git a/.github/workflows/_release-pr.yml b/.github/workflows/_release-pr.yml index d5c50bf87e..215a1e43c6 100644 --- a/.github/workflows/_release-pr.yml +++ b/.github/workflows/_release-pr.yml @@ -74,12 +74,14 @@ jobs: sed -i -r "s/^(\s*)tag\s*:\s*v[0-9]+\.[0-9]+\.[0-9]+\s*$/\1tag: ${RELEASE_TAG}/" charts/vald/values.yaml sed -i -e "s/^version: .*$/version: ${RELEASE_TAG}/" charts/vald-helm-operator/Chart.yaml sed -i -r "s/^(\s*)tag\s*:\s*v[0-9]+\.[0-9]+\.[0-9]+\s*$/\1tag: ${RELEASE_TAG}/" charts/vald-helm-operator/values.yaml + sed -i -e "s/^version: .*$/version: ${RELEASE_TAG}/" charts/vald-readreplica/Chart.yaml make helm/schema/all make helm/schema/crd/all make k8s/manifest/update make k8s/manifest/helm-operator/update make k8s/manifest/benchmark-operator/update + make k8s/manifest/readreplica/update make helm/docs/vald make helm/docs/vald-helm-operator make helm/docs/vald-readreplica diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 98702699f3..f8e5a48e83 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -54,6 +54,7 @@ jobs: run: | make helm/package/vald make helm/package/vald-helm-operator + make helm/package/vald-readreplica - name: Push to gh-pages run: | git checkout . diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 300892c466..2be3cddc32 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -45,6 +45,10 @@ helm/package/vald-helm-operator: \ helm/schema/crd/vald-helm-operator helm package charts/vald-helm-operator +.PHONY: helm/package/vald-readreplica +helm/package/vald-readreplica: + helm package charts/vald-readreplica + .PHONY: helm/repo/add ## add Helm chart repository helm/repo/add: diff --git a/Makefile.d/k8s.mk b/Makefile.d/k8s.mk index 4dbeaa150e..ba22bf9b28 100644 --- a/Makefile.d/k8s.mk +++ b/Makefile.d/k8s.mk @@ -89,6 +89,22 @@ k8s/manifest/benchmark-operator/update: \ rm -rf $(TEMP_DIR) cp -r charts/vald-benchmark-operator/crds k8s/tools/benchmark/operator/crds +.PHONY: k8s/manifest/readreplica/clean +## clean k8s manifests for readreplica +k8s/manifest/readreplica/clean: + rm -rf \ + k8s/readreplica + +.PHONY: k8s/manifest/readreplica/update +## update k8s manifests for readreplica using helm templates +k8s/manifest/readreplica/update: \ + k8s/manifest/readreplica/clean + helm template \ + --output-dir $(TEMP_DIR) \ + charts/vald-readreplica + mv $(TEMP_DIR)/vald-readreplica/templates k8s/readreplica + rm -rf $(TEMP_DIR) + .PHONY: k8s/vald/deploy ## deploy vald sample cluster to k8s k8s/vald/deploy: diff --git a/charts/vald-readreplica/Chart.yaml b/charts/vald-readreplica/Chart.yaml index 10e5800346..2b921bf256 100644 --- a/charts/vald-readreplica/Chart.yaml +++ b/charts/vald-readreplica/Chart.yaml @@ -16,7 +16,7 @@ apiVersion: v2 name: vald-readreplica -version: v1.7.10 +version: v1.7.11 description: A helm chart for readreplica add-on type: application keywords: diff --git a/charts/vald-readreplica/README.md b/charts/vald-readreplica/README.md index 4a30602253..c0e3d1f9a3 100644 --- a/charts/vald-readreplica/README.md +++ b/charts/vald-readreplica/README.md @@ -4,7 +4,7 @@ This is a Helm chart to install Vald readreplica components. -Current chart version is `v1.7.10` +Current chart version is `v1.7.11` ## Install diff --git a/k8s/readreplica/configmap.yaml b/k8s/readreplica/configmap.yaml new file mode 100644 index 0000000000..475d27c2ed --- /dev/null +++ b/k8s/readreplica/configmap.yaml @@ -0,0 +1,209 @@ +# +# Copyright (C) 2019-2024 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. +# +apiVersion: v1 +kind: ConfigMap +metadata: + name: vald-agent-ngt-readreplica-config + labels: + app.kubernetes.io/name: vald-readreplica + helm.sh/chart: vald-readreplica-v1.7.11 + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: v1.7.11 + app.kubernetes.io/component: agent +data: + config.yaml: | + --- + version: v0.0.0 + time_zone: UTC + logging: + format: raw + level: debug + logger: glg + server_config: + servers: + - name: grpc + host: 0.0.0.0 + port: 8081 + grpc: + bidirectional_stream_concurrency: 20 + connection_timeout: "" + enable_admin: true + enable_reflection: true + header_table_size: 0 + initial_conn_window_size: 2097152 + initial_window_size: 1048576 + interceptors: + - RecoverInterceptor + keepalive: + max_conn_age: "" + max_conn_age_grace: "" + max_conn_idle: "" + min_time: 10m + permit_without_stream: false + time: 3h + timeout: 60s + max_header_list_size: 0 + max_receive_message_size: 0 + max_send_message_size: 0 + read_buffer_size: 0 + write_buffer_size: 0 + mode: GRPC + network: tcp + probe_wait_time: 3s + restart: true + socket_option: + ip_recover_destination_addr: false + ip_transparent: false + reuse_addr: true + reuse_port: true + tcp_cork: false + tcp_defer_accept: false + tcp_fast_open: false + tcp_no_delay: false + tcp_quick_ack: false + socket_path: "" + health_check_servers: + - name: liveness + host: 0.0.0.0 + port: 3000 + http: + handler_timeout: "" + idle_timeout: "" + read_header_timeout: "" + read_timeout: "" + shutdown_duration: 5s + write_timeout: "" + mode: "" + network: tcp + probe_wait_time: 3s + socket_option: + ip_recover_destination_addr: false + ip_transparent: false + reuse_addr: true + reuse_port: true + tcp_cork: false + tcp_defer_accept: false + tcp_fast_open: true + tcp_no_delay: true + tcp_quick_ack: true + socket_path: "" + - name: readiness + host: 0.0.0.0 + port: 3001 + http: + handler_timeout: "" + idle_timeout: "" + read_header_timeout: "" + read_timeout: "" + shutdown_duration: 0s + write_timeout: "" + mode: "" + network: tcp + probe_wait_time: 3s + socket_option: + ip_recover_destination_addr: false + ip_transparent: false + reuse_addr: true + reuse_port: true + tcp_cork: false + tcp_defer_accept: false + tcp_fast_open: true + tcp_no_delay: true + tcp_quick_ack: true + socket_path: "" + metrics_servers: + startup_strategy: + - liveness + - grpc + - readiness + shutdown_strategy: + - readiness + - grpc + - liveness + full_shutdown_duration: 600s + tls: + ca: /path/to/ca + cert: /path/to/cert + enabled: false + insecure_skip_verify: false + key: /path/to/key + observability: + enabled: false + otlp: + collector_endpoint: "" + trace_batch_timeout: "1s" + trace_export_timeout: "1m" + trace_max_export_batch_size: 1024 + trace_max_queue_size: 256 + metrics_export_interval: "1s" + metrics_export_timeout: "1m" + attribute: + namespace: "_MY_POD_NAMESPACE_" + pod_name: "_MY_POD_NAME_" + node_name: "_MY_NODE_NAME_" + service_name: "vald-agent" + metrics: + enable_cgo: true + enable_goroutine: true + enable_memory: true + enable_version_info: true + version_info_labels: + - vald_version + - server_name + - git_commit + - build_time + - go_version + - go_os + - go_arch + - algorithm_info + trace: + enabled: false + ngt: + auto_create_index_pool_size: 16 + auto_index_check_duration: 30m + auto_index_duration_limit: 24h + auto_index_length: 100 + auto_save_index_duration: 35m + broken_index_history_limit: 0 + bulk_insert_chunk_size: 10 + creation_edge_size: 50 + default_epsilon: 0.05 + default_pool_size: 16 + default_radius: -1 + dimension: 4096 + distance_type: l2 + enable_copy_on_write: false + enable_export_index_info_to_k8s: false + enable_in_memory_mode: true + enable_proactive_gc: false + error_buffer_limit: 10 + export_index_info_duration: 1m + index_path: "" + initial_delay_max_duration: 3m + kvsdb: + concurrency: 6 + load_index_timeout_factor: 1ms + max_load_index_timeout: 10m + min_load_index_timeout: 3m + namespace: _MY_POD_NAMESPACE_ + object_type: float + pod_name: _MY_POD_NAME_ + search_edge_size: 50 + vqueue: + delete_buffer_pool_size: 5000 + insert_buffer_pool_size: 10000 + is_readreplica: true diff --git a/k8s/readreplica/deployment.yaml b/k8s/readreplica/deployment.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/k8s/readreplica/hpa.yaml b/k8s/readreplica/hpa.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/k8s/readreplica/networkpolicy.yaml b/k8s/readreplica/networkpolicy.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/k8s/readreplica/pvc.yaml b/k8s/readreplica/pvc.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/k8s/readreplica/snapshot.yaml b/k8s/readreplica/snapshot.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/k8s/readreplica/svc.yaml b/k8s/readreplica/svc.yaml new file mode 100644 index 0000000000..e69de29bb2