From 0607e0bfeb094756c41d6b6ff2f8e1f23b1bc325 Mon Sep 17 00:00:00 2001 From: vankichi Date: Fri, 19 May 2023 15:02:20 +0900 Subject: [PATCH] :sparkles: refactor helm template Signed-off-by: vankichi --- Makefile.d/helm.mk | 12 +- Makefile.d/k8s.mk | 1 + .../crds/valdbenchmarkjob.yaml | 322 +++++++--------- .../crds/valdbenchmarkjobrelease.yaml | 351 ----------------- .../crds/valdbenchmarkoperatorrelease.yaml | 165 ++++---- .../crds/valdbenchmarkscenario.yaml | 364 ++---------------- .../crds/valdbenchmarkscenariorelease.yaml | 106 ----- .../job-values.schema.json | 25 +- .../scenario-values.schema.json | 2 +- .../schemas/job-values.yaml | 4 +- .../schemas/scenario-values.yaml | 2 +- .../templates/deployment.yaml | 65 ++-- .../templates/service.yaml | 4 +- .../values.schema.json | 287 +++++++------- charts/vald-benchmark-operator/values.yaml | 211 +++++----- .../operator/crds/valdbenchmarkjob.yaml | 322 +++++++--------- .../crds/valdbenchmarkjobrelease.yaml | 351 ----------------- .../crds/valdbenchmarkoperatorrelease.yaml | 165 ++++---- .../operator/crds/valdbenchmarkscenario.yaml | 364 ++---------------- .../crds/valdbenchmarkscenariorelease.yaml | 106 ----- 20 files changed, 800 insertions(+), 2429 deletions(-) delete mode 100644 charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml delete mode 100644 charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml delete mode 100644 k8s/tools/benchmark/operator/crds/valdbenchmarkjobrelease.yaml delete mode 100644 k8s/tools/benchmark/operator/crds/valdbenchmarkscenariorelease.yaml diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 1e1b5533c9e..f7ab78f238e 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -176,23 +176,23 @@ helm/schema/crd/vald-helm-operator: \ ## generate OpenAPI v3 schema for ValdBenchmarkJobRelease helm/schema/crd/vald-benchmark-job: \ yq/install - mv charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml $(TEMP_DIR)/valdbenchmarkjobrelease.yaml + mv charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml $(TEMP_DIR)/valdbenchmarkjob.yaml GOPRIVATE=$(GOPRIVATE) \ go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/vald-benchmark-operator/schemas/job-values.yaml > $(TEMP_DIR)/valdbenchmarkjobrelease-spec.yaml + charts/vald-benchmark-operator/schemas/job-values.yaml > $(TEMP_DIR)/valdbenchmarkjob-spec.yaml $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/valdbenchmarkjobrelease.yaml $(TEMP_DIR)/valdbenchmarkjobrelease-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml + $(TEMP_DIR)/valdbenchmarkjob.yaml $(TEMP_DIR)/valdbenchmarkjob-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml .PHONY: helm/schema/crd/vald-benchmark-scenario ## generate OpenAPI v3 schema for ValdBenchmarkScenarioRelease helm/schema/crd/vald-benchmark-scenario: \ yq/install - mv charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml $(TEMP_DIR)/valdbenchmarkscenariorelease.yaml + mv charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml $(TEMP_DIR)/valdbenchmarkscenario.yaml GOPRIVATE=$(GOPRIVATE) \ go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/vald-benchmark-operator/schemas/scenario-values.yaml > $(TEMP_DIR)/valdbenchmarkscenariorelease-spec.yaml + charts/vald-benchmark-operator/schemas/scenario-values.yaml > $(TEMP_DIR)/valdbenchmarkscenario-spec.yaml $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/valdbenchmarkscenariorelease.yaml $(TEMP_DIR)/valdbenchmarkscenariorelease-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml + $(TEMP_DIR)/valdbenchmarkscenario.yaml $(TEMP_DIR)/valdbenchmarkscenario-spec.yaml > charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml .PHONY: helm/schema/crd/vald-benchmark-operator ## generate OpenAPI v3 schema for ValdBenchmarkOperatorRelease diff --git a/Makefile.d/k8s.mk b/Makefile.d/k8s.mk index d43763ad2bf..581d838541a 100644 --- a/Makefile.d/k8s.mk +++ b/Makefile.d/k8s.mk @@ -170,6 +170,7 @@ k8s/vald-benchmark-operator/deploy: --include-crds \ charts/vald-benchmark-operator kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkjob.yaml + kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml kubectl create -f $(TEMP_DIR)/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml kubectl apply -f $(TEMP_DIR)/vald-benchmark-operator/templates sleep 2 diff --git a/charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml b/charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml index dbaf7547cc1..de857148161 100644 --- a/charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml +++ b/charts/vald-benchmark-operator/crds/valdbenchmarkjob.yaml @@ -47,16 +47,10 @@ spec: type: object properties: apiVersion: - description: - "APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" type: string kind: - description: - "Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" type: string metadata: type: object @@ -69,129 +63,17 @@ spec: - Healthy type: string spec: - description: ValdBenchmarkJobSpec defines the desired state of ValdBenchmarkJob type: object properties: - target: - description: BenchmarkTarget defines the desired state of BenchmarkTarget - properties: - host: - type: string - port: - type: integer - required: - - host - - port - type: object - dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset - properties: - group: - type: string - indexes: - type: integer - name: - type: string - range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange - properties: - end: - type: integer - start: - type: integer - required: - - end - - start - type: object - required: - - group - - indexes - - name - type: object - dimension: - type: integer - job_type: - type: string - repetition: - type: integer - replica: - type: integer - rules: - items: - description: BenchmarkJobRule defines the desired state of BenchmarkJobRule - properties: - name: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - rps: - type: integer - insert_config: - description: InsertConfig defines the desired state of insert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - remove_config: - description: RemoveConfig defines the desired state of remove config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - search_config: - description: SearchConfig defines the desired state of search config - properties: - epsilon: - type: number - min_num: - format: int32 - type: integer - num: - format: int32 - type: integer - radius: - type: number - timeout: - type: string - type: object - update_config: - description: UpdateConfig defines the desired state of update config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - upsert_config: - description: UpsertConfig defines the desired state of upsert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object client_config: - description: ClientConfig represents the configurations for gRPC client. + type: object properties: addrs: + type: array items: type: string - type: array backoff: - description: Backoff represents the configuration for the internal backoff package. + type: object properties: backoff_factor: type: number @@ -207,21 +89,11 @@ spec: type: string retry_count: type: integer - type: object call_option: - description: CallOption represents the configurations for call option. - properties: - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - wait_for_ready: - type: boolean type: object + x-kubernetes-preserve-unknown-fields: true circuit_breaker: - description: CircuitBreaker represents the configuration for the internal circuitbreaker package. + type: object properties: closed_error_rate: type: number @@ -230,27 +102,24 @@ spec: half_open_error_rate: type: number min_samples: - format: int64 type: integer open_timeout: type: string - type: object connection_pool: - description: ConnectionPool represents the configurations for connection pool. + type: object properties: + enable_dns_resolver: + type: boolean enable_rebalance: type: boolean old_conn_close_duration: type: string rebalance_duration: type: string - resolve_dns: - type: boolean size: type: integer - type: object dial_option: - description: DialOption represents the configurations for dial option. + type: object properties: backoff_base_delay: type: string @@ -269,11 +138,13 @@ spec: insecure: type: boolean interceptors: + type: array items: type: string - type: array + enum: + - TraceInterceptor keepalive: - description: GRPCClientKeepalive represents the configurations for gRPC keep-alive. + type: object properties: permit_without_stream: type: boolean @@ -281,28 +152,24 @@ spec: type: string timeout: type: string - type: object max_msg_size: type: integer - minimum_connection_timeout: + min_connection_timeout: type: string net: - description: Net represents the network configuration tcp, udp, unix domain socket. + type: object properties: dialer: - description: Dialer represents the configuration for dial. + type: object properties: dual_stack_enabled: type: boolean - fallback_delay: - type: string keepalive: type: string timeout: type: string - type: object dns: - description: DNS represents the configuration for resolving DNS. + type: object properties: cache_enabled: type: boolean @@ -310,9 +177,8 @@ spec: type: string refresh_duration: type: string - type: object socket_option: - description: SocketOption represents the socket configurations. + type: object properties: ip_recover_destination_addr: type: boolean @@ -332,57 +198,165 @@ spec: type: boolean tcp_quick_ack: type: boolean - type: object tls: - description: TLS represent the TLS configuration for server. + type: object properties: ca: - description: CA represent the CA certificate environment variable key used to start server. type: string cert: - description: Cert represent the certificate environment variable key used to start server. type: string enabled: - description: Enable represent the server enable TLS or not. type: boolean insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification type: boolean key: - description: Key represent the private key environment variable key used to start server. type: string - type: object - type: object read_buffer_size: type: integer timeout: type: string write_buffer_size: type: integer - type: object health_check_duration: type: string + max_recv_msg_size: + type: integer + max_retry_rpc_buffer_size: + type: integer + max_send_msg_size: + type: integer tls: - description: TLS represent the TLS configuration for server. + type: object properties: ca: - description: CA represent the CA certificate environment variable key used to start server. type: string cert: - description: Cert represent the certificate environment variable key used to start server. type: string enabled: - description: Enable represent the server enable TLS or not. type: boolean insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification type: boolean key: - description: Key represent the private key environment variable key used to start server. type: string + wait_for_ready: + type: boolean + dataset: + type: object + properties: + group: + type: string + minLength: 1 + indexes: + type: integer + minimum: 0 + name: + type: string + enum: + - fashion-mnist + range: type: object + properties: + end: + type: integer + minimum: 1 + start: + type: integer + minimum: 1 + required: + - name + - indexes + - group + - range + dimension: + type: integer + minimum: 1 + insert_config: + type: object + properties: + skip_strict_exist_check: + type: boolean + timestamp: + type: string + job_type: + type: string + enum: + - insert + - update + - upsert + - search + - remove + - get_object + - exists + object_config: + type: object + properties: + filter_config: + type: object + properties: + host: + type: string + remove_config: type: object - required: - - job_type - - dimension - - dataset + properties: + skip_strict_exist_check: + type: boolean + timestamp: + type: string + repetition: + type: integer + minimum: 1 + replica: + type: integer + minimum: 1 + rps: + type: integer + maximum: 65535 + minimum: 0 + rules: + type: array + items: + type: string + search_config: + type: object + properties: + epsilon: + type: number + min_num: + type: integer + num: + type: integer + radius: + type: number + timeout: + type: string + target: + type: object + properties: + host: + type: string + minLength: 1 + port: + type: integer + maximum: 65535 + minimum: 0 + required: + - host + - port + update_config: + type: object + properties: + disable_balance_update: + type: boolean + skip_strict_exist_check: + type: boolean + timestamp: + type: string + upsert_config: + type: object + properties: + disable_balance_update: + type: boolean + skip_strict_exist_check: + type: boolean + timestamp: + type: string diff --git a/charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml b/charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml deleted file mode 100644 index 6ef9f11dc52..00000000000 --- a/charts/vald-benchmark-operator/crds/valdbenchmarkjobrelease.yaml +++ /dev/null @@ -1,351 +0,0 @@ -# -# 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. -# -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: valdbenchmarkjobreleases.vald.vdaas.org -spec: - group: vald.vdaas.org - names: - kind: ValdBenchmarkJobRelease - listKind: ValdBenchmarkJobReleaseList - plural: valdbenchmarkjobreleases - singular: valdbenchmarkjobrelease - shortNames: - - vbjr - - vbjrs - versions: - - name: v1 - served: true - storage: true - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .spec.replica - name: REPLICAS - type: integer - - jsonPath: .status - name: STATUS - type: string - schema: - openAPIV3Schema: - description: ValdBenchmarkJob is the Schema for the valdbenchmarkjobs API - type: object - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - metadata: - type: object - status: - description: ValdBenchmarkJobStatus defines the observed state of ValdBenchmarkJob - enum: - - NotReady - - Completed - - Available - - Healthy - type: string - spec: - type: object - properties: - client_config: - type: object - properties: - addrs: - type: array - items: - type: string - backoff: - type: object - properties: - backoff_factor: - type: number - backoff_time_limit: - type: string - enable_error_log: - type: boolean - initial_duration: - type: string - jitter_limit: - type: string - maximum_duration: - type: string - retry_count: - type: integer - call_option: - type: object - x-kubernetes-preserve-unknown-fields: true - circuit_breaker: - type: object - properties: - closed_error_rate: - type: number - closed_refresh_timeout: - type: string - half_open_error_rate: - type: number - min_samples: - type: integer - open_timeout: - type: string - connection_pool: - type: object - properties: - enable_dns_resolver: - type: boolean - enable_rebalance: - type: boolean - old_conn_close_duration: - type: string - rebalance_duration: - type: string - size: - type: integer - dial_option: - type: object - properties: - backoff_base_delay: - type: string - backoff_jitter: - type: number - backoff_max_delay: - type: string - backoff_multiplier: - type: number - enable_backoff: - type: boolean - initial_connection_window_size: - type: integer - initial_window_size: - type: integer - insecure: - type: boolean - interceptors: - type: array - items: - type: string - enum: - - TraceInterceptor - keepalive: - type: object - properties: - permit_without_stream: - type: boolean - time: - type: string - timeout: - type: string - max_msg_size: - type: integer - min_connection_timeout: - type: string - net: - type: object - properties: - dialer: - type: object - properties: - dual_stack_enabled: - type: boolean - keepalive: - type: string - timeout: - type: string - dns: - type: object - properties: - cache_enabled: - type: boolean - cache_expiration: - type: string - refresh_duration: - 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 - tls: - type: object - properties: - ca: - type: string - cert: - type: string - enabled: - type: boolean - insecure_skip_verify: - type: boolean - key: - type: string - read_buffer_size: - type: integer - timeout: - type: string - write_buffer_size: - type: integer - health_check_duration: - type: string - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - tls: - type: object - properties: - ca: - type: string - cert: - type: string - enabled: - type: boolean - insecure_skip_verify: - type: boolean - key: - type: string - wait_for_ready: - type: boolean - dataset: - type: object - properties: - group: - type: string - minLength: 1 - indexes: - type: integer - minimum: 0 - name: - type: string - enum: - - fashion-mnist - range: - type: object - properties: - end: - type: integer - minimum: 1 - start: - type: integer - minimum: 1 - required: - - name - - indexes - - group - - range - dimension: - type: integer - minimum: 1 - insert_config: - type: object - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - job_type: - type: string - enum: - - insert - - update - - upsert - - search - - remove - - get_object - - exists - object_config: - type: object - properties: - filter_config: - type: object - properties: - host: - type: string - remove_config: - type: object - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - repetition: - type: integer - minimum: 1 - replica: - type: integer - minimum: 1 - rps: - type: integer - maximum: 65535 - minimum: 0 - rules: - type: array - search: - type: object - x-kubernetes-preserve-unknown-fields: true - search_config: - type: number - target: - type: object - properties: - host: - type: string - minLength: 1 - port: - type: integer - maximum: 65535 - minimum: 0 - required: - - host - - port - update_config: - type: object - properties: - disable_balance_update: - type: boolean - skip_strict_exist_check: - type: boolean - timestamp: - type: string - upsert_config: - type: object - properties: - disable_balance_update: - type: boolean - skip_strict_exist_check: - type: boolean - timestamp: - type: string diff --git a/charts/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml b/charts/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml index bdcda75b0f3..3451a48b381 100644 --- a/charts/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml +++ b/charts/vald-benchmark-operator/crds/valdbenchmarkoperatorrelease.yaml @@ -81,33 +81,6 @@ spec: type: string tag: type: string - liveness: - type: object - properties: - enabled: - type: boolean - 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 logging: type: object properties: @@ -129,13 +102,6 @@ spec: enum: - glg - zap - metrics: - type: object - properties: - port: - type: integer - maximum: 65535 - minimum: 0 name: type: string nodeSelector: @@ -209,33 +175,6 @@ spec: type: boolean name: type: string - readiness: - type: object - properties: - enabled: - type: boolean - 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 replicas: type: integer resources: @@ -265,6 +204,28 @@ spec: 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 server: @@ -293,6 +254,8 @@ spec: type: string socket_path: type: string + servicePort: + type: integer readiness: type: object properties: @@ -302,6 +265,28 @@ spec: type: string port: type: integer + 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: @@ -328,6 +313,35 @@ spec: type: string socket_path: type: string + servicePort: + type: integer + startup: + type: object + properties: + enabled: + type: boolean + 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: @@ -400,6 +414,8 @@ spec: type: integer interceptors: type: array + items: + type: string keepalive: type: object properties: @@ -483,33 +499,6 @@ spec: type: boolean name: type: string - startup: - type: object - properties: - enabled: - type: boolean - 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 time_zone: type: string tolerations: diff --git a/charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml b/charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml index 32010539ef1..f705e7df6b4 100644 --- a/charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml +++ b/charts/vald-benchmark-operator/crds/valdbenchmarkscenario.yaml @@ -44,16 +44,10 @@ spec: type: object properties: apiVersion: - description: - "APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" type: string kind: - description: - "Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" type: string metadata: type: object @@ -66,364 +60,50 @@ spec: - Healthy type: string spec: - description: ValdBenchmarkScenarioSpec defines the desired state of ValdBenchmarkScenario type: object properties: dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset + type: object properties: group: type: string + minLength: 1 indexes: type: integer + minimum: 0 name: type: string + enum: + - fashion-mnist range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange + type: object properties: end: type: integer + minimum: 1 start: type: integer - required: - - end - - start - type: object + minimum: 1 required: - - group - - indexes - name - type: object + - indexes + - group + - range + jobs: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true target: + type: object properties: host: type: string + minLength: 1 port: type: integer + maximum: 65535 + minimum: 0 required: - host - port - type: object - jobs: - type: array - items: - description: BenchmarkJobSpec defines the desired state of ValdBenchmarkJob - type: object - properties: - target: - description: BenchmarkTarget defines the desired state of BenchmarkTarget - properties: - host: - type: string - port: - type: integer - required: - - host - - port - type: object - dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset - properties: - group: - type: string - indexes: - type: integer - name: - type: string - range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange - properties: - end: - type: integer - start: - type: integer - required: - - end - - start - type: object - required: - - group - - indexes - - name - type: object - dimension: - type: integer - job_type: - type: string - repetition: - type: integer - replica: - type: integer - rules: - items: - description: BenchmarkJobRule defines the desired state of BenchmarkJobRule - properties: - name: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - rps: - type: integer - insert_config: - description: InsertConfig defines the desired state of insert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - remove_config: - description: RemoveConfig defines the desired state of remove config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - search_config: - description: SearchConfig defines the desired state of search config - properties: - epsilon: - type: number - min_num: - format: int32 - type: integer - num: - format: int32 - type: integer - radius: - type: number - timeout: - type: string - type: object - update_config: - description: UpdateConfig defines the desired state of update config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - upsert_config: - description: UpsertConfig defines the desired state of upsert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - client_config: - description: ClientConfig represents the configurations for gRPC client. - properties: - addrs: - items: - type: string - type: array - backoff: - description: Backoff represents the configuration for the internal backoff package. - properties: - backoff_factor: - type: number - backoff_time_limit: - type: string - enable_error_log: - type: boolean - initial_duration: - type: string - jitter_limit: - type: string - maximum_duration: - type: string - retry_count: - type: integer - type: object - call_option: - description: CallOption represents the configurations for call option. - properties: - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - wait_for_ready: - type: boolean - type: object - circuit_breaker: - description: CircuitBreaker represents the configuration for the internal circuitbreaker package. - properties: - closed_error_rate: - type: number - closed_refresh_timeout: - type: string - half_open_error_rate: - type: number - min_samples: - format: int64 - type: integer - open_timeout: - type: string - type: object - connection_pool: - description: ConnectionPool represents the configurations for connection pool. - properties: - enable_rebalance: - type: boolean - old_conn_close_duration: - type: string - rebalance_duration: - type: string - resolve_dns: - type: boolean - size: - type: integer - type: object - dial_option: - description: DialOption represents the configurations for dial option. - properties: - backoff_base_delay: - type: string - backoff_jitter: - type: number - backoff_max_delay: - type: string - backoff_multiplier: - type: number - enable_backoff: - type: boolean - initial_connection_window_size: - type: integer - initial_window_size: - type: integer - insecure: - type: boolean - interceptors: - items: - type: string - type: array - keepalive: - description: GRPCClientKeepalive represents the configurations for gRPC keep-alive. - properties: - permit_without_stream: - type: boolean - time: - type: string - timeout: - type: string - type: object - max_msg_size: - type: integer - minimum_connection_timeout: - type: string - net: - description: Net represents the network configuration tcp, udp, unix domain socket. - properties: - dialer: - description: Dialer represents the configuration for dial. - properties: - dual_stack_enabled: - type: boolean - fallback_delay: - type: string - keepalive: - type: string - timeout: - type: string - type: object - dns: - description: DNS represents the configuration for resolving DNS. - properties: - cache_enabled: - type: boolean - cache_expiration: - type: string - refresh_duration: - type: string - type: object - socket_option: - description: SocketOption represents the socket configurations. - 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 - type: object - tls: - description: TLS represent the TLS configuration for server. - properties: - ca: - description: CA represent the CA certificate environment variable key used to start server. - type: string - cert: - description: Cert represent the certificate environment variable key used to start server. - type: string - enabled: - description: Enable represent the server enable TLS or not. - type: boolean - insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification - type: boolean - key: - description: Key represent the private key environment variable key used to start server. - type: string - type: object - type: object - read_buffer_size: - type: integer - timeout: - type: string - write_buffer_size: - type: integer - type: object - health_check_duration: - type: string - tls: - description: TLS represent the TLS configuration for server. - properties: - ca: - description: CA represent the CA certificate environment variable key used to start server. - type: string - cert: - description: Cert represent the certificate environment variable key used to start server. - type: string - enabled: - description: Enable represent the server enable TLS or not. - type: boolean - insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification - type: boolean - key: - description: Key represent the private key environment variable key used to start server. - type: string - type: object - type: object - required: - - job_type - - dimension - required: - - jobs - - dataset - - target diff --git a/charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml b/charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml deleted file mode 100644 index d4f9ac2b102..00000000000 --- a/charts/vald-benchmark-operator/crds/valdbenchmarkscenariorelease.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# -# 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. -# -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: valdbenchmarkscenarios.vald.vdaas.org -spec: - group: vald.vdaas.org - names: - kind: ValdBenchmarkScenario - listKind: ValdBenchmarkScenarioList - plural: valdbenchmarkscenarios - singular: valdbenchmarkscenario - shortNames: - - vbo - - vbos - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status - name: STATUS - type: string - schema: - openAPIV3Schema: - description: ValdBenchmarkScenario is the Schema for the valdbenchmarkscenarios API - type: object - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - metadata: - type: object - status: - description: ValdBenchmarkScenarioStatus defines the observed state of ValdBenchmarkScenario - enum: - - NotReady - - Completed - - Available - - Healthy - type: string - spec: - type: object - properties: - dataset: - type: object - properties: - group: - type: string - minLength: 1 - indexes: - type: integer - minimum: 0 - name: - type: string - enum: - - fashion-mnist - range: - type: object - properties: - end: - type: integer - minimum: 1 - start: - type: integer - minimum: 1 - required: - - name - - indexes - - group - - range - jobs: - type: array - target: - type: object - properties: - host: - type: string - minLength: 1 - port: - type: integer - maximum: 65535 - minimum: 0 - required: - - host - - port diff --git a/charts/vald-benchmark-operator/job-values.schema.json b/charts/vald-benchmark-operator/job-values.schema.json index 49ccb988435..24f2f5b91ff 100644 --- a/charts/vald-benchmark-operator/job-values.schema.json +++ b/charts/vald-benchmark-operator/job-values.schema.json @@ -395,9 +395,28 @@ "maximum": 65535, "minimum": 0 }, - "rules": { "type": "array", "description": "executing rule" }, - "search": { "type": "object" }, - "search_config": { "type": "number", "description": "epsilon" }, + "rules": { + "type": "array", + "description": "executing rule", + "items": { "type": "string" } + }, + "search_config": { + "type": "object", + "description": "upsert config", + "properties": { + "epsilon": { "type": "number", "description": "epsilon" }, + "min_num": { + "type": "integer", + "description": "minimum number of top-k" + }, + "num": { "type": "integer", "description": "number of top-k" }, + "radius": { "type": "number", "description": "radius" }, + "timeout": { + "type": "string", + "description": "search operation timeout" + } + } + }, "target": { "type": "object", "description": "target cluster location", diff --git a/charts/vald-benchmark-operator/scenario-values.schema.json b/charts/vald-benchmark-operator/scenario-values.schema.json index 919e990986d..e3e549e69d6 100644 --- a/charts/vald-benchmark-operator/scenario-values.schema.json +++ b/charts/vald-benchmark-operator/scenario-values.schema.json @@ -41,7 +41,7 @@ }, "required": ["name", "indexes", "group", "range"] }, - "jobs": { "type": "array" }, + "jobs": { "type": "array", "items": { "type": "object" } }, "target": { "type": "object", "description": "target cluster location", diff --git a/charts/vald-benchmark-operator/schemas/job-values.yaml b/charts/vald-benchmark-operator/schemas/job-values.yaml index 3594e0340bb..47fafd98b0b 100644 --- a/charts/vald-benchmark-operator/schemas/job-values.yaml +++ b/charts/vald-benchmark-operator/schemas/job-values.yaml @@ -90,7 +90,7 @@ upsert_config: # @schema {"name": "upsert_config.disable_balance_update", "type": "boolean"} # upsert_config.disable_balance_update -- disabled balance update flag disable_balance_update: false -# @schema {"name": "search", "type": "object"} +# @schema {"name": "search_config", "type": "object"} # search_config -- upsert config search_config: # @schema {"name": "search_config.epsilon", "type": "number"} @@ -352,7 +352,7 @@ client_config: # @schema {"name": "client_config.tls.insecure_skip_verify", "type": "boolean"} # client_config.tls.insecure_skip_verify -- enable/disable skip SSL certificate verification insecure_skip_verify: false -# @schema {"name": "rules", "type": "array"} +# @schema {"name": "rules", "type": "array", "items": {"type": "string"}} # rules -- executing rule rules: [] # @schema {"name": "rps", "type": "integer", "minimum": 0, "maximum": 65535} diff --git a/charts/vald-benchmark-operator/schemas/scenario-values.yaml b/charts/vald-benchmark-operator/schemas/scenario-values.yaml index cd69e8dbe65..6b710ecdbcb 100644 --- a/charts/vald-benchmark-operator/schemas/scenario-values.yaml +++ b/charts/vald-benchmark-operator/schemas/scenario-values.yaml @@ -48,7 +48,7 @@ dataset: end: 1000 -# @schema {"name": "jobs", "type": "array"} +# @schema {"name": "jobs", "type": "array", "items": {"type": "object"}} jobs: - target: host: "vald-lb-gateway.default.svc.cluster.local" diff --git a/charts/vald-benchmark-operator/templates/deployment.yaml b/charts/vald-benchmark-operator/templates/deployment.yaml index d9216160a1e..bff799a2142 100644 --- a/charts/vald-benchmark-operator/templates/deployment.yaml +++ b/charts/vald-benchmark-operator/templates/deployment.yaml @@ -52,52 +52,55 @@ spec: - name: {{ .Values.name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.liveness.enabled }} + {{- $liveness := .Values.server_config.healths.liveness }} + {{- if $liveness.enabled }} livenessProbe: - failureThreshold: {{ .Values.liveness.livenessProbe.failureThreshold }} + failureThreshold: {{ $liveness.livenessProbe.failureThreshold }} httpGet: - path: {{ .Values.liveness.livenessProbe.httpGet.path }} - port: {{ .Values.liveness.livenessProbe.httpGet.port }} - scheme: {{ .Values.liveness.livenessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.liveness.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.liveness.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.liveness.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.liveness.livenessProbe.timeoutSeconds }} + path: {{ $liveness.livenessProbe.httpGet.path }} + port: {{ $liveness.livenessProbe.httpGet.port }} + scheme: {{ $liveness.livenessProbe.httpGet.scheme }} + initialDelaySeconds: {{ $liveness.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ $liveness.livenessProbe.periodSeconds }} + successThreshold: {{ $liveness.livenessProbe.successThreshold }} + timeoutSeconds: {{ $liveness.livenessProbe.timeoutSeconds }} {{- end}} - {{- if .Values.readiness.enabled }} + {{- $readiness := .Values.server_config.healths.readiness }} + {{- if $readiness.enabled }} readinessProbe: - failureThreshold: {{ .Values.readiness.readinessProbe.failureThreshold }} + failureThreshold: {{ $readiness.readinessProbe.failureThreshold }} httpGet: - path: {{ .Values.readiness.readinessProbe.httpGet.path }} - port: {{ .Values.readiness.readinessProbe.httpGet.port }} - scheme: {{ .Values.readiness.readinessProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.readiness.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readiness.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.readiness.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.readiness.readinessProbe.timeoutSeconds }} + path: {{ $readiness.readinessProbe.httpGet.path }} + port: {{ $readiness.readinessProbe.httpGet.port }} + scheme: {{ $readiness.readinessProbe.httpGet.scheme }} + initialDelaySeconds: {{ $readiness.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ $readiness.readinessProbe.periodSeconds }} + successThreshold: {{ $readiness.readinessProbe.successThreshold }} + timeoutSeconds: {{ $readiness.readinessProbe.timeoutSeconds }} {{- end}} - {{- if .Values.startup.enabled }} + {{- $startup := .Values.server_config.healths.startup }} + {{- if $startup.enabled }} startupProbe: - failureThreshold: {{ .Values.startup.startupProbe.failureThreshold }} + failureThreshold: {{ $startup.startupProbe.failureThreshold }} httpGet: - path: {{ .Values.startup.startupProbe.httpGet.path }} - port: {{ .Values.startup.startupProbe.httpGet.port }} - scheme: {{ .Values.startup.startupProbe.httpGet.scheme }} - initialDelaySeconds: {{ .Values.startup.startupProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.startup.startupProbe.periodSeconds }} - successThreshold: {{ .Values.startup.startupProbe.successThreshold }} - timeoutSeconds: {{ .Values.startup.startupProbe.timeoutSeconds }} + path: {{ $startup.startupProbe.httpGet.path }} + port: {{ $startup.startupProbe.httpGet.port }} + scheme: {{ $startup.startupProbe.httpGet.scheme }} + initialDelaySeconds: {{ $startup.startupProbe.initialDelaySeconds }} + periodSeconds: {{ $startup.startupProbe.periodSeconds }} + successThreshold: {{ $startup.startupProbe.successThreshold }} + timeoutSeconds: {{ $startup.startupProbe.timeoutSeconds }} {{- end}} ports: - {{- if .Values.liveness.enabled }} + {{- if $liveness.enabled }} - name: liveness protocol: TCP - containerPort: {{ .Values.liveness.port }} + containerPort: {{ $liveness.port }} {{- end}} - {{- if .Values.readiness.enabled }} + {{- if $readiness.enabled }} - name: readiness protocol: TCP - containerPort: {{ .Values.readiness.port }} + containerPort: {{ $readiness.port }} {{- end}} - name: grpc protocol: TCP diff --git a/charts/vald-benchmark-operator/templates/service.yaml b/charts/vald-benchmark-operator/templates/service.yaml index 969d09a650d..0be6a1a8822 100644 --- a/charts/vald-benchmark-operator/templates/service.yaml +++ b/charts/vald-benchmark-operator/templates/service.yaml @@ -35,8 +35,8 @@ metadata: spec: ports: - name: prometheus - port: {{ .Values.metrics.port }} - targetPort: {{ .Values.metrics.port }} + port: {{ .Values.server_config.metrics.pprof.port }} + targetPort: {{ .Values.server_config.metrics.pprof.port }} protocol: TCP selector: app.kubernetes.io/name: {{ include "vald.name" . }} diff --git a/charts/vald-benchmark-operator/values.schema.json b/charts/vald-benchmark-operator/values.schema.json index 34b5c35c1a5..6ed6f1764f4 100644 --- a/charts/vald-benchmark-operator/values.schema.json +++ b/charts/vald-benchmark-operator/values.schema.json @@ -20,51 +20,6 @@ "tag": { "type": "string", "description": "image tag" } } }, - "liveness": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "enable liveness probe." - } - } - }, - "livenessProbe": { - "type": "object", - "properties": { - "failureThreshold": { - "type": "integer", - "description": "liveness 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": "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" - } - } - }, "logging": { "type": "object", "properties": { @@ -85,17 +40,6 @@ } } }, - "metrics": { - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "pprof server port", - "maximum": 65535, - "minimum": 0 - } - } - }, "name": { "type": "string", "description": "name of the deployment" }, "nodeSelector": { "type": "object", @@ -166,51 +110,6 @@ } } }, - "readiness": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "enable liveness probe." - } - } - }, - "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" - } - } - }, "replicas": { "type": "integer", "description": "the number of replica for deployment" @@ -239,6 +138,48 @@ "properties": { "enabled": { "type": "boolean" }, "host": { "type": "string" }, + "livenessProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer", + "description": "liveness 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": "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" }, "server": { "type": "object", @@ -259,7 +200,8 @@ "probe_wait_time": { "type": "string" }, "socket_path": { "type": "string" } } - } + }, + "servicePort": { "type": "integer" } } }, "readiness": { @@ -268,6 +210,48 @@ "enabled": { "type": "boolean" }, "host": { "type": "string" }, "port": { "type": "integer" }, + "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": { @@ -287,6 +271,58 @@ "probe_wait_time": { "type": "string" }, "socket_path": { "type": "string" } } + }, + "servicePort": { "type": "integer" } + } + }, + "startup": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "enable startup probe." + } + } + }, + "startupProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer", + "description": "startupProbe 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" } } } @@ -349,7 +385,10 @@ "header_table_size": { "type": "integer" }, "initial_conn_window_size": { "type": "integer" }, "initial_window_size": { "type": "integer" }, - "interceptors": { "type": "array" }, + "interceptors": { + "type": "array", + "items": { "type": "string" } + }, "keepalive": { "type": "object", "properties": { @@ -451,48 +490,6 @@ "name": { "type": "string", "description": "name of service account" } } }, - "startup": { - "type": "object", - "properties": { - "enabled": { "type": "boolean", "description": "enable startup probe." } - } - }, - "startupProbe": { - "type": "object", - "properties": { - "failureThreshold": { - "type": "integer", - "description": "startupProbe 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" - } - } - }, "time_zone": { "type": "string", "description": "time_zone" }, "tolerations": { "type": "array", diff --git a/charts/vald-benchmark-operator/values.yaml b/charts/vald-benchmark-operator/values.yaml index 6b9cf41d0bf..31023802d75 100644 --- a/charts/vald-benchmark-operator/values.yaml +++ b/charts/vald-benchmark-operator/values.yaml @@ -147,120 +147,6 @@ logging: # logging format must be `raw` or `json` format: raw -# @schema {"name": "liveness", "type": "object"} -liveness: - # @schema {"name": "liveness.enabled", "type": "boolean"} - # liveness.enabled -- enable liveness probe. - enabled: true - host: 0.0.0.0 - port: 3000 - servicePort: 3000 - # @schema {"name": "livenessProbe", "type": "object"} - livenessProbe: - # @schema {"name": "livenessProbe.httpGet", "type": "object"} - httpGet: - # @schema {"name": "livenessProbe.httpGet.path", "type": "string"} - # livenessProbe.httpGet.path -- readiness probe path - path: /liveness - # @schema {"name": "livenessProbe.httpGet.port", "type": "string"} - # livenessProbe.httpGet.port -- readiness probe port - port: liveness - # @schema {"name": "livenessProbe.httpGet.scheme", "type": "string"} - # livenessProbe.httpGet.scheme -- readiness probe scheme - scheme: HTTP - # @schema {"name": "livenessProbe.initialDelaySeconds", "type": "integer"} - # livenessProbe.initialDelaySeconds -- liveness probe initial delay seconds - initialDelaySeconds: 15 - # @schema {"name": "livenessProbe.periodSeconds", "type": "integer"} - # livenessProbe.periodSeconds -- liveness probe period seconds - periodSeconds: 20 - # @schema {"name": "livenessProbe.successThreshold", "type": "integer"} - # livenessProbe.successThreshold -- liveness probe success threshold - successThreshold: 1 - # @schema {"name": "livenessProbe.failureThreshold", "type": "integer"} - # livenessProbe.failureThreshold -- liveness probe failure threshold - failureThreshold: 2 - # @schema {"name": "livenessProbe.timeoutSeconds", "type": "integer"} - # livenessProbe.timeoutSeconds -- liveness probe timeout seconds - timeoutSeconds: 5 - -# @schema {"name": "readiness", "type": "object"} -readiness: - # @schema {"name": "readiness.enabled", "type": "boolean"} - # readiness.enabled -- enable liveness probe. - enabled: true - host: 0.0.0.0 - port: 3001 - servicePort: 3001 - # @schema {"name": "readinessProbe", "type": "object"} - readinessProbe: - # @schema {"name": "readinessProbe.httpGet", "type": "object"} - httpGet: - # @schema {"name": "readinessProbe.httpGet.path", "type": "string"} - # readinessProbe.httpGet.path -- readiness probe path - path: /readiness - # @schema {"name": "readinessProbe.httpGet.port", "type": "string"} - # readinessProbe.httpGet.port -- readiness probe port - port: readiness - # @schema {"name": "readinessProbe.httpGet.scheme", "type": "string"} - # readinessProbe.httpGet.scheme -- readiness probe scheme - scheme: HTTP - # @schema {"name": "readinessProbe.initialDelaySeconds", "type": "integer"} - # readinessProbe.initialDelaySeconds -- readiness probe initial delay seconds - initialDelaySeconds: 10 - # @schema {"name": "readinessProbe.periodSeconds", "type": "integer"} - # readinessProbe.periodSeconds -- readiness probe period seconds - periodSeconds: 3 - # @schema {"name": "readinessProbe.successThreshold", "type": "integer"} - # readinessProbe.successThreshold -- readiness probe success threshold - successThreshold: 1 - # @schema {"name": "readinessProbe.failureThreshold", "type": "integer"} - # readinessProbe.failureThreshold --readiness probe failure threshold - failureThreshold: 2 - # @schema {"name": "readinessProbe.timeoutSeconds", "type": "integer"} - # readinessProbe.timeoutSeconds -- readiness probe timeout seconds - timeoutSeconds: 2 - -# @schema {"name": "startup", "type": "object"} -startup: - # @schema {"name": "startup.enabled", "type": "boolean"} - # startup.enabled -- enable startup probe. - enabled: true - # @schema {"name": "startupProbe", "type": "object"} - startupProbe: - # @schema {"name": "startupProbe.httpGet", "type": "object"} - httpGet: - # @schema {"name": "startupProbe.httpGet.path", "type": "string"} - # startupProbe.httpGet.path -- startup probe path - path: /liveness - # @schema {"name": "startupProbe.httpGet.port", "type": "string"} - # startupProbe.httpGet.port -- startup probe port - port: liveness - # @schema {"name": "startupProbe.httpGet.scheme", "type": "string"} - # startupProbe.httpGet.scheme -- startup probe scheme - scheme: HTTP - # @schema {"name": "startupProbe.initialDelaySeconds", "type": "integer"} - # startupProbe.initialDelaySeconds -- startup probe initial delay seconds - initialDelaySeconds: 5 - # @schema {"name": "startupProbe.periodSeconds", "type": "integer"} - # startupProbe.periodSeconds -- startup probe period seconds - periodSeconds: 5 - # @schema {"name": "startupProbe.successThreshold", "type": "integer"} - # startupProbe.successThreshold -- startup probe success threshold - successThreshold: 1 - # @schema {"name": "startupProbe.failureThreshold", "type": "integer"} - # startupProbe.failureThreshold -- startupProbe probe failure threshold - failureThreshold: 30 - # @schema {"name": "startupProbe.timeoutSeconds", "type": "integer"} - # startupProbe.timeoutSeconds -- startup probe timeout seconds - timeoutSeconds: 2 - -# @schema {"name": "metrics", "type": "object"} -metrics: - # @schema {"name": "metrics.port", "type": "integer", "minimum": 0, "maximum": 65535} - # metrics.port -- pprof server port - port: 6060 - # @schema {"name": "server_config", "type": "object"} server_config: # @schema {"name": "server_config.servers", "type": "object"} @@ -303,7 +189,7 @@ server_config: initial_conn_window_size: 0 # @schema {"name": "server_config.servers.grpc.server.grpc.initial_window_size", "type": "integer"} initial_window_size: 0 - # @schema {"name": "server_config.servers.grpc.server.grpc.interceptors", "type": "array"} + # @schema {"name": "server_config.servers.grpc.server.grpc.interceptors", "type": "array", "items": {"type": "string"}} interceptors: [] # @schema {"name": "server_config.servers.grpc.server.grpc.keepalive", "type": "object"} keepalive: @@ -353,6 +239,36 @@ server_config: host: 0.0.0.0 # @schema {"name": "server_config.healths.liveness.port", "type": "integer"} port: 3000 + # @schema {"name": "server_config.healths.liveness.servicePort", "type": "integer"} + servicePort: 3000 + # @schema {"name": "server_config.healths.liveness.livenessProbe", "type": "object"} + livenessProbe: + # @schema {"name": "server_config.healths.liveness.livenessProbe.httpGet", "type": "object"} + httpGet: + # @schema {"name": "server_config.healths.liveness.livenessProbe.httpGet.path", "type": "string"} + # server_config.healths.liveness.livenessProbe.httpGet.path -- readiness probe path + path: /liveness + # @schema {"name": "server_config.healths.liveness.livenessProbe.httpGet.port", "type": "string"} + # server_config.healths.liveness.livenessProbe.httpGet.port -- readiness probe port + port: liveness + # @schema {"name": "server_config.healths.liveness.livenessProbe.httpGet.scheme", "type": "string"} + # server_config.healths.liveness.livenessProbe.httpGet.scheme -- readiness probe scheme + scheme: HTTP + # @schema {"name": "server_config.healths.liveness.livenessProbe.initialDelaySeconds", "type": "integer"} + # server_config.healths.liveness.livenessProbe.initialDelaySeconds -- liveness probe initial delay seconds + initialDelaySeconds: 15 + # @schema {"name": "server_config.healths.liveness.livenessProbe.periodSeconds", "type": "integer"} + # server_config.healths.liveness.livenessProbe.periodSeconds -- liveness probe period seconds + periodSeconds: 20 + # @schema {"name": "server_config.healths.liveness.livenessProbe.successThreshold", "type": "integer"} + # server_config.healths.liveness.livenessProbe.successThreshold -- liveness probe success threshold + successThreshold: 1 + # @schema {"name": "server_config.healths.liveness.livenessProbe.failureThreshold", "type": "integer"} + # server_config.healths.liveness.livenessProbe.failureThreshold -- liveness probe failure threshold + failureThreshold: 2 + # @schema {"name": "server_config.healths.liveness.livenessProbe.timeoutSeconds", "type": "integer"} + # server_config.healths.liveness.livenessProbe.timeoutSeconds -- liveness probe timeout seconds + timeoutSeconds: 5 # @schema {"name": "server_config.healths.liveness.server", "type": "object"} server: # @schema {"name": "server_config.healths.liveness.server.mode", "type": "string"} @@ -385,6 +301,36 @@ server_config: host: 0.0.0.0 # @schema {"name": "server_config.healths.readiness.port", "type": "integer"} port: 3001 + # @schema {"name": "server_config.healths.readiness.servicePort", "type": "integer"} + servicePort: 3001 + # @schema {"name": "server_config.healths.readiness.readinessProbe", "type": "object"} + readinessProbe: + # @schema {"name": "server_config.healths.readiness.readinessProbe.httpGet", "type": "object"} + httpGet: + # @schema {"name": "server_config.healths.readiness.readinessProbe.httpGet.path", "type": "string"} + # server_config.healths.readiness.readinessProbe.httpGet.path -- readiness probe path + path: /readiness + # @schema {"name": "server_config.healths.readiness.readinessProbe.httpGet.port", "type": "string"} + # server_config.healths.readiness.readinessProbe.httpGet.port -- readiness probe port + port: readiness + # @schema {"name": "server_config.healths.readiness.readinessProbe.httpGet.scheme", "type": "string"} + # server_config.healths.readiness.readinessProbe.httpGet.scheme -- readiness probe scheme + scheme: HTTP + # @schema {"name": "server_config.healths.readiness.readinessProbe.initialDelaySeconds", "type": "integer"} + # server_config.healths.readiness.readinessProbe.initialDelaySeconds -- readiness probe initial delay seconds + initialDelaySeconds: 10 + # @schema {"name": "server_config.healths.readiness.readinessProbe.periodSeconds", "type": "integer"} + # server_config.healths.readiness.readinessProbe.periodSeconds -- readiness probe period seconds + periodSeconds: 3 + # @schema {"name": "server_config.healths.readiness.readinessProbe.successThreshold", "type": "integer"} + # server_config.healths.readiness.readinessProbe.successThreshold -- readiness probe success threshold + successThreshold: 1 + # @schema {"name": "server_config.healths.readiness.readinessProbe.failureThreshold", "type": "integer"} + # server_config.healths.readiness.readinessProbe.failureThreshold --readiness probe failure threshold + failureThreshold: 2 + # @schema {"name": "server_config.healths.readiness.readinessProbe.timeoutSeconds", "type": "integer"} + # server_config.healths.readiness.readinessProbe.timeoutSeconds -- readiness probe timeout seconds + timeoutSeconds: 2 # @schema {"name": "server_config.healths.readiness.server", "type": "object"} server: # @schema {"name": "server_config.healths.readiness.server.mode", "type": "string"} @@ -409,6 +355,39 @@ server_config: shutdown_duration: 0s # @schema {"name": "server_config.healths.readiness.server.http.write_timeout", "type": "string"} write_timeout: "" + # @schema {"name": "server_config.healths.startup", "type": "object"} + startup: + # @schema {"name": "server_config.healths.startup.enabled", "type": "boolean"} + # server_config.healths.startup.enabled -- enable startup probe. + enabled: true + # @schema {"name": "server_config.healths.startupProbe", "type": "object"} + startupProbe: + # @schema {"name": "server_config.healths.startupProbe.httpGet", "type": "object"} + httpGet: + # @schema {"name": "server_config.healths.startupProbe.httpGet.path", "type": "string"} + # server_config.healths.startupProbe.httpGet.path -- startup probe path + path: /liveness + # @schema {"name": "server_config.healths.startupProbe.httpGet.port", "type": "string"} + # server_config.healths.startupProbe.httpGet.port -- startup probe port + port: liveness + # @schema {"name": "server_config.healths.startupProbe.httpGet.scheme", "type": "string"} + # server_config.healths.startupProbe.httpGet.scheme -- startup probe scheme + scheme: HTTP + # @schema {"name": "server_config.healths.startupProbe.initialDelaySeconds", "type": "integer"} + # server_config.healths.startupProbe.initialDelaySeconds -- startup probe initial delay seconds + initialDelaySeconds: 5 + # @schema {"name": "server_config.healths.startupProbe.periodSeconds", "type": "integer"} + # server_config.healths.startupProbe.periodSeconds -- startup probe period seconds + periodSeconds: 5 + # @schema {"name": "server_config.healths.startupProbe.successThreshold", "type": "integer"} + # server_config.healths.startupProbe.successThreshold -- startup probe success threshold + successThreshold: 1 + # @schema {"name": "server_config.healths.startupProbe.failureThreshold", "type": "integer"} + # server_config.healths.startupProbe.failureThreshold -- startupProbe probe failure threshold + failureThreshold: 30 + # @schema {"name": "server_config.healths.startupProbe.timeoutSeconds", "type": "integer"} + # server_config.healths.startupProbe.timeoutSeconds -- startup probe timeout seconds + timeoutSeconds: 2 # @schema {"name": "server_config.metrics", "type": "object"} metrics: # @schema {"name": "server_config.metrics.pprof", "type": "object"} @@ -418,7 +397,7 @@ server_config: # @schema {"name": "server_config.metrics.pprof.host", "type": "string"} host: 0.0.0.0 # @schema {"name": "server_config.metrics.pprof.port", "type": "integer"} - port: 6000 + port: 6060 # @schema {"name": "server_config.metrics.pprof.server", "type": "object"} server: # @schema {"name": "server_config.metrics.pprof.server.mode", "type": "string"} diff --git a/k8s/tools/benchmark/operator/crds/valdbenchmarkjob.yaml b/k8s/tools/benchmark/operator/crds/valdbenchmarkjob.yaml index dbaf7547cc1..de857148161 100644 --- a/k8s/tools/benchmark/operator/crds/valdbenchmarkjob.yaml +++ b/k8s/tools/benchmark/operator/crds/valdbenchmarkjob.yaml @@ -47,16 +47,10 @@ spec: type: object properties: apiVersion: - description: - "APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" type: string kind: - description: - "Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" type: string metadata: type: object @@ -69,129 +63,17 @@ spec: - Healthy type: string spec: - description: ValdBenchmarkJobSpec defines the desired state of ValdBenchmarkJob type: object properties: - target: - description: BenchmarkTarget defines the desired state of BenchmarkTarget - properties: - host: - type: string - port: - type: integer - required: - - host - - port - type: object - dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset - properties: - group: - type: string - indexes: - type: integer - name: - type: string - range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange - properties: - end: - type: integer - start: - type: integer - required: - - end - - start - type: object - required: - - group - - indexes - - name - type: object - dimension: - type: integer - job_type: - type: string - repetition: - type: integer - replica: - type: integer - rules: - items: - description: BenchmarkJobRule defines the desired state of BenchmarkJobRule - properties: - name: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - rps: - type: integer - insert_config: - description: InsertConfig defines the desired state of insert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - remove_config: - description: RemoveConfig defines the desired state of remove config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - search_config: - description: SearchConfig defines the desired state of search config - properties: - epsilon: - type: number - min_num: - format: int32 - type: integer - num: - format: int32 - type: integer - radius: - type: number - timeout: - type: string - type: object - update_config: - description: UpdateConfig defines the desired state of update config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - upsert_config: - description: UpsertConfig defines the desired state of upsert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object client_config: - description: ClientConfig represents the configurations for gRPC client. + type: object properties: addrs: + type: array items: type: string - type: array backoff: - description: Backoff represents the configuration for the internal backoff package. + type: object properties: backoff_factor: type: number @@ -207,21 +89,11 @@ spec: type: string retry_count: type: integer - type: object call_option: - description: CallOption represents the configurations for call option. - properties: - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - wait_for_ready: - type: boolean type: object + x-kubernetes-preserve-unknown-fields: true circuit_breaker: - description: CircuitBreaker represents the configuration for the internal circuitbreaker package. + type: object properties: closed_error_rate: type: number @@ -230,27 +102,24 @@ spec: half_open_error_rate: type: number min_samples: - format: int64 type: integer open_timeout: type: string - type: object connection_pool: - description: ConnectionPool represents the configurations for connection pool. + type: object properties: + enable_dns_resolver: + type: boolean enable_rebalance: type: boolean old_conn_close_duration: type: string rebalance_duration: type: string - resolve_dns: - type: boolean size: type: integer - type: object dial_option: - description: DialOption represents the configurations for dial option. + type: object properties: backoff_base_delay: type: string @@ -269,11 +138,13 @@ spec: insecure: type: boolean interceptors: + type: array items: type: string - type: array + enum: + - TraceInterceptor keepalive: - description: GRPCClientKeepalive represents the configurations for gRPC keep-alive. + type: object properties: permit_without_stream: type: boolean @@ -281,28 +152,24 @@ spec: type: string timeout: type: string - type: object max_msg_size: type: integer - minimum_connection_timeout: + min_connection_timeout: type: string net: - description: Net represents the network configuration tcp, udp, unix domain socket. + type: object properties: dialer: - description: Dialer represents the configuration for dial. + type: object properties: dual_stack_enabled: type: boolean - fallback_delay: - type: string keepalive: type: string timeout: type: string - type: object dns: - description: DNS represents the configuration for resolving DNS. + type: object properties: cache_enabled: type: boolean @@ -310,9 +177,8 @@ spec: type: string refresh_duration: type: string - type: object socket_option: - description: SocketOption represents the socket configurations. + type: object properties: ip_recover_destination_addr: type: boolean @@ -332,57 +198,165 @@ spec: type: boolean tcp_quick_ack: type: boolean - type: object tls: - description: TLS represent the TLS configuration for server. + type: object properties: ca: - description: CA represent the CA certificate environment variable key used to start server. type: string cert: - description: Cert represent the certificate environment variable key used to start server. type: string enabled: - description: Enable represent the server enable TLS or not. type: boolean insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification type: boolean key: - description: Key represent the private key environment variable key used to start server. type: string - type: object - type: object read_buffer_size: type: integer timeout: type: string write_buffer_size: type: integer - type: object health_check_duration: type: string + max_recv_msg_size: + type: integer + max_retry_rpc_buffer_size: + type: integer + max_send_msg_size: + type: integer tls: - description: TLS represent the TLS configuration for server. + type: object properties: ca: - description: CA represent the CA certificate environment variable key used to start server. type: string cert: - description: Cert represent the certificate environment variable key used to start server. type: string enabled: - description: Enable represent the server enable TLS or not. type: boolean insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification type: boolean key: - description: Key represent the private key environment variable key used to start server. type: string + wait_for_ready: + type: boolean + dataset: + type: object + properties: + group: + type: string + minLength: 1 + indexes: + type: integer + minimum: 0 + name: + type: string + enum: + - fashion-mnist + range: type: object + properties: + end: + type: integer + minimum: 1 + start: + type: integer + minimum: 1 + required: + - name + - indexes + - group + - range + dimension: + type: integer + minimum: 1 + insert_config: + type: object + properties: + skip_strict_exist_check: + type: boolean + timestamp: + type: string + job_type: + type: string + enum: + - insert + - update + - upsert + - search + - remove + - get_object + - exists + object_config: + type: object + properties: + filter_config: + type: object + properties: + host: + type: string + remove_config: type: object - required: - - job_type - - dimension - - dataset + properties: + skip_strict_exist_check: + type: boolean + timestamp: + type: string + repetition: + type: integer + minimum: 1 + replica: + type: integer + minimum: 1 + rps: + type: integer + maximum: 65535 + minimum: 0 + rules: + type: array + items: + type: string + search_config: + type: object + properties: + epsilon: + type: number + min_num: + type: integer + num: + type: integer + radius: + type: number + timeout: + type: string + target: + type: object + properties: + host: + type: string + minLength: 1 + port: + type: integer + maximum: 65535 + minimum: 0 + required: + - host + - port + update_config: + type: object + properties: + disable_balance_update: + type: boolean + skip_strict_exist_check: + type: boolean + timestamp: + type: string + upsert_config: + type: object + properties: + disable_balance_update: + type: boolean + skip_strict_exist_check: + type: boolean + timestamp: + type: string diff --git a/k8s/tools/benchmark/operator/crds/valdbenchmarkjobrelease.yaml b/k8s/tools/benchmark/operator/crds/valdbenchmarkjobrelease.yaml deleted file mode 100644 index 6ef9f11dc52..00000000000 --- a/k8s/tools/benchmark/operator/crds/valdbenchmarkjobrelease.yaml +++ /dev/null @@ -1,351 +0,0 @@ -# -# 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. -# -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: valdbenchmarkjobreleases.vald.vdaas.org -spec: - group: vald.vdaas.org - names: - kind: ValdBenchmarkJobRelease - listKind: ValdBenchmarkJobReleaseList - plural: valdbenchmarkjobreleases - singular: valdbenchmarkjobrelease - shortNames: - - vbjr - - vbjrs - versions: - - name: v1 - served: true - storage: true - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .spec.replica - name: REPLICAS - type: integer - - jsonPath: .status - name: STATUS - type: string - schema: - openAPIV3Schema: - description: ValdBenchmarkJob is the Schema for the valdbenchmarkjobs API - type: object - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - metadata: - type: object - status: - description: ValdBenchmarkJobStatus defines the observed state of ValdBenchmarkJob - enum: - - NotReady - - Completed - - Available - - Healthy - type: string - spec: - type: object - properties: - client_config: - type: object - properties: - addrs: - type: array - items: - type: string - backoff: - type: object - properties: - backoff_factor: - type: number - backoff_time_limit: - type: string - enable_error_log: - type: boolean - initial_duration: - type: string - jitter_limit: - type: string - maximum_duration: - type: string - retry_count: - type: integer - call_option: - type: object - x-kubernetes-preserve-unknown-fields: true - circuit_breaker: - type: object - properties: - closed_error_rate: - type: number - closed_refresh_timeout: - type: string - half_open_error_rate: - type: number - min_samples: - type: integer - open_timeout: - type: string - connection_pool: - type: object - properties: - enable_dns_resolver: - type: boolean - enable_rebalance: - type: boolean - old_conn_close_duration: - type: string - rebalance_duration: - type: string - size: - type: integer - dial_option: - type: object - properties: - backoff_base_delay: - type: string - backoff_jitter: - type: number - backoff_max_delay: - type: string - backoff_multiplier: - type: number - enable_backoff: - type: boolean - initial_connection_window_size: - type: integer - initial_window_size: - type: integer - insecure: - type: boolean - interceptors: - type: array - items: - type: string - enum: - - TraceInterceptor - keepalive: - type: object - properties: - permit_without_stream: - type: boolean - time: - type: string - timeout: - type: string - max_msg_size: - type: integer - min_connection_timeout: - type: string - net: - type: object - properties: - dialer: - type: object - properties: - dual_stack_enabled: - type: boolean - keepalive: - type: string - timeout: - type: string - dns: - type: object - properties: - cache_enabled: - type: boolean - cache_expiration: - type: string - refresh_duration: - 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 - tls: - type: object - properties: - ca: - type: string - cert: - type: string - enabled: - type: boolean - insecure_skip_verify: - type: boolean - key: - type: string - read_buffer_size: - type: integer - timeout: - type: string - write_buffer_size: - type: integer - health_check_duration: - type: string - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - tls: - type: object - properties: - ca: - type: string - cert: - type: string - enabled: - type: boolean - insecure_skip_verify: - type: boolean - key: - type: string - wait_for_ready: - type: boolean - dataset: - type: object - properties: - group: - type: string - minLength: 1 - indexes: - type: integer - minimum: 0 - name: - type: string - enum: - - fashion-mnist - range: - type: object - properties: - end: - type: integer - minimum: 1 - start: - type: integer - minimum: 1 - required: - - name - - indexes - - group - - range - dimension: - type: integer - minimum: 1 - insert_config: - type: object - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - job_type: - type: string - enum: - - insert - - update - - upsert - - search - - remove - - get_object - - exists - object_config: - type: object - properties: - filter_config: - type: object - properties: - host: - type: string - remove_config: - type: object - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - repetition: - type: integer - minimum: 1 - replica: - type: integer - minimum: 1 - rps: - type: integer - maximum: 65535 - minimum: 0 - rules: - type: array - search: - type: object - x-kubernetes-preserve-unknown-fields: true - search_config: - type: number - target: - type: object - properties: - host: - type: string - minLength: 1 - port: - type: integer - maximum: 65535 - minimum: 0 - required: - - host - - port - update_config: - type: object - properties: - disable_balance_update: - type: boolean - skip_strict_exist_check: - type: boolean - timestamp: - type: string - upsert_config: - type: object - properties: - disable_balance_update: - type: boolean - skip_strict_exist_check: - type: boolean - timestamp: - type: string diff --git a/k8s/tools/benchmark/operator/crds/valdbenchmarkoperatorrelease.yaml b/k8s/tools/benchmark/operator/crds/valdbenchmarkoperatorrelease.yaml index bdcda75b0f3..3451a48b381 100644 --- a/k8s/tools/benchmark/operator/crds/valdbenchmarkoperatorrelease.yaml +++ b/k8s/tools/benchmark/operator/crds/valdbenchmarkoperatorrelease.yaml @@ -81,33 +81,6 @@ spec: type: string tag: type: string - liveness: - type: object - properties: - enabled: - type: boolean - 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 logging: type: object properties: @@ -129,13 +102,6 @@ spec: enum: - glg - zap - metrics: - type: object - properties: - port: - type: integer - maximum: 65535 - minimum: 0 name: type: string nodeSelector: @@ -209,33 +175,6 @@ spec: type: boolean name: type: string - readiness: - type: object - properties: - enabled: - type: boolean - 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 replicas: type: integer resources: @@ -265,6 +204,28 @@ spec: 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 server: @@ -293,6 +254,8 @@ spec: type: string socket_path: type: string + servicePort: + type: integer readiness: type: object properties: @@ -302,6 +265,28 @@ spec: type: string port: type: integer + 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: @@ -328,6 +313,35 @@ spec: type: string socket_path: type: string + servicePort: + type: integer + startup: + type: object + properties: + enabled: + type: boolean + 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: @@ -400,6 +414,8 @@ spec: type: integer interceptors: type: array + items: + type: string keepalive: type: object properties: @@ -483,33 +499,6 @@ spec: type: boolean name: type: string - startup: - type: object - properties: - enabled: - type: boolean - 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 time_zone: type: string tolerations: diff --git a/k8s/tools/benchmark/operator/crds/valdbenchmarkscenario.yaml b/k8s/tools/benchmark/operator/crds/valdbenchmarkscenario.yaml index 32010539ef1..f705e7df6b4 100644 --- a/k8s/tools/benchmark/operator/crds/valdbenchmarkscenario.yaml +++ b/k8s/tools/benchmark/operator/crds/valdbenchmarkscenario.yaml @@ -44,16 +44,10 @@ spec: type: object properties: apiVersion: - description: - "APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" type: string kind: - description: - "Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" type: string metadata: type: object @@ -66,364 +60,50 @@ spec: - Healthy type: string spec: - description: ValdBenchmarkScenarioSpec defines the desired state of ValdBenchmarkScenario type: object properties: dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset + type: object properties: group: type: string + minLength: 1 indexes: type: integer + minimum: 0 name: type: string + enum: + - fashion-mnist range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange + type: object properties: end: type: integer + minimum: 1 start: type: integer - required: - - end - - start - type: object + minimum: 1 required: - - group - - indexes - name - type: object + - indexes + - group + - range + jobs: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true target: + type: object properties: host: type: string + minLength: 1 port: type: integer + maximum: 65535 + minimum: 0 required: - host - port - type: object - jobs: - type: array - items: - description: BenchmarkJobSpec defines the desired state of ValdBenchmarkJob - type: object - properties: - target: - description: BenchmarkTarget defines the desired state of BenchmarkTarget - properties: - host: - type: string - port: - type: integer - required: - - host - - port - type: object - dataset: - description: BenchmarkDataset defines the desired state of BenchmarkDateset - properties: - group: - type: string - indexes: - type: integer - name: - type: string - range: - description: BenchmarkDatasetRange defines the desired state of BenchmarkDatesetRange - properties: - end: - type: integer - start: - type: integer - required: - - end - - start - type: object - required: - - group - - indexes - - name - type: object - dimension: - type: integer - job_type: - type: string - repetition: - type: integer - replica: - type: integer - rules: - items: - description: BenchmarkJobRule defines the desired state of BenchmarkJobRule - properties: - name: - type: string - type: - type: string - required: - - name - - type - type: object - type: array - rps: - type: integer - insert_config: - description: InsertConfig defines the desired state of insert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - remove_config: - description: RemoveConfig defines the desired state of remove config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - type: object - search_config: - description: SearchConfig defines the desired state of search config - properties: - epsilon: - type: number - min_num: - format: int32 - type: integer - num: - format: int32 - type: integer - radius: - type: number - timeout: - type: string - type: object - update_config: - description: UpdateConfig defines the desired state of update config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - upsert_config: - description: UpsertConfig defines the desired state of upsert config - properties: - skip_strict_exist_check: - type: boolean - timestamp: - type: string - disable_balanced_update: - type: boolean - type: object - client_config: - description: ClientConfig represents the configurations for gRPC client. - properties: - addrs: - items: - type: string - type: array - backoff: - description: Backoff represents the configuration for the internal backoff package. - properties: - backoff_factor: - type: number - backoff_time_limit: - type: string - enable_error_log: - type: boolean - initial_duration: - type: string - jitter_limit: - type: string - maximum_duration: - type: string - retry_count: - type: integer - type: object - call_option: - description: CallOption represents the configurations for call option. - properties: - max_recv_msg_size: - type: integer - max_retry_rpc_buffer_size: - type: integer - max_send_msg_size: - type: integer - wait_for_ready: - type: boolean - type: object - circuit_breaker: - description: CircuitBreaker represents the configuration for the internal circuitbreaker package. - properties: - closed_error_rate: - type: number - closed_refresh_timeout: - type: string - half_open_error_rate: - type: number - min_samples: - format: int64 - type: integer - open_timeout: - type: string - type: object - connection_pool: - description: ConnectionPool represents the configurations for connection pool. - properties: - enable_rebalance: - type: boolean - old_conn_close_duration: - type: string - rebalance_duration: - type: string - resolve_dns: - type: boolean - size: - type: integer - type: object - dial_option: - description: DialOption represents the configurations for dial option. - properties: - backoff_base_delay: - type: string - backoff_jitter: - type: number - backoff_max_delay: - type: string - backoff_multiplier: - type: number - enable_backoff: - type: boolean - initial_connection_window_size: - type: integer - initial_window_size: - type: integer - insecure: - type: boolean - interceptors: - items: - type: string - type: array - keepalive: - description: GRPCClientKeepalive represents the configurations for gRPC keep-alive. - properties: - permit_without_stream: - type: boolean - time: - type: string - timeout: - type: string - type: object - max_msg_size: - type: integer - minimum_connection_timeout: - type: string - net: - description: Net represents the network configuration tcp, udp, unix domain socket. - properties: - dialer: - description: Dialer represents the configuration for dial. - properties: - dual_stack_enabled: - type: boolean - fallback_delay: - type: string - keepalive: - type: string - timeout: - type: string - type: object - dns: - description: DNS represents the configuration for resolving DNS. - properties: - cache_enabled: - type: boolean - cache_expiration: - type: string - refresh_duration: - type: string - type: object - socket_option: - description: SocketOption represents the socket configurations. - 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 - type: object - tls: - description: TLS represent the TLS configuration for server. - properties: - ca: - description: CA represent the CA certificate environment variable key used to start server. - type: string - cert: - description: Cert represent the certificate environment variable key used to start server. - type: string - enabled: - description: Enable represent the server enable TLS or not. - type: boolean - insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification - type: boolean - key: - description: Key represent the private key environment variable key used to start server. - type: string - type: object - type: object - read_buffer_size: - type: integer - timeout: - type: string - write_buffer_size: - type: integer - type: object - health_check_duration: - type: string - tls: - description: TLS represent the TLS configuration for server. - properties: - ca: - description: CA represent the CA certificate environment variable key used to start server. - type: string - cert: - description: Cert represent the certificate environment variable key used to start server. - type: string - enabled: - description: Enable represent the server enable TLS or not. - type: boolean - insecure_skip_verify: - description: InsecureSkipVerify represent enable/disable skip SSL certificate verification - type: boolean - key: - description: Key represent the private key environment variable key used to start server. - type: string - type: object - type: object - required: - - job_type - - dimension - required: - - jobs - - dataset - - target diff --git a/k8s/tools/benchmark/operator/crds/valdbenchmarkscenariorelease.yaml b/k8s/tools/benchmark/operator/crds/valdbenchmarkscenariorelease.yaml deleted file mode 100644 index d4f9ac2b102..00000000000 --- a/k8s/tools/benchmark/operator/crds/valdbenchmarkscenariorelease.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# -# 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. -# -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: valdbenchmarkscenarios.vald.vdaas.org -spec: - group: vald.vdaas.org - names: - kind: ValdBenchmarkScenario - listKind: ValdBenchmarkScenarioList - plural: valdbenchmarkscenarios - singular: valdbenchmarkscenario - shortNames: - - vbo - - vbos - scope: Namespaced - versions: - - name: v1 - served: true - storage: true - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status - name: STATUS - type: string - schema: - openAPIV3Schema: - description: ValdBenchmarkScenario is the Schema for the valdbenchmarkscenarios API - type: object - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - metadata: - type: object - status: - description: ValdBenchmarkScenarioStatus defines the observed state of ValdBenchmarkScenario - enum: - - NotReady - - Completed - - Available - - Healthy - type: string - spec: - type: object - properties: - dataset: - type: object - properties: - group: - type: string - minLength: 1 - indexes: - type: integer - minimum: 0 - name: - type: string - enum: - - fashion-mnist - range: - type: object - properties: - end: - type: integer - minimum: 1 - start: - type: integer - minimum: 1 - required: - - name - - indexes - - group - - range - jobs: - type: array - target: - type: object - properties: - host: - type: string - minLength: 1 - port: - type: integer - maximum: 65535 - minimum: 0 - required: - - host - - port