diff --git a/Makefile b/Makefile index 7a0d172c1e0..0249a7f4a04 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,8 @@ TELEPRESENCE_VERSION := $(eval TELEPRESENCE_VERSION := $(shell cat versions VALDCLI_VERSION := $(eval VALDCLI_VERSION := $(shell cat versions/VALDCLI_VERSION))$(VALDCLI_VERSION) YQ_VERSION := $(eval YQ_VERSION := $(shell cat versions/YQ_VERSION))$(YQ_VERSION) BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION) +ZLIB_VERSION := $(eval ZLIB_VERSION := $(shell cat versions/ZLIB_VERSION))$(ZLIB_VERSION) +HDF5_VERSION := $(eval HDF5_VERSION := $(shell cat versions/HDF5_VERSION))$(HDF5_VERSION) OTEL_OPERATOR_RELEASE_NAME ?= opentelemetry-operator PROMETHEUS_RELEASE_NAME ?= prometheus diff --git a/Makefile.d/build.mk b/Makefile.d/build.mk index 2427143c1bc..4d7992262b3 100644 --- a/Makefile.d/build.mk +++ b/Makefile.d/build.mk @@ -329,30 +329,26 @@ cmd/tools/benchmark/job/job: \ $(PBGOS) \ $(shell find ./cmd/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ $(shell find ./pkg/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') - CFLAGS="$(CFLAGS)" \ - CXXFLAGS="$(CXXFLAGS)" \ - CGO_ENABLED=1 \ - CGO_CXXFLAGS="-g -Ofast -march=native" \ - CGO_FFLAGS="-g -Ofast -march=native" \ - CGO_LDFLAGS="-g -Ofast -march=native" \ + CGO_ENABLED=$(CGO_ENABLED) \ GO111MODULE=on \ GOPRIVATE=$(GOPRIVATE) \ go build \ - --ldflags "-s -w \ + --ldflags "-w -linkmode 'external' \ + -extldflags '-static -fPIC -pthread -fopenmp -std=gnu++20 -lhdf5 -lhdf5_hl -lm -ldl' \ -X '$(GOPKG)/internal/info.Version=$(VERSION)' \ -X '$(GOPKG)/internal/info.GitCommit=$(GIT_COMMIT)' \ -X '$(GOPKG)/internal/info.BuildTime=$(DATETIME)' \ -X '$(GOPKG)/internal/info.GoVersion=$(GO_VERSION)' \ -X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \ -X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \ - -X '$(GOPKG)/internal/info.CGOEnabled=$${CGO_ENABLED}' \ + -X '$(GOPKG)/internal/info.CGOEnabled=${CGO_ENABLED}' \ -X '$(GOPKG)/internal/info.NGTVersion=$(NGT_VERSION)' \ -X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \ -buildid=" \ -mod=readonly \ -modcacherw \ -a \ - -tags "cgo osusergo netgo" \ + -tags "cgo osusergo netgo static_build" \ -trimpath \ -o $@ \ $(dir $@)main.go @@ -372,15 +368,15 @@ cmd/tools/benchmark/operator/operator: \ GO111MODULE=on \ GOPRIVATE=$(GOPRIVATE) \ go build \ - --ldflags "-s -w \ - -X '$(GOPKG)/internal/info.CGOEnabled=$${CGO_ENABLED}' \ + --ldflags "-w -extldflags=-static \ + -X '$(GOPKG)/internal/info.CGOEnabled=${CGO_ENABLED}' \ -X '$(GOPKG)/internal/info.NGTVersion=$(NGT_VERSION)' \ -X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \ -buildid=" \ -mod=readonly \ -modcacherw \ -a \ - -tags "cgo osusergo netgo" \ + -tags "cgo osusergo netgo static_build" \ -trimpath \ -o $@ \ $(dir $@)main.go diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index d4e73c2b631..03e1e95213b 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -35,7 +35,9 @@ update/libs: \ update/telepresence \ update/vald \ update/valdcli \ - update/yq + update/yq \ + update/zlib \ + update/hdf5 .PHONY: go/download ## download Go package dependencies @@ -163,6 +165,16 @@ update/telepresence: update/yq: curl --silent https://api.github.com/repos/mikefarah/yq/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/YQ_VERSION +.PHONY: update/zlib +## update zlib version +update/zlib: + curl --silent https://api.github.com/repos/madler/zlib/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/ZLIB_VERSION + +.PHONY: update/hdf5 +## update hdf5 version +update/hdf5: + curl --silent https://api.github.com/repos/HDFGroup/hdf5/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/HDF5_VERSION + .PHONY: update/vald ## update vald it's self version update/vald: diff --git a/Makefile.d/docker.mk b/Makefile.d/docker.mk index 045bee81d67..1c96e8b1379 100644 --- a/Makefile.d/docker.mk +++ b/Makefile.d/docker.mk @@ -236,13 +236,10 @@ docker/name/benchmark-job: .PHONY: docker/build/benchmark-job ## build benchmark job docker/build/benchmark-job: - $(DOCKER) build \ - $(DOCKER_OPTS) \ - -f dockers/tools/benchmark/job/Dockerfile \ - -t $(ORG)/$(BENCHMARK_JOB_IMAGE):$(TAG) . \ - --build-arg GO_VERSION=$(GO_VERSION) \ - --build-arg DISTROLESS_IMAGE=$(DISTROLESS_IMAGE) \ - --build-arg DISTROLESS_IMAGE_TAG=$(DISTROLESS_IMAGE_TAG) + @make DOCKERFILE="$(ROOTDIR)/dockers/tools/benchmark/job/Dockerfile" \ + IMAGE=$(BENCHMARK_JOB_IMAGE) \ + DOCKER_OPTS="--build-arg ZLIB_VERSION=$(ZLIB_VERSION) --build-arg HDF5_VERSION=$(HDF5_VERSION)" \ + docker/build/image .PHONY: docker/name/benchmark-operator docker/name/benchmark-operator: @@ -251,10 +248,6 @@ docker/name/benchmark-operator: .PHONY: docker/build/benchmark-operator ## build benchmark operator docker/build/benchmark-operator: - $(DOCKER) build \ - $(DOCKER_OPTS) \ - -f dockers/tools/benchmark/operator/Dockerfile \ - -t $(ORG)/$(BENCHMARK_OPERATOR_IMAGE):$(TAG) . \ - --build-arg GO_VERSION=$(GO_VERSION) \ - --build-arg DISTROLESS_IMAGE=$(DISTROLESS_IMAGE) \ - --build-arg DISTROLESS_IMAGE_TAG=$(DISTROLESS_IMAGE_TAG) + @make DOCKERFILE="$(ROOTDIR)/dockers/tools/benchmark/operator/Dockerfile" \ + IMAGE=$(BENCHMARK_OPERATOR_IMAGE) \ + docker/build/image diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md index 47ea5b6fd74..0b2f1e121f7 100644 --- a/apis/docs/v1/docs.md +++ b/apis/docs/v1/docs.md @@ -143,6 +143,36 @@ - [RequestInfo](#rpc-v1-RequestInfo) - [ResourceInfo](#rpc-v1-ResourceInfo) - [RetryInfo](#rpc-v1-RetryInfo) +- [apis/proto/v1/vald/filter.proto](#apis_proto_v1_vald_filter-proto) + - [Filter](#vald-v1-Filter) +- [apis/proto/v1/vald/insert.proto](#apis_proto_v1_vald_insert-proto) + - [Insert](#vald-v1-Insert) +- [apis/proto/v1/vald/object.proto](#apis_proto_v1_vald_object-proto) + - [Object](#vald-v1-Object) +- [apis/proto/v1/vald/remove.proto](#apis_proto_v1_vald_remove-proto) + - [Remove](#vald-v1-Remove) +- [apis/proto/v1/vald/search.proto](#apis_proto_v1_vald_search-proto) + - [Search](#vald-v1-Search) +- [apis/proto/v1/vald/update.proto](#apis_proto_v1_vald_update-proto) + - [Update](#vald-v1-Update) +- [apis/proto/v1/vald/upsert.proto](#apis_proto_v1_vald_upsert-proto) + - [Upsert](#vald-v1-Upsert) +- [apis/proto/v1/rpc/error_details.proto](#apis_proto_v1_rpc_error_details-proto) + - [BadRequest](#rpc-v1-BadRequest) + - [BadRequest.FieldViolation](#rpc-v1-BadRequest-FieldViolation) + - [DebugInfo](#rpc-v1-DebugInfo) + - [ErrorInfo](#rpc-v1-ErrorInfo) + - [ErrorInfo.MetadataEntry](#rpc-v1-ErrorInfo-MetadataEntry) + - [Help](#rpc-v1-Help) + - [Help.Link](#rpc-v1-Help-Link) + - [LocalizedMessage](#rpc-v1-LocalizedMessage) + - [PreconditionFailure](#rpc-v1-PreconditionFailure) + - [PreconditionFailure.Violation](#rpc-v1-PreconditionFailure-Violation) + - [QuotaFailure](#rpc-v1-QuotaFailure) + - [QuotaFailure.Violation](#rpc-v1-QuotaFailure-Violation) + - [RequestInfo](#rpc-v1-RequestInfo) + - [ResourceInfo](#rpc-v1-ResourceInfo) + - [RetryInfo](#rpc-v1-RetryInfo) - [apis/proto/v1/benchmark/benchmark.proto](#apis_proto_v1_benchmark_benchmark-proto) - [Controller](#benchmark-v1-Controller) @@ -1716,6 +1746,277 @@ TODO define API spec here | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ----------- | + + +

Top

+ +## apis/proto/v1/rpc/error_details.proto + + + +### BadRequest + +Describes violations in a client request. This error type focuses on the +syntactic aspects of the request. + +| Field | Type | Label | Description | +| ---------------- | -------------------------------------------------------------- | -------- | --------------------------------------------- | +| field_violations | [BadRequest.FieldViolation](#rpc-v1-BadRequest-FieldViolation) | repeated | Describes all violations in a client request. | + + + +### BadRequest.FieldViolation + +A message type used to describe a single bad request field. + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| field | [string](#string) | | A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. | + +Consider the following: + +message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } + +optional string email = 1; repeated EmailType type = 2; } + +string full_name = 1; repeated EmailAddress email_addresses = 2; } + +In this example, in proto `field` could take one of the following values: + +- `full_name` for a violation in the `full_name` value _ `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message _ `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message. + +In JSON, the same values are represented as: + +- `fullName` for a violation in the `fullName` value _ `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message _ `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message. | + | description | [string](#string) | | A description of why the request element is bad. | + + + +### DebugInfo + +Describes additional debugging info. + +| Field | Type | Label | Description | +| ------------- | ----------------- | -------- | ------------------------------------------------------------ | +| stack_entries | [string](#string) | repeated | The stack trace entries indicating where the error occurred. | +| detail | [string](#string) | | Additional debugging information provided by the server. | + + + +### ErrorInfo + +Describes the cause of the error with structured details. + +Example of an error when contacting the "pubsub.googleapis.com" API when it +is not enabled: + + { "reason": "API_DISABLED" + "domain": "googleapis.com" + "metadata": { + "resource": "projects/123", + "service": "pubsub.googleapis.com" + } + } + +This response indicates that the pubsub.googleapis.com API is not enabled. + +Example of an error that is returned when attempting to create a Spanner +instance in a region that is out of stock: + + { "reason": "STOCKOUT" + "domain": "spanner.googleapis.com", + "metadata": { + "availableRegions": "us-central1,us-east2" + } + } + +| Field | Type | Label | Description | +| -------- | ---------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| reason | [string](#string) | | The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. | +| domain | [string](#string) | | The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com". | +| metadata | [ErrorInfo.MetadataEntry](#rpc-v1-ErrorInfo-MetadataEntry) | repeated | Additional structured details about this error. | + +Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. | + + + +### ErrorInfo.MetadataEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + +### Help + +Provides links to documentation or for performing an out of band action. + +For example, if a quota check failed with an error indicating the calling +project hasn't enabled the accessed service, this can contain a URL pointing +directly to the right place in the developer console to flip the bit. + +| Field | Type | Label | Description | +| ----- | ------------------------------ | -------- | ------------------------------------------------------------------------ | +| links | [Help.Link](#rpc-v1-Help-Link) | repeated | URL(s) pointing to additional information on handling the current error. | + + + +### Help.Link + +Describes a URL link. + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ------------------------------- | +| description | [string](#string) | | Describes what the link offers. | +| url | [string](#string) | | The URL of the link. | + + + +### LocalizedMessage + +Provides a localized error message that is safe to return to the user +which can be attached to an RPC error. + +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| locale | [string](#string) | | The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX" | +| message | [string](#string) | | The localized error message in the above locale. | + + + +### PreconditionFailure + +Describes what preconditions have failed. + +For example, if an RPC failed because it required the Terms of Service to be +acknowledged, it could list the terms of service violation in the +PreconditionFailure message. + +| Field | Type | Label | Description | +| ---------- | ---------------------------------------------------------------------- | -------- | -------------------------------------- | +| violations | [PreconditionFailure.Violation](#rpc-v1-PreconditionFailure-Violation) | repeated | Describes all precondition violations. | + + + +### PreconditionFailure.Violation + +A message type used to describe a single precondition failure. + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | [string](#string) | | The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation". | +| subject | [string](#string) | | The subject, relative to the type, that failed. For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced. | +| description | [string](#string) | | A description of how the precondition failed. Developers can use this description to understand how to fix the failure. | + +For example: "Terms of service not accepted". | + + + +### QuotaFailure + +Describes how a quota check failed. + +For example if a daily limit was exceeded for the calling project, +a service could respond with a QuotaFailure detail containing the project +id and the description of the quota limit that was exceeded. If the +calling project hasn't enabled the service in the developer console, then +a service could respond with the project id and set `service_disabled` +to true. + +Also see RetryInfo and Help types for other details about handling a +quota failure. + +| Field | Type | Label | Description | +| ---------- | -------------------------------------------------------- | -------- | ------------------------------- | +| violations | [QuotaFailure.Violation](#rpc-v1-QuotaFailure-Violation) | repeated | Describes all quota violations. | + + + +### QuotaFailure.Violation + +A message type used to describe a single quota violation. For example, a +daily quota or a custom quota that was exceeded. + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| subject | [string](#string) | | The subject on which the quota check failed. For example, "clientip:<ip address of client>" or "project:<Google developer project id>". | +| description | [string](#string) | | A description of how the quota check failed. Clients can use this description to find more about the quota configuration in the service's public documentation, or find the relevant quota limit to adjust through developer console. | + +For example: "Service disabled" or "Daily Limit for read operations exceeded". | + + + +### RequestInfo + +Contains metadata about the request that clients can attach when filing a bug +or providing other forms of feedback. + +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| request_id | [string](#string) | | An opaque string that should only be interpreted by the service generating it. For example, it can be used to identify requests in the service's logs. | +| serving_data | [string](#string) | | Any data that was used to serve this request. For example, an encrypted stack trace that can be sent back to the service provider for debugging. | + + + +### ResourceInfo + +Describes the resource that is being accessed. + +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| resource_type | [string](#string) | | A name for the type of resource being accessed, e.g. "sql table", "cloud storage bucket", "file", "Google calendar"; or the type URL of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". | +| resource_name | [string](#string) | | The name of the resource being accessed. For example, a shared calendar name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. | +| owner | [string](#string) | | The owner of the resource (optional). For example, "user:<owner email>" or "project:<Google developer project id>". | +| description | [string](#string) | | Describes what error is encountered when accessing this resource. For example, updating a cloud project may require the `writer` permission on the developer console project. | + + + +### RetryInfo + +Describes when the clients can retry a failed request. Clients could ignore +the recommendation here or retry when this information is missing from error +responses. + +It's always recommended that clients should use exponential backoff when +retrying. + +Clients should wait until `retry_delay` amount of time has passed since +receiving the error response before retrying. If retrying requests also +fail, clients should use an exponential backoff scheme to gradually increase +the delay between retries based on `retry_delay`, until either a maximum +number of retries have been reached or a maximum retry delay cap has been +reached. + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------- | ----- | ------------------------------------------------------------------------- | +| retry_delay | [google.protobuf.Duration](#google-protobuf-Duration) | | Clients should wait at least this long between retrying the same request. | + + + +

Top

+ +## apis/proto/v1/benchmark/benchmark.proto + + + +### Controller + +TODO define API spec here + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ----------- | + + + +### Job + +TODO define API spec here + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ----------- | + ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/dockers/tools/benchmark/job/Dockerfile b/dockers/tools/benchmark/job/Dockerfile index ddea7f215d2..6ad69d15693 100644 --- a/dockers/tools/benchmark/job/Dockerfile +++ b/dockers/tools/benchmark/job/Dockerfile @@ -15,6 +15,8 @@ # ARG GO_VERSION=latest +ARG ZLIB_VERSION +ARG HDF5_VERSION ARG DISTROLESS_IMAGE=gcr.io/distroless/static ARG DISTROLESS_IMAGE_TAG=nonroot ARG UPX_OPTIONS=-9 @@ -25,6 +27,8 @@ FROM golang:${GO_VERSION} AS golang FROM ubuntu:devel AS builder ARG UPX_OPTIONS +ARG ZLIB_VERSION +ARG HDF5_VERSION ENV GO111MODULE on ENV DEBIAN_FRONTEND noninteractive @@ -37,18 +41,39 @@ ENV ORG vdaas ENV REPO vald ENV APP_NAME job ENV PKG tools/benchmark/${APP_NAME} +ENV BUILD_DIR=/usr/local +ENV LIB_DIR=/usr/local/lib +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LIB_DIR}:/lib # skipcq: DOK-DL3008 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ build-essential \ - libhdf5-dev \ curl \ upx \ + g++ \ git \ && ldconfig \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p ${LIB_DIR} \ + && curl -sOL https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz \ + && mkdir -p zlib \ + && tar -xzvf zlib-${ZLIB_VERSION}.tar.gz -C zlib --strip-components 1 \ + && cd zlib \ + && ./configure --prefix=${LIB_DIR} --static \ + && make \ + && make test \ + && make install \ + && cd / \ + && mkdir -p hdf5 \ + && curl -sOL https://github.com/HDFGroup/hdf5/releases/download/${HDF5_VERSION}/${HDF5_VERSION}.tar.gz \ + && tar -xzvf ${HDF5_VERSION}.tar.gz -C hdf5 --strip-components 2 \ + && cd hdf5 \ + && ./configure --enable-build-mode=production --enable-static-exec --disable-shared --prefix=${BUILD_DIR} --with-zlib=${BUILD_DIR}/include,${LIB_DIR} LDFLAGS="-Wl,-rpath,${LIB_DIR}" \ + && make check \ + && make install \ + && ldconfig COPY --from=golang /usr/local/go $GOROOT RUN mkdir -p "$GOPATH/src" @@ -86,30 +111,14 @@ RUN make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} RUN cp sample.yaml /tmp/config.yaml - -# FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} -FROM ubuntu:devel +FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} LABEL maintainer="${MAINTAINER}" ENV APP_NAME job -RUN apt-get update && apt-get install -y --no-install-recommends \ - libhdf5-dev \ - && ldconfig \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Copy certificates for SSL/TLS -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -# Copy permissions -COPY --from=builder /etc/passwd /etc/passwd -# workaround: https://github.com/moby/moby/issues/37965 -RUN true - COPY --from=builder /usr/bin/${APP_NAME} /go/bin/${APP_NAME} COPY --from=builder /tmp/config.yaml /etc/server/config.yaml -# For distroless -# USER nonroot:nonroot +USER nonroot:nonroot ENTRYPOINT ["/go/bin/job"] diff --git a/go.mod b/go.mod index 43dd3f361a1..a16827faefc 100755 --- a/go.mod +++ b/go.mod @@ -396,6 +396,7 @@ require ( golang.org/x/sync v0.5.0 golang.org/x/sys v0.15.0 golang.org/x/text v0.14.0 + golang.org/x/time v0.5.0 golang.org/x/tools v0.16.0 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.10.1 diff --git a/go.sum b/go.sum index 9199a284609..5e745c898a0 100644 --- a/go.sum +++ b/go.sum @@ -219,6 +219,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNIC github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU= github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= diff --git a/internal/k8s/vald/benchmark/job/job_template_option.go b/internal/k8s/vald/benchmark/job/job_template_option.go index e401c78a5b4..90c996ef0e9 100644 --- a/internal/k8s/vald/benchmark/job/job_template_option.go +++ b/internal/k8s/vald/benchmark/job/job_template_option.go @@ -67,6 +67,7 @@ type BenchmarkJobOption func(b *jobs.Job) error var defaultBenchmarkJobOpts = []BenchmarkJobOption{ WithSvcAccountName(svcAccount), WithRestartPolicy(RestartPolicyNever), + WithTTLSecondsAfterFinished(int32(600)), } // WithSvcAccountName sets the service account name for benchmark job. diff --git a/versions/HDF5_VERSION b/versions/HDF5_VERSION new file mode 100644 index 00000000000..e4598026796 --- /dev/null +++ b/versions/HDF5_VERSION @@ -0,0 +1 @@ +hdf5-1_14_3 diff --git a/versions/ZLIB_VERSION b/versions/ZLIB_VERSION new file mode 100644 index 00000000000..7e32cd56983 --- /dev/null +++ b/versions/ZLIB_VERSION @@ -0,0 +1 @@ +1.3