diff --git a/.gitfiles b/.gitfiles index 13f61ddc34..d22a7dbe9e 100644 --- a/.gitfiles +++ b/.gitfiles @@ -71,6 +71,7 @@ .github/workflows/build-protobuf.yml .github/workflows/chatops-help.yml .github/workflows/chatops.yml +.github/workflows/check-conflict.yml .github/workflows/codeql-analysis.yml .github/workflows/coverage.yml .github/workflows/detect-internal-config-changes.yml @@ -117,6 +118,7 @@ .github/workflows/semver-patch.yaml .github/workflows/test-hack.yml .github/workflows/unit-test.yaml +.github/workflows/update-actions.yaml .github/workflows/update-protobuf.yaml .github/workflows/update-pull-request-and-issue-template.yml .github/workflows/update-web-docs.yml @@ -544,7 +546,6 @@ dockers/manager/index/Dockerfile dockers/manager/index/README.md dockers/operator/helm/Dockerfile dockers/operator/helm/README.md -dockers/readreplica/job/readreplica/rotate/Dockerfile dockers/template.md dockers/tools/benchmark/job/Dockerfile dockers/tools/benchmark/operator/Dockerfile @@ -1971,6 +1972,7 @@ rust/libs/proto/src/sidecar.v1.rs rust/libs/proto/src/sidecar.v1.tonic.rs rust/libs/proto/src/vald.v1.rs rust/libs/proto/src/vald.v1.tonic.rs +rust/rust-toolchain rust/rust-toolchain.toml tests/chaos/chart/.helmignore tests/chaos/chart/Chart.yaml @@ -2000,6 +2002,7 @@ tests/e2e/sidecar/sidecar_test.go tests/performance/max_vector_dim_test.go versions/BUF_VERSION versions/CHAOS_MESH_VERSION +versions/CMAKE_VERSION versions/DOCKER_VERSION versions/FAISS_VERSION versions/GOLANGCILINT_VERSION @@ -2047,6 +2050,7 @@ versions/actions/GITHUB_CODEQL_ACTION_UPLOAD_SARIF versions/actions/GITHUB_ISSUE_METRICS versions/actions/MACHINE_LEARNING_APPS_ACTIONS_CHATOPS versions/actions/PETER_EVANS_CREATE_ISSUE_FROM_FILE +versions/actions/PETER_EVANS_CREATE_PULL_REQUEST versions/actions/REVIEWDOG_ACTION_HADOLINT versions/actions/REVIEWDOG_ACTION_LANGUAGETOOL versions/actions/SHOGO82148_ACTIONS_UPLOAD_RELEASE_ASSET diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8b4d110a67..c5db91ca9c 100755 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ assignees: "" - Vald Version: v1.7.12 - Go Version: v1.22.5 -- Rust Version: v1.77.2 +- Rust Version: v1.80.0 - Docker Version: v27.1.1 - Kubernetes Version: v1.30.3 - Helm Version: v3.15.3 diff --git a/.github/ISSUE_TEMPLATE/security_issue_report.md b/.github/ISSUE_TEMPLATE/security_issue_report.md index 0d78df8f92..3474581d6c 100644 --- a/.github/ISSUE_TEMPLATE/security_issue_report.md +++ b/.github/ISSUE_TEMPLATE/security_issue_report.md @@ -18,7 +18,7 @@ assignees: "" - Vald Version: v1.7.12 - Go Version: v1.22.5 -- Rust Version: v1.77.2 +- Rust Version: v1.80.0 - Docker Version: v27.1.1 - Kubernetes Version: v1.30.3 - Helm Version: v3.15.3 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 831b078b81..8f43359802 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,7 +17,7 @@ - Vald Version: v1.7.12 - Go Version: v1.22.5 -- Rust Version: v1.77.2 +- Rust Version: v1.80.0 - Docker Version: v27.1.1 - Kubernetes Version: v1.30.3 - Helm Version: v3.15.3 diff --git a/.github/actions/setup-e2e/action.yaml b/.github/actions/setup-e2e/action.yaml index f2c11c0aec..6cf1745809 100644 --- a/.github/actions/setup-e2e/action.yaml +++ b/.github/actions/setup-e2e/action.yaml @@ -19,7 +19,7 @@ inputs: require_libhdf5: description: "If libhdf5 is not required, set this to false" required: false - default: "true" + default: "false" require_go: description: "If go is not required, set this to false" required: false @@ -58,8 +58,8 @@ runs: if: ${{ inputs.require_libhdf5 == 'true' }} shell: bash run: | - sudo apt-get update - sudo apt-get install -y libhdf5-dev + apt-get update + apt-get install -y libhdf5-dev - name: Setup Go environment if: ${{ inputs.require_go == 'true' }} uses: ./.github/actions/setup-go diff --git a/.github/actions/setup-k3d/action.yaml b/.github/actions/setup-k3d/action.yaml index 48f7556818..6f2ab0f49f 100644 --- a/.github/actions/setup-k3d/action.yaml +++ b/.github/actions/setup-k3d/action.yaml @@ -57,9 +57,14 @@ runs: id: k3s_version shell: bash run: | - K3S_VERSION=${K3S_VERSION:-`cat versions/K3S_VERSION`} - - echo "tag=${K3S_VERSION=$}" >> $GITHUB_OUTPUT + if [ -z "${K3S_VERSION}" ]; then + if [ -f "versions/K3S_VERSION" ]; then + K3S_VERSION=$(cat versions/K3S_VERSION) + else + K3S_VERSION=latest + fi + fi + echo "tag=${K3S_VERSION}" >> $GITHUB_OUTPUT env: K3S_VERSION: ${{ inputs.k3s_version }} - name: Install k3d @@ -72,30 +77,38 @@ runs: shell: bash run: | k3d version - - name: Setup k3d options + - name: Create k8s cluster shell: bash - id: k3d_options + id: start_k3d run: | - if [ "${AGENTS}" != 0 ]; then - OPTIONS="${OPTIONS} --agents ${AGENTS}" + if [ "${K3D_INGRESS_PORT}" == "0" ] && [ -z "${K3D_OPTIONS}" ]; then + K3D_OPTIONS="--k3s-arg \"--disable=traefik@server:*\"" fi - if [ "${INGRESS_PORT}" != 0 ]; then - OPTIONS="${OPTIONS} -p ${INGRESS_PORT}:80@loadbalancer" + if [ "${K3D_INGRESS_PORT}" != "0" ] && [ -n "${K3D_OPTIONS}" ]; then + K3D_OPTIONS="--port ${K3D_INGRESS_PORT}:80@loadbalancer ${K3D_OPTIONS}" fi - OPTIONS="${OPTIONS} --image rancher/k3s:${K3S_VERSION}" - echo "options=${OPTIONS}" >> $GITHUB_OUTPUT + make K3D_CLUSTER_NAME="${{ inputs.name }}" \ + K3D_NODES="${{ inputs.agents }}" \ + K3D_INGRESS_PORT="${K3D_INGRESS_PORT}" \ + K3S_VERSION="${{ steps.k3s_version.outputs.tag }}" \ + K3D_HOST="host.docker.internal" \ + K3D_OPTIONS="${K3D_OPTIONS}" \ + k3d/start + k3d cluster list env: - AGENTS: ${{ inputs.agents }} - INGRESS_PORT: ${{ inputs.ingress_port }} - OPTIONS: ${{ inputs.options }} - K3S_VERSION: ${{ steps.k3s_version.outputs.tag }} - - name: Create k8s cluster + K3D_INGRESS_PORT: ${{ inputs.ingress_port }} + K3D_OPTIONS: ${{ inputs.options }} + - name: Set k3d cluster config to KUBECONFIG shell: bash - id: start_k3d run: | - k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }} - - name: Ready k8s cluster + echo "KUBECONFIG=$(k3d kubeconfig write ${{ inputs.name }})" >> $GITHUB_ENV + - name: Check KUBECONFIG environment variable + shell: bash + run: | + echo $KUBECONFIG + cat $KUBECONFIG + cat /etc/hosts + - name: Show Kubernetes Cluster Info shell: bash run: | - k3d cluster list kubectl cluster-info dump diff --git a/.github/helm/values/values-chaos.yaml b/.github/helm/values/values-chaos.yaml index 20566b4c22..99d65826e4 100644 --- a/.github/helm/values/values-chaos.yaml +++ b/.github/helm/values/values-chaos.yaml @@ -35,7 +35,7 @@ gateway: enabled: true ingress: enabled: true - host: "localhost" + host: "host.docker.internal" service: # NOTE: https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-service annotations: diff --git a/.github/workflows/e2e-chaos.yaml b/.github/workflows/e2e-chaos.yaml index d571227e1f..473e4136cc 100644 --- a/.github/workflows/e2e-chaos.yaml +++ b/.github/workflows/e2e-chaos.yaml @@ -30,16 +30,21 @@ env: INGRESS_PORT: 8081 jobs: dump-contexts-to-log: - if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos' + uses: ./.github/workflows/_detect-ci-container.yml agent-failure: name: "E2E chaos test (Agent failure: to test insert/search works even if one of the agents is failing)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -64,7 +69,7 @@ jobs: - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} - make E2E_BIND_HOST=localhost \ + make E2E_BIND_HOST=host.docker.internal \ E2E_BIND_PORT=8081 \ E2E_PORTFORWARD_ENABLED=false \ E2E_DATASET_NAME=${{ env.DATASET }} \ @@ -75,9 +80,12 @@ jobs: e2e/insert/search random-pod-failure: name: "E2E chaos test (random Pod failure: to test redundancy)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -102,7 +110,7 @@ jobs: - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} - make E2E_BIND_HOST=localhost \ + make E2E_BIND_HOST=host.docker.internal \ E2E_BIND_PORT=8081 \ E2E_PORTFORWARD_ENABLED=false \ E2E_DATASET_NAME=${{ env.DATASET }} \ @@ -113,9 +121,12 @@ jobs: e2e/insert/search agent-network-partition: name: "E2E chaos test (agent network partition: to test retries)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -140,7 +151,7 @@ jobs: - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} - make E2E_BIND_HOST=localhost \ + make E2E_BIND_HOST=host.docker.internal \ E2E_BIND_PORT=8081 \ E2E_PORTFORWARD_ENABLED=false \ E2E_DATASET_NAME=${{ env.DATASET }} \ @@ -151,9 +162,12 @@ jobs: e2e/insert/search clusterwide-network-bandwidth: name: "E2E chaos test (network bandwidth: to test it works properly under bandwidth limitation)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -178,7 +192,7 @@ jobs: - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} - make E2E_BIND_HOST=localhost \ + make E2E_BIND_HOST=host.docker.internal \ E2E_BIND_PORT=8081 \ E2E_PORTFORWARD_ENABLED=false \ E2E_DATASET_NAME=${{ env.DATASET }} \ diff --git a/.github/workflows/e2e-code-bench-agent.yaml b/.github/workflows/e2e-code-bench-agent.yaml index 015873aaef..f6bfe972ce 100644 --- a/.github/workflows/e2e-code-bench-agent.yaml +++ b/.github/workflows/e2e-code-bench-agent.yaml @@ -58,6 +58,7 @@ jobs: needs: [detect-ci-container] container: image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -85,6 +86,7 @@ jobs: needs: [detect-ci-container] container: image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config diff --git a/.github/workflows/e2e-max-dim.yml b/.github/workflows/e2e-max-dim.yml index ef2b137547..4d5476b3fb 100644 --- a/.github/workflows/e2e-max-dim.yml +++ b/.github/workflows/e2e-max-dim.yml @@ -27,16 +27,21 @@ on: - "labeled" jobs: dump-contexts-to-log: - if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-max-dim' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-max-dim' + uses: ./.github/workflows/_detect-ci-container.yml e2e-max-dimension-insert: name: "E2E test (Max Dimension Insert: skip strict exist check)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config diff --git a/.github/workflows/e2e-profiling.yml b/.github/workflows/e2e-profiling.yml index d54c79722d..1e285e1343 100644 --- a/.github/workflows/e2e-profiling.yml +++ b/.github/workflows/e2e-profiling.yml @@ -28,16 +28,21 @@ env: DATASET: fashion-mnist-784-euclidean.hdf5 jobs: dump-contexts-to-log: - if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + if: startsWith(github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' + uses: ./.github/workflows/_detect-ci-container.yml e2e-profiling: name: "E2E profiling" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -100,13 +105,27 @@ jobs: path: ./profiles-main key: ${{ runner.os }}-profiles-main-${{ github.sha }} restore-keys: ${{ runner.os }}-profiles-main- - - name: Install dependencies + - name: Update cache + if: startsWith(github.ref, 'refs/tags/') run: | - sudo apt update - sudo apt install -y graphviz + mkdir -p profiles-main + cp -f profiles/* profiles-main/ + cp -f versions/VALD_VERSION profiles-main/ - name: Generate graphs + shell: bash run: | - tag=$(cat profiles-main/VALD_VERSION || echo "unknown") + tag="unknown" + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + tag="pr-${{ github.event.pull_request.number }}" + elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then + tag="main-${{ github.sha }}" + elif [[ "${{ github.ref }}" == "refs/heads/release/*" ]]; then + version=$(echo ${{ github.ref }} | sed 's/refs\/heads\/release\///') + tag="v${version}-${{ github.sha }}" + elif [[ -f profiles-main/VALD_VERSION && -s profiles-main/VALD_VERSION ]]; then + tag=$(cat profiles-main/VALD_VERSION) + fi + mkdir -p graphs for svc in vald-agent-ngt vald-lb-gateway vald-discoverer vald-manager-index do @@ -130,12 +149,6 @@ jobs: with: name: graphs path: graphs/* - - name: Update cache - if: startsWith( github.ref, 'refs/tags/') - run: | - mkdir -p profiles-main - cp -f profiles/* profiles-main/ - cp -f versions/VALD_VERSION profiles-main/ - name: Upload to vald-ci-images repository if: github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' run: | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 780ddd8b66..14b20bdb24 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -28,16 +28,21 @@ env: DATASET: fashion-mnist-784-euclidean.hdf5 jobs: dump-contexts-to-log: - if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context + detect-ci-container: + if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-deploy' + uses: ./.github/workflows/_detect-ci-container.yml e2e-stream-crud: name: "E2E test (Stream CRUD)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -73,9 +78,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-stream-crud-for-operator: name: "E2E test (Stream CRUD) for operator" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -94,6 +102,7 @@ jobs: require_helm: false require_k3d: false - name: Merge Docker image tag + shell: bash run: | IMAGE_TAGS=(${{ steps.setup_e2e.outputs.IMAGE_TAGS }}) @@ -133,9 +142,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-stream-crud-under-index-management-jobs: name: "E2E test (Stream CRUD) under index management jobs" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -175,9 +187,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-stream-crud-skip-exist-check: name: "E2E test (Stream CRUD: skip strict exist check)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -213,9 +228,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-multiapis-crud: name: "E2E test (Multi-APIs CRUD)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -247,9 +265,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-jobs: name: "E2E test (Jobs)" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -278,9 +299,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} e2e-stream-crud-with-readreplica: name: "E2E test (Stream CRUD) with read replica" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config @@ -326,9 +350,12 @@ jobs: POD_NAME: ${{ steps.deploy_vald_readreplica.outputs.POD_NAME }} e2e-stream-crud-with-mirror: name: "E2E test (Stream CRUD) with mirror" - needs: [dump-contexts-to-log] + needs: [detect-ci-container] runs-on: ubuntu-latest timeout-minutes: 60 + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} + options: "--add-host host.docker.internal:host-gateway" steps: - uses: actions/checkout@v4 - name: Set Git config diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index f72f943530..a360808379 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -75,6 +75,9 @@ jobs: name: CRUD test on remote Helm chart runs-on: ubuntu-latest timeout-minutes: 60 + needs: [detect-ci-container] + container: + image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }} steps: - uses: actions/checkout@v4 - name: Set Git config diff --git a/Makefile b/Makefile index 9986a575ac..da9f10561a 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,6 @@ $(LIB_PATH): GOPRIVATE = $(GOPKG),$(GOPKG)/apis,$(GOPKG)-client-go GOPROXY = "https://proxy.golang.org,direct" GOPATH := $(eval GOPATH := $(shell go env GOPATH))$(GOPATH) -GO_VERSION := $(eval GO_VERSION := $(shell cat versions/GO_VERSION))$(GO_VERSION) GOARCH := $(eval GOARCH := $(shell go env GOARCH))$(GOARCH) GOBIN := $(eval GOBIN := $(or $(shell go env GOBIN),$(GOPATH)/bin))$(GOBIN) GOCACHE := $(eval GOCACHE := $(shell go env GOCACHE))$(GOCACHE) @@ -74,16 +73,18 @@ CGO_ENABLED = 1 RUST_HOME ?= $(LIB_PATH)/rust RUSTUP_HOME ?= $(RUST_HOME)/rustup CARGO_HOME ?= $(RUST_HOME)/cargo -RUST_VERSION := $(eval RUST_VERSION := $(shell cat versions/RUST_VERSION))$(RUST_VERSION) BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION) -DOCKER_VERSION := $(eval DOCKER_VERSION := $(shell cat versions/DOCKER_VERSION))$(DOCKER_VERSION) +CMAKE_VERSION := $(eval CMAKE_VERSION := $(shell cat versions/CMAKE_VERSION))$(CMAKE_VERSION) +DOCKER_VERSION := $(eval DOCKER_VERSION := $(shell cat versions/DOCKER_VERSION))$(DOCKER_VERSION) FAISS_VERSION := $(eval FAISS_VERSION := $(shell cat versions/FAISS_VERSION))$(FAISS_VERSION) GOLANGCILINT_VERSION := $(eval GOLANGCILINT_VERSION := $(shell cat versions/GOLANGCILINT_VERSION))$(GOLANGCILINT_VERSION) +GO_VERSION := $(eval GO_VERSION := $(shell cat versions/GO_VERSION))$(GO_VERSION) HDF5_VERSION := $(eval HDF5_VERSION := $(shell cat versions/HDF5_VERSION))$(HDF5_VERSION) HELM_DOCS_VERSION := $(eval HELM_DOCS_VERSION := $(shell cat versions/HELM_DOCS_VERSION))$(HELM_DOCS_VERSION) HELM_VERSION := $(eval HELM_VERSION := $(shell cat versions/HELM_VERSION))$(HELM_VERSION) JAEGER_OPERATOR_VERSION := $(eval JAEGER_OPERATOR_VERSION := $(shell cat versions/JAEGER_OPERATOR_VERSION))$(JAEGER_OPERATOR_VERSION) +K3S_VERSION := $(eval K3S_VERSION := $(shell cat versions/K3S_VERSION))$(K3S_VERSION) KIND_VERSION := $(eval KIND_VERSION := $(shell cat versions/KIND_VERSION))$(KIND_VERSION) KUBECTL_VERSION := $(eval KUBECTL_VERSION := $(shell cat versions/KUBECTL_VERSION))$(KUBECTL_VERSION) KUBELINTER_VERSION := $(eval KUBELINTER_VERSION := $(shell cat versions/KUBELINTER_VERSION))$(KUBELINTER_VERSION) @@ -93,6 +94,7 @@ OTEL_OPERATOR_VERSION := $(eval OTEL_OPERATOR_VERSION := $(shell cat version PROMETHEUS_STACK_VERSION := $(eval PROMETHEUS_STACK_VERSION := $(shell cat versions/PROMETHEUS_STACK_VERSION))$(PROMETHEUS_STACK_VERSION) PROTOBUF_VERSION := $(eval PROTOBUF_VERSION := $(shell cat versions/PROTOBUF_VERSION))$(PROTOBUF_VERSION) REVIEWDOG_VERSION := $(eval REVIEWDOG_VERSION := $(shell cat versions/REVIEWDOG_VERSION))$(REVIEWDOG_VERSION) +RUST_VERSION := $(eval RUST_VERSION := $(shell cat versions/RUST_VERSION))$(RUST_VERSION) TELEPRESENCE_VERSION := $(eval TELEPRESENCE_VERSION := $(shell cat versions/TELEPRESENCE_VERSION))$(TELEPRESENCE_VERSION) VALDCLI_VERSION := $(eval VALDCLI_VERSION := $(shell cat versions/VALDCLI_VERSION))$(VALDCLI_VERSION) YQ_VERSION := $(eval YQ_VERSION := $(shell cat versions/YQ_VERSION))$(YQ_VERSION) @@ -139,10 +141,10 @@ PBGOS = $(PROTOS:apis/proto/%.proto=apis/grpc/%.pb.go) SWAGGERS = $(PROTOS:apis/proto/%.proto=apis/swagger/%.swagger.json) PBDOCS = apis/docs/v1/docs.md -LDFLAGS = -static -fPIC -pthread -std=gnu++20 -lstdc++ -lm -z relro -z now -flto=auto -march=native -mtune=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast -fomit-frame-pointer -fmerge-all-constants -funroll-loops -falign-functions=32 -ffunction-sections -fdata-sections +LDFLAGS = -static -fPIC -pthread -std=gnu++23 -lstdc++ -lm -z relro -z now -flto=auto -march=native -mtune=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast -fomit-frame-pointer -fmerge-all-constants -funroll-loops -falign-functions=32 -ffunction-sections -fdata-sections NGT_LDFLAGS = -fopenmp -lopenblas -llapack -FAISS_LDFLAGS = $(NGT_LDFLAGS) -lgfortran +FAISS_LDFLAGS = $(NGT_LDFLAGS) -lgfortran -lquadmath HDF5_LDFLAGS = -lhdf5 -lhdf5_hl -lsz -laec -lz -ldl CGO_LDFLAGS = $(FAISS_LDFLAGS) $(HDF5_LDFLAGS) @@ -150,17 +152,14 @@ ifeq ($(GOARCH),amd64) CFLAGS ?= -mno-avx512f -mno-avx512dq -mno-avx512cd -mno-avx512bw -mno-avx512vl CXXFLAGS ?= $(CFLAGS) EXTLDFLAGS ?= -m64 -NGT_EXTRA_FLAGS ?= else ifeq ($(GOARCH),arm64) CFLAGS ?= CXXFLAGS ?= $(CFLAGS) EXTLDFLAGS ?= -march=armv8-a -NGT_EXTRA_FLAGS ?= else CFLAGS ?= CXXFLAGS ?= $(CFLAGS) EXTLDFLAGS ?= -NGT_EXTRA_FLAGS ?= endif BENCH_DATASET_MD5S := $(eval BENCH_DATASET_MD5S := $(shell find $(BENCH_DATASET_MD5_DIR) -type f -regex ".*\.md5"))$(BENCH_DATASET_MD5S) @@ -622,9 +621,9 @@ $(USR_LOCAL)/include/NGT/Capi.h: -DCMAKE_C_FLAGS="$(CFLAGS)" \ -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ -DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \ - "$(NGT_EXTRA_FLAGS)" . - make -j$(CORES) -C $(TEMP_DIR)/NGT-$(NGT_VERSION) - make install -C $(TEMP_DIR)/NGT-$(NGT_VERSION) + -B $(TEMP_DIR)/NGT-$(NGT_VERSION)/build $(TEMP_DIR)/NGT-$(NGT_VERSION) + make -C $(TEMP_DIR)/NGT-$(NGT_VERSION)/build -j$(CORES) ngt + make -C $(TEMP_DIR)/NGT-$(NGT_VERSION)/build install cd $(ROOTDIR) rm -rf $(TEMP_DIR)/NGT-$(NGT_VERSION) ldconfig @@ -640,18 +639,37 @@ $(LIB_PATH)/libfaiss.a: -DBUILD_SHARED_LIBS=OFF \ -DBUILD_STATIC_EXECS=ON \ -DBUILD_TESTING=OFF \ - -DCMAKE_C_FLAGS="$(LDFLAGS)" \ - -DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \ -DFAISS_ENABLE_PYTHON=OFF \ -DFAISS_ENABLE_GPU=OFF \ -DBLA_VENDOR=OpenBLAS \ + -DCMAKE_C_FLAGS="$(LDFLAGS)" \ -DCMAKE_EXE_LINKER_FLAGS="$(FAISS_LDFLAGS)" \ - -B build . && \ - make -C build -j$(CORES) faiss && \ - make -C build install - rm -rf v$(FAISS_VERSION).tar.gz - rm -rf $(TEMP_DIR)/faiss-$(FAISS_VERSION) + -DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \ + -B $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build $(TEMP_DIR)/faiss-$(FAISS_VERSION) + make -C $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build -j$(CORES) faiss + make -C $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build install + cd $(ROOTDIR) + rm -rf $(TEMP_DIR)/v$(FAISS_VERSION).tar.gz $(TEMP_DIR)/faiss-$(FAISS_VERSION) + ldconfig + +.PHONY: cmake/install +## install CMAKE +cmake/install: + git clone --depth 1 --branch v$(CMAKE_VERSION) https://github.com/Kitware/CMake.git $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION) + cd $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION) && \ + cmake -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_TESTING=OFF \ + -DCMAKE_C_FLAGS="$(CFLAGS)" \ + -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ + -DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \ + -B $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION) + make -C $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build -j$(CORES) cmake + make -C $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build install + cd $(ROOTDIR) + rm -rf $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION) ldconfig + # -DCMAKE_USE_OPENSSL=OFF .PHONY: lint ## run lints diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index 8e01f2fb07..95b2895d74 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -18,9 +18,12 @@ ## update vald libraries including tools update/libs: \ update/chaos-mesh \ + update/cmake \ + update/docker \ update/faiss \ update/go \ update/golangci-lint \ + update/hdf5 \ update/helm \ update/helm-docs \ update/helm-operator \ @@ -33,12 +36,12 @@ update/libs: \ update/prometheus-stack \ update/protobuf \ update/reviewdog \ + update/rust \ update/telepresence \ update/vald \ update/valdcli \ update/yq \ - update/zlib \ - update/hdf5 + update/zlib .PHONY: go/download ## download Go package dependencies @@ -86,7 +89,9 @@ go/example/deps: ## install Rust package dependencies rust/deps: \ rust/install - sed -i "17s/channel = \"[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\"/channel = \"$(RUST_VERSION)\"/g" $(ROOTDIR)/rust/rust-toolchain.toml + sed -i "17s/channel = \"[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?.*\"/channel = \"$(RUST_VERSION)\"/g" $(ROOTDIR)/rust/rust-toolchain.toml + rustup toolchain install $(RUST_VERSION) + rustup default $(RUST_VERSION) cd $(ROOTDIR)/rust && $(CARGO_HOME)/bin/cargo update && cd - .PHONY: update/chaos-mesh @@ -119,7 +124,8 @@ update/golangci-lint: .PHONY: update/rust ## update rust version update/rust: - curl -fsSL https://releases.rs | grep -Po 'Stable: \K[\d.]+\s' | head -n 1 > $(ROOTDIR)/versions/RUST_VERSION + curl -fsSL https://releases.rs | grep -Po 'Stable: \K[\d.]+' | head -n 1 > $(ROOTDIR)/versions/RUST_VERSION + cp -f $(ROOTDIR)/versions/RUST_VERSION $(ROOTDIR)/rust/rust-toolchain .PHONY: update/docker ## update docker version @@ -186,6 +192,11 @@ update/ngt: update/faiss: curl -fsSL https://api.github.com/repos/facebookresearch/faiss/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/FAISS_VERSION +.PHONY: update/cmake +## update CMAKE version +update/cmake: + curl -fsSL https://api.github.com/repos/Kitware/CMAKE/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/CMAKE_VERSION + .PHONY: update/reviewdog ## update reviewdog version update/reviewdog: diff --git a/Makefile.d/docker.mk b/Makefile.d/docker.mk index 540eca3eb4..1e62d969a6 100644 --- a/Makefile.d/docker.mk +++ b/Makefile.d/docker.mk @@ -53,8 +53,6 @@ ifeq ($(REMOTE),true) --build-arg BUILDKIT_INLINE_CACHE=$(BUILDKIT_INLINE_CACHE) \ --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg RUST_VERSION=$(RUST_VERSION) \ - --build-arg DISTROLESS_IMAGE=$(DISTROLESS_IMAGE) \ - --build-arg DISTROLESS_IMAGE_TAG=$(DISTROLESS_IMAGE_TAG) \ --build-arg MAINTAINER=$(MAINTAINER) \ --sbom=true \ --provenance=mode=max \ @@ -70,8 +68,6 @@ else --build-arg BUILDKIT_INLINE_CACHE=$(BUILDKIT_INLINE_CACHE) \ --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg RUST_VERSION=$(RUST_VERSION) \ - --build-arg DISTROLESS_IMAGE=$(DISTROLESS_IMAGE) \ - --build-arg DISTROLESS_IMAGE_TAG=$(DISTROLESS_IMAGE_TAG) \ --build-arg MAINTAINER=$(MAINTAINER) \ $(EXTRA_ARGS) \ -t $(CRORG)/$(IMAGE):$(TAG) \ @@ -120,8 +116,6 @@ docker/name/agent: docker/build/agent: @make DOCKERFILE="$(ROOTDIR)/dockers/agent/core/agent/Dockerfile" \ IMAGE=$(AGENT_IMAGE) \ - DISTROLESS_IMAGE=gcr.io/distroless/cc-debian12 \ - EXTRA_ARGS="--build-arg RUST_VERSION=$(RUST_VERSION)" \ docker/build/image .PHONY: docker/name/discoverer-k8s diff --git a/Makefile.d/e2e.mk b/Makefile.d/e2e.mk index 9971b41bb4..ea978c0369 100644 --- a/Makefile.d/e2e.mk +++ b/Makefile.d/e2e.mk @@ -140,3 +140,30 @@ e2e/actions/run/job: \ make E2E_TARGET_POD_NAME=$$pod_name e2e/index/job/correction make k8s/vald/delete $(MAKE) k3d/delete + +.PHONY: e2e/actions/run/readreplica +## run GitHub Actions E2E test (Stream CRUD with read replica ) +e2e/actions/run/readreplica: \ + hack/benchmark/assets/dataset/$(E2E_DATASET_NAME) \ + minikube/restart + kubectl wait -n kube-system --for=condition=Available deployment/metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + sleep 2 + kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + kubectl wait -n kube-system --for=condition=ContainersReady pod -l k8s-app=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + sleep 3 + make k8s/vald/deploy \ + HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml + sleep 20 + kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + make k8s/vald-readreplica/deploy \ + HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml + sleep 3 + kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) + kubectl get pods + pod_name=$$(kubectl get pods --selector="app=$(LB_GATEWAY_IMAGE)" | tail -1 | awk '{print $$1}'); \ + echo $$pod_name; \ + make E2E_TARGET_POD_NAME=$$pod_name e2e/readreplica + make k8s/vald/delete + $(MAKE) minikube/delete diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 361d5b3c83..06d49345c9 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -28,9 +28,10 @@ helm-docs/install: $(BINDIR)/helm-docs $(BINDIR)/helm-docs: mkdir -p $(BINDIR) - cd $(TEMP_DIR) \ - && curl -fsSLO https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \ - && tar xzvf helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \ + TAR_NAME=helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(ARCH).tar.gz \ + && cd $(TEMP_DIR) \ + && curl -fsSL "https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/$${TAR_NAME}" -o "$(TEMP_DIR)/$${TAR_NAME}"\ + && tar xzvf "$(TEMP_DIR)/$${TAR_NAME}" \ && mv helm-docs $(BINDIR)/helm-docs .PHONY: helm/package/vald diff --git a/Makefile.d/k3d.mk b/Makefile.d/k3d.mk index 7449df203c..9532031c48 100644 --- a/Makefile.d/k3d.mk +++ b/Makefile.d/k3d.mk @@ -14,9 +14,14 @@ # limitations under the License. # -K3D_CLUSTER_NAME = "vald-cluster" -K3D_COMMAND = k3d -K3D_NODES = 5 +K3D_CLUSTER_NAME = "vald-cluster" +K3D_COMMAND = k3d +K3D_NODES = 5 +K3D_PORT = 6550 +K3D_HOST = localhost +K3D_INGRESS_PORT = 8081 +K3D_HOST_PID_MODE = true +K3D_OPTIONS = --port $(K3D_INGRESS_PORT):80@loadbalancer .PHONY: k3d/install ## install K3D @@ -32,14 +37,24 @@ $(BINDIR)/k3d: k3d/start: $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) \ --agents $(K3D_NODES) \ - --image docker.io/rancher/k3s:latest \ - --host-pid-mode=true \ - --port 8081:80@loadbalancer \ - --k3s-arg "--disable=traefik@server:*" \ - -v "/lib/modules:/lib/modules" - # $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) --agents $(K3D_NODES) -v "/lib/modules:/lib/modules" - # $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) -p "8081:80@loadbalancer" --agents $(K3D_NODES) --k3s-arg '--disable=traefik@all' - export KUBECONFIG="$(shell sudo $(K3D_COMMAND) kubeconfig merge -o $(TEMP_DIR)/k3d_$(K3D_CLUSTER_NAME)_kubeconfig.yaml $(K3D_CLUSTER_NAME))" + --image docker.io/rancher/k3s:$(K3S_VERSION) \ + --host-pid-mode=$(K3D_HOST_PID_MODE) \ + --api-port $(K3D_HOST):$(K3D_PORT) \ + -v "/lib/modules:/lib/modules" \ + $(K3D_OPTIONS) + @make k3d/config + +.PHONY: k3d/storage +## storage k3d (kubernetes in docker) cluster +k3d/storage: + kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml + kubectl get storageclass + kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' + +.PHONY: k3d/config +## config k3d (kubernetes in docker) cluster +k3d/config: + export KUBECONFIG="$(shell $(K3D_COMMAND) kubeconfig merge -o $(TEMP_DIR)/k3d_$(K3D_CLUSTER_NAME)_kubeconfig.yaml $(K3D_CLUSTER_NAME) --kubeconfig-switch-context)" .PHONY: k3d/restart ## restart k3d (kubernetes in docker) cluster @@ -47,7 +62,6 @@ k3d/restart: \ k3d/delete \ k3d/start - .PHONY: k3d/delete ## stop k3d (kubernetes in docker) cluster k3d/delete: diff --git a/Makefile.d/minikube.mk b/Makefile.d/minikube.mk index 6a329cdfd3..e668e02630 100644 --- a/Makefile.d/minikube.mk +++ b/Makefile.d/minikube.mk @@ -37,6 +37,6 @@ minikube/delete: minikube delete .PHONY: minikube/restart -minikube/restart: - @make minikube/delete - @make minikube/start +minikube/restart: \ + minikube/delete \ + minikube/start diff --git a/Makefile.d/tools.mk b/Makefile.d/tools.mk index 59b06c60d7..3502f2e879 100644 --- a/Makefile.d/tools.mk +++ b/Makefile.d/tools.mk @@ -53,9 +53,10 @@ $(GOBIN)/crlfmt: $(call go-install, github.com/cockroachdb/crlfmt) .PHONY: prettier/install -prettier/install: $(BINDIR)/prettier -$(BINDIR)/prettier: - npm config set registry http://registry.npmjs.org/ +prettier/install: $(NPM_GLOBAL_PREFIX)/bin/prettier +$(NPM_GLOBAL_PREFIX)/bin/prettier: + npm config -g set registry http://registry.npmjs.org/ + npm cache clean --force type prettier || npm install -g prettier .PHONY: reviewdog/install @@ -158,18 +159,20 @@ go/install: $(GOROOT)/bin/go $(GOROOT)/bin/go: TAR_NAME=go$(GO_VERSION).$(OS)-$(subst x86_64,amd64,$(subst aarch64,arm64,$(ARCH))).tar.gz \ - && curl -fsSLO "https://go.dev/dl/$${TAR_NAME}" \ - && tar zxf "$${TAR_NAME}" \ - && rm -rf "$${TAR_NAME}" \ - && mv go $(GOROOT) \ - && $(GOROOT)/bin/go version \ - && mkdir -p "$(GOPATH)/src" "$(GOPATH)/bin" "$(GOPATH)/pkg" + && curl -fsSL "https://go.dev/dl/$${TAR_NAME}" -o "$(TEMP_DIR)/$${TAR_NAME}" \ + && mkdir -p $(TEMP_DIR)/go \ + && tar -xzvf "$(TEMP_DIR)/$${TAR_NAME}" -C $(TEMP_DIR)/go --strip-components 1 \ + && rm -rf "$(TEMP_DIR)/$${TAR_NAME}" \ + && mv $(TEMP_DIR)/go $(GOROOT) \ + && $(GOROOT)/bin/go version .PHONY: rust/install rust/install: $(CARGO_HOME)/bin/cargo $(CARGO_HOME)/bin/cargo: curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | CARGO_HOME=${CARGO_HOME} RUSTUP_HOME=${RUSTUP_HOME} sh -s -- --default-toolchain $(RUST_VERSION) -y + rustup toolchain install $(RUST_VERSION) + rustup default $(RUST_VERSION) source "${CARGO_HOME}/env" .PHONY: zlib/install @@ -206,7 +209,7 @@ $(LIB_PATH)/libhdf5.a: $(LIB_PATH) \ mkdir -p $(TEMP_DIR)/hdf5 \ && curl -fsSL https://github.com/HDFGroup/hdf5/releases/download/$(HDF5_VERSION)/hdf5.tar.gz -o $(TEMP_DIR)/hdf5.tar.gz \ && tar -xzvf $(TEMP_DIR)/hdf5.tar.gz -C $(TEMP_DIR)/hdf5 --strip-components 2 \ - && mkdir $(TEMP_DIR)/hdf5/build \ + && mkdir -p $(TEMP_DIR)/hdf5/build \ && cd $(TEMP_DIR)/hdf5/build \ && cmake -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=OFF \ diff --git a/dockers/agent/core/agent/Dockerfile b/dockers/agent/core/agent/Dockerfile index c13f258679..4b06d95aba 100644 --- a/dockers/agent/core/agent/Dockerfile +++ b/dockers/agent/core/agent/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -32,61 +35,63 @@ ENV DEBIAN_FRONTEND=noninteractive ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=agent/core/agent ENV REPO=vald ENV RUST_HOME=/usr/loacl/lib/rust +ENV TZ=Etc/UTC +ENV USER=root ENV RUSTUP_HOME=${RUST_HOME}/rustup ENV CARGO_HOME=${RUST_HOME}/cargo ENV PATH=${CARGO_HOME}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH} +WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ liblapack-dev \ libomp-dev \ libopenblas-dev \ gfortran \ + libquadmath0 \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO}/rust -COPY rust . - -WORKDIR ${HOME}/rust/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN make RUST_VERSION="${RUST_VERSION}" rust/install \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make RUST_VERSION="${RUST_VERSION}" rust/install \ && make ngt/install \ && make faiss/install \ && make rust/target/release/${APP_NAME} \ && mv "rust/target/release/${APP_NAME}" "/usr/bin/${APP_NAME}" \ && rm -rf rust/target -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/cc-debian12:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -94,5 +99,6 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=agent COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/agent"] diff --git a/dockers/agent/core/faiss/Dockerfile b/dockers/agent/core/faiss/Dockerfile index d9755d36c1..11840f9bea 100644 --- a/dockers/agent/core/faiss/Dockerfile +++ b/dockers/agent/core/faiss/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,70 +38,61 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=agent/core/faiss ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ liblapack-dev \ libomp-dev \ libopenblas-dev \ gfortran \ + libquadmath0 \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/agent/internal -COPY pkg/agent/internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make faiss/install \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -106,6 +100,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=faiss COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/agent/core/faiss/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/faiss"] diff --git a/dockers/agent/core/ngt/Dockerfile b/dockers/agent/core/ngt/Dockerfile index f1ef1aa20e..9d527114f5 100644 --- a/dockers/agent/core/ngt/Dockerfile +++ b/dockers/agent/core/ngt/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,69 +38,59 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=agent/core/ngt ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ liblapack-dev \ libomp-dev \ libopenblas-dev \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/agent/internal -COPY pkg/agent/internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make ngt/install \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -105,6 +98,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=ngt COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/agent/core/ngt/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/ngt"] diff --git a/dockers/agent/sidecar/Dockerfile b/dockers/agent/sidecar/Dockerfile index 21cdfea4d0..dce33212cb 100644 --- a/dockers/agent/sidecar/Dockerfile +++ b/dockers/agent/sidecar/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,60 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=agent/sidecar ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/agent/internal -COPY pkg/agent/internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -96,5 +89,6 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=sidecar COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/sidecar"] diff --git a/dockers/ci/base/Dockerfile b/dockers/ci/base/Dockerfile index f6e4aae0c6..cf03fdef38 100644 --- a/dockers/ci/base/Dockerfile +++ b/dockers/ci/base/Dockerfile @@ -18,16 +18,21 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION ARG RUST_VERSION ENV APP_NAME=ci-container +ENV CC=gcc +ENV CXX=g++ ENV DEBIAN_FRONTEND=noninteractive ENV GO111MODULE=on ENV GOPATH=/go @@ -35,74 +40,74 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=ci/base ENV REPO=vald ENV RUST_HOME=/usr/loacl/lib/rust -ENV RUSTUP_HOME=${RUST_HOME}/rustup +ENV TZ=Etc/UTC +ENV USER=root ENV CARGO_HOME=${RUST_HOME}/cargo +ENV RUSTUP_HOME=${RUST_HOME}/rustup ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ + npm \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ liblapack-dev \ libomp-dev \ libopenblas-dev \ gfortran \ - curl \ + libquadmath0 \ gawk \ - git \ gnupg2 \ graphviz \ jq \ libhdf5-dev \ libaec-dev \ - nodejs \ - npm \ sed \ zip \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY . . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make RUST_VERSION="${RUST_VERSION}" rust/install \ - && sysctl -w net.ipv6.conf.all.disable_ipv6=1 \ - && sysctl -w net.ipv6.conf.default.disable_ipv6=1 \ - && sysctl -w net.ipv6.conf.lo.disable_ipv6=1 \ - && sysctl -p \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} golangci-lint/install \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} gotestfmt/install \ + && make cmake/install \ && make buf/install \ && make hdf5/install \ && make helm-docs/install \ @@ -122,3 +127,6 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ && make ngt/install \ && make faiss/install \ && rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/* +# skipcq: DOK-DL3002 +USER root:root +ENTRYPOINT ["/bin/bash"] diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index d7409e637e..16d0cbfff5 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -18,16 +18,21 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 -FROM mcr.microsoft.com/vscode/devcontainers/base:debian +# skipcq: DOK-DL3026,DOK-DL3007 +FROM mcr.microsoft.com/devcontainers/base:ubuntu22.04 ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION ARG RUST_VERSION ENV APP_NAME=dev-container +ENV CC=gcc +ENV CXX=g++ ENV DEBIAN_FRONTEND=noninteractive ENV GO111MODULE=on ENV GOPATH=/go @@ -35,70 +40,94 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=dev ENV REPO=vald ENV RUST_HOME=/usr/loacl/lib/rust +ENV TZ=Etc/UTC +ENV USER=root ENV RUSTUP_HOME=${RUST_HOME}/rustup ENV CARGO_HOME=${RUST_HOME}/cargo ENV PATH=${CARGO_HOME}/bin:${GOPATH}/bin:${GOROOT}/bin:${RUSTUP_HOME}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ + && apt-get update -y \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + gnupg \ + software-properties-common \ + && add-apt-repository ppa:ubuntu-toolchain-r/test -y \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ - curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ liblapack-dev \ libomp-dev \ libopenblas-dev \ gfortran \ - curl \ + libquadmath0 \ gawk \ - git \ gnupg2 \ graphviz \ jq \ libhdf5-dev \ libaec-dev \ - nodejs \ - npm \ sed \ zip \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY . . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make RUST_VERSION="${RUST_VERSION}" rust/install \ + && curl -fsSL https://deb.nodesource.com/setup_current.x | bash - \ + && apt-get clean \ + && apt-get update -y \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends --fix-missing nodejs \ + && npm install -g npm@latest \ + && apt-get clean \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make delve/install \ + && make gomodifytags/install \ + && make gopls/install \ + && make gotests/install \ + && make impl/install \ + && make staticcheck/install \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} golangci-lint/install \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} gotestfmt/install \ + && make cmake/install \ && make buf/install \ && make hdf5/install \ && make helm-docs/install \ @@ -115,13 +144,8 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ && make minikube/install \ && make stern/install \ && make telepresence/install \ - && echo "installing golang vscode extension dependencies" \ - && make delve/install \ - && make gomodifytags/install \ - && make gopls/install \ - && make gotests/install \ - && make impl/install \ - && make staticcheck/install \ && make ngt/install \ && make faiss/install \ && rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/* +# skipcq: DOK-DL3002 +USER root:root diff --git a/dockers/discoverer/k8s/Dockerfile b/dockers/discoverer/k8s/Dockerfile index 28fd4770c7..c299a75482 100644 --- a/dockers/discoverer/k8s/Dockerfile +++ b/dockers/discoverer/k8s/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=discoverer/k8s ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=discoverer COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/discoverer/k8s/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/discoverer"] diff --git a/dockers/gateway/filter/Dockerfile b/dockers/gateway/filter/Dockerfile index b2f5478a5c..0f654a91fb 100644 --- a/dockers/gateway/filter/Dockerfile +++ b/dockers/gateway/filter/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=gateway/filter ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=filter COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/gateway/filter/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/filter"] diff --git a/dockers/gateway/lb/Dockerfile b/dockers/gateway/lb/Dockerfile index bf78cc7ad8..ef4e7f948b 100644 --- a/dockers/gateway/lb/Dockerfile +++ b/dockers/gateway/lb/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=gateway/lb ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=lb COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/gateway/lb/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/lb"] diff --git a/dockers/gateway/mirror/Dockerfile b/dockers/gateway/mirror/Dockerfile index c52c633a04..0fab8b0ae8 100644 --- a/dockers/gateway/mirror/Dockerfile +++ b/dockers/gateway/mirror/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=gateway/mirror ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=mirror COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/gateway/mirror/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/mirror"] diff --git a/dockers/index/job/correction/Dockerfile b/dockers/index/job/correction/Dockerfile index 269648c226..e7722176c1 100644 --- a/dockers/index/job/correction/Dockerfile +++ b/dockers/index/job/correction/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=index/job/correction ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=index-correction COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/index/job/correction/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/index-correction"] diff --git a/dockers/index/job/creation/Dockerfile b/dockers/index/job/creation/Dockerfile index 6af94e2436..e9edc205da 100644 --- a/dockers/index/job/creation/Dockerfile +++ b/dockers/index/job/creation/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=index/job/creation ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=index-creation COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/index/job/creation/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/index-creation"] diff --git a/dockers/index/job/readreplica/rotate/Dockerfile b/dockers/index/job/readreplica/rotate/Dockerfile index 4fac5a23a2..c529c6c2f9 100644 --- a/dockers/index/job/readreplica/rotate/Dockerfile +++ b/dockers/index/job/readreplica/rotate/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=index/job/readreplica/rotate ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=readreplica-rotate COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/index/job/readreplica/rotate/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/readreplica-rotate"] diff --git a/dockers/index/job/save/Dockerfile b/dockers/index/job/save/Dockerfile index 2af2997b22..0f85ffd49d 100644 --- a/dockers/index/job/save/Dockerfile +++ b/dockers/index/job/save/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=index/job/save ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=index-save COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/index/job/save/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/index-save"] diff --git a/dockers/index/operator/Dockerfile b/dockers/index/operator/Dockerfile index ab6931a089..401709102b 100644 --- a/dockers/index/operator/Dockerfile +++ b/dockers/index/operator/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=index/operator ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=index-operator COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/index/operator/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/index-operator"] diff --git a/dockers/manager/index/Dockerfile b/dockers/manager/index/Dockerfile index 0475251f4c..6511753f3d 100644 --- a/dockers/manager/index/Dockerfile +++ b/dockers/manager/index/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=manager/index ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=index COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/manager/index/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/index"] diff --git a/dockers/operator/helm/Dockerfile b/dockers/operator/helm/Dockerfile index 1e7f1a4bf5..f7aa160840 100644 --- a/dockers/operator/helm/Dockerfile +++ b/dockers/operator/helm/Dockerfile @@ -19,13 +19,16 @@ ARG UPX_OPTIONS=-9 ARG OPERATOR_SDK_VERSION=latest -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM quay.io/operator-framework/helm-operator:${OPERATOR_SDK_VERSION} AS operator -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -38,55 +41,49 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=operator/helm ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} +COPY --from=operator /usr/local/bin/${APP_NAME} /usr/bin/${APP_NAME} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ upx \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/charts -COPY charts . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/hack -COPY hack . -COPY --from=operator /usr/local/bin/${APP_NAME} /usr/bin/${APP_NAME} - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && mkdir -p /opt/helm/charts \ && { \ echo "---"; \ @@ -103,7 +100,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ && make GOARCH=${TARGETARCH} GOOS=${TARGETOS} helm/schema/vald-helm-operator \ && cp -r charts/* /opt/helm/charts/ \ && upx "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -114,5 +111,6 @@ COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} COPY --from=builder /opt/helm/watches.yaml /opt/helm/watches.yaml COPY --from=builder /opt/helm/charts/vald /opt/helm/charts/vald COPY --from=builder /opt/helm/charts/vald-helm-operator /opt/helm/charts/vald-helm-operator +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/helm-operator", "run", "--watches-file=/opt/helm/watches.yaml"] diff --git a/dockers/readreplica/job/readreplica/rotate/Dockerfile b/dockers/readreplica/job/readreplica/rotate/Dockerfile deleted file mode 100644 index f04b8fd16f..0000000000 --- a/dockers/readreplica/job/readreplica/rotate/Dockerfile +++ /dev/null @@ -1,110 +0,0 @@ -# syntax = docker/dockerfile:latest -# -# Copyright (C) 2019-2024 vdaas.org vald team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go - -ARG RUNTIME_IMAGE=gcr.io/distroless/static -ARG RUNTIME_IMAGE_TAG=nonroot -ARG UPX_OPTIONS=-9 -ARG MAINTAINER="vdaas.org vald team " - -FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder -LABEL maintainer="${MAINTAINER}" - -ARG TARGETARCH -ARG TARGETOS -ARG GO_VERSION - -ENV GO111MODULE=on -ENV DEBIAN_FRONTEND=noninteractive -ENV INITRD=No -ENV LANG=en_US.UTF-8 -ENV GOROOT=/opt/go -ENV GOPATH=/go -ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin:/usr/local/bin -ENV ORG=vdaas -ENV REPO=vald -ENV PKG=readreplica/job/readreplica/rotate - -ENV APP_NAME=readreplica-rotate - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - ca-certificates \ - cmake \ - curl \ - g++ \ - gcc \ - git \ - unzip \ - upx \ - && ldconfig \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . - -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION=${GO_VERSION} go/install \ - && make go/download - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} - -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GOARCH=${TARGETARCH} GOOS=${TARGETOS} REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ - && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -RUN cp sample.yaml /tmp/config.yaml - -FROM --platform=${TARGETPLATFORM} ${RUNTIME_IMAGE}:${RUNTIME_IMAGE_TAG} -ARG MAINTAINER="vdaas.org vald team " -LABEL maintainer="${MAINTAINER}" - -ENV APP_NAME=readreplica-rotate - -COPY --from=builder /usr/bin/${APP_NAME} /go/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml - -USER nonroot:nonroot - -ENTRYPOINT ["/go/bin/readreplica-rotate"] diff --git a/dockers/tools/benchmark/job/Dockerfile b/dockers/tools/benchmark/job/Dockerfile index a75d7645d7..0f07796cae 100644 --- a/dockers/tools/benchmark/job/Dockerfile +++ b/dockers/tools/benchmark/job/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,66 +38,58 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=tools/benchmark/job ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ libhdf5-dev \ libaec-dev \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make hdf5/install \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -102,6 +97,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=job COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/tools/benchmark/job/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/job"] diff --git a/dockers/tools/benchmark/operator/Dockerfile b/dockers/tools/benchmark/operator/Dockerfile index 56a011fcab..6268951b66 100644 --- a/dockers/tools/benchmark/operator/Dockerfile +++ b/dockers/tools/benchmark/operator/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,59 +38,50 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=tools/benchmark/operator ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -95,6 +89,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=operator COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/tools/benchmark/operator/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/operator"] diff --git a/dockers/tools/cli/loadtest/Dockerfile b/dockers/tools/cli/loadtest/Dockerfile index f92a30cbe1..7f330682a3 100644 --- a/dockers/tools/cli/loadtest/Dockerfile +++ b/dockers/tools/cli/loadtest/Dockerfile @@ -18,11 +18,14 @@ # DO_NOT_EDIT this Dockerfile is generated by hack/docker/gen/main.go ARG UPX_OPTIONS=-9 -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM ghcr.io/vdaas/vald/vald-buildbase:nightly AS builder ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER root:root + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -35,68 +38,58 @@ ENV GOROOT=/opt/go ENV HOME=/root ENV INITRD=No ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 ENV ORG=vdaas ENV PKG=tools/cli/loadtest ENV REPO=vald +ENV TZ=Etc/UTC +ENV USER=root ENV PATH=${GOPATH}/bin:${GOROOT}/bin:/usr/local/bin:${PATH} +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN --mount=type=bind,target=.,rw \ + --mount=type=tmpfs,target=/tmp \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}"\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ curl \ + tzdata \ + locales \ git \ cmake \ - g++ \ gcc \ + g++ \ unzip \ + libssl-dev \ libhdf5-dev \ libaec-dev \ && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -COPY Makefile . -COPY .git . -COPY go.mod . -COPY go.sum . -COPY cmd/${PKG}/sample.yaml /tmp/config.yaml -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d -COPY Makefile.d . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions -COPY versions . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/hack/benchmark/assets/x1b -COPY hack/benchmark/assets/x1b . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal -COPY internal . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc -COPY apis/grpc . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} -COPY pkg/${PKG} . -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} -COPY cmd/${PKG} . - -WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} -#skipcq: DOK-W1001, DOK-SC2086 -RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install \ - && make go/download \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/install \ + && make GOPATH="${GOPATH}" GOROOT="${GOROOT}" GO_VERSION="${GO_VERSION}" go/download \ && make hdf5/install \ && make GOARCH="${TARGETARCH}" GOOS="${TARGETOS}" REPO="${ORG}" NAME="${REPO}" cmd/${PKG}/${APP_NAME} \ && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM gcr.io/distroless/static:nonroot ARG MAINTAINER="vdaas.org vald team " LABEL maintainer="${MAINTAINER}" @@ -104,6 +97,7 @@ LABEL maintainer="${MAINTAINER}" ENV APP_NAME=loadtest COPY --from=builder /usr/bin/${APP_NAME} /usr/bin/${APP_NAME} -COPY --from=builder /tmp/config.yaml /etc/server/config.yaml +COPY cmd/tools/cli/loadtest/sample.yaml /etc/server/config.yaml +# skipcq: DOK-DL3002 USER nonroot:nonroot ENTRYPOINT ["/usr/bin/loadtest"] diff --git a/example/client/go.mod b/example/client/go.mod index 79923afce1..aaf39d0202 100644 --- a/example/client/go.mod +++ b/example/client/go.mod @@ -11,9 +11,9 @@ replace ( golang.org/x/crypto => golang.org/x/crypto v0.25.0 golang.org/x/net => golang.org/x/net v0.27.0 golang.org/x/text => golang.org/x/text v0.16.0 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf google.golang.org/grpc => google.golang.org/grpc v1.65.0 google.golang.org/protobuf => google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 @@ -37,6 +37,6 @@ require ( golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/example/client/go.sum b/example/client/go.sum index 80e249dcb9..eec5994ecc 100644 --- a/example/client/go.sum +++ b/example/client/go.sum @@ -33,10 +33,10 @@ golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f h1:RARaIm8pxYuxyNPbBQf5igT7XdOyCNtat1qAT2ZxjU4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf h1:GillM0Ef0pkZPIB+5iO6SDK+4T9pf6TpaYR6ICD5rVE= +google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:OFMYQFHJ4TM3JRlWDZhJbZfra2uqc3WLBZiaaqP4DtU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/go.mod b/go.mod index 9d60dce779..2845930a58 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ replace ( cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.13.5 cloud.google.com/go/storage => cloud.google.com/go/storage v1.43.0 cloud.google.com/go/trace => cloud.google.com/go/trace v1.10.11 - code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20240725181214-870a2a4a34a6 + code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20240730181512-d61d30bca0a4 contrib.go.opencensus.io/exporter/aws => contrib.go.opencensus.io/exporter/aws v0.0.0-20230502192102-15967c811cec contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus v0.4.2 contrib.go.opencensus.io/integrations/ocsql => contrib.go.opencensus.io/integrations/ocsql v0.1.7 @@ -44,7 +44,7 @@ replace ( github.com/akrylysov/pogreb => github.com/akrylysov/pogreb v0.10.2 github.com/antihax/optional => github.com/antihax/optional v1.0.0 github.com/armon/go-socks5 => github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 - github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.55.3 + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.30.3 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.27.27 @@ -154,7 +154,7 @@ replace ( github.com/google/gofuzz => github.com/google/gofuzz v1.2.0 github.com/google/martian => github.com/google/martian v2.1.0+incompatible github.com/google/martian/v3 => github.com/google/martian/v3 v3.3.3 - github.com/google/pprof => github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 + github.com/google/pprof => github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 github.com/google/shlex => github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/subcommands => github.com/google/subcommands v1.2.0 github.com/google/uuid => github.com/google/uuid v1.6.0 @@ -192,7 +192,7 @@ replace ( github.com/jstemmer/go-junit-report => github.com/jstemmer/go-junit-report v1.0.0 github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.7.0 github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0 - github.com/klauspost/compress => github.com/klauspost/compress v1.17.10-0.20240719110028-cfab8bd586ec + github.com/klauspost/compress => github.com/klauspost/compress v1.17.10-0.20240726110848-d76f801616d1 github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.2.8 github.com/kpango/fastime => github.com/kpango/fastime v1.1.9 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 @@ -225,8 +225,8 @@ replace ( github.com/niemeyer/pretty => github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e github.com/nxadm/tail => github.com/nxadm/tail v1.4.11 github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.16.5 - github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.19.0 - github.com/onsi/gomega => github.com/onsi/gomega v1.34.0 + github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.19.1 + github.com/onsi/gomega => github.com/onsi/gomega v1.34.1 github.com/peterbourgon/diskv => github.com/peterbourgon/diskv v2.0.1+incompatible github.com/phpdave11/gofpdf => github.com/phpdave11/gofpdf v1.4.2 github.com/phpdave11/gofpdi => github.com/phpdave11/gofpdi v1.0.13 @@ -316,11 +316,11 @@ replace ( gonum.org/v1/plot => gonum.org/v1/plot v0.14.0 google.golang.org/api => google.golang.org/api v0.189.0 google.golang.org/appengine => google.golang.org/appengine v1.6.8 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf google.golang.org/grpc => google.golang.org/grpc v1.65.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 google.golang.org/protobuf => google.golang.org/protobuf v1.34.2 gopkg.in/check.v1 => gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/inconshreveable/log15.v2 => gopkg.in/inconshreveable/log15.v2 v2.16.0 @@ -329,16 +329,16 @@ replace ( gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1 honnef.co/go/tools => honnef.co/go/tools v0.4.7 - k8s.io/api => k8s.io/api v0.30.2 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.30.2 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.2 - k8s.io/client-go => k8s.io/client-go v0.30.2 - k8s.io/component-base => k8s.io/component-base v0.30.2 + k8s.io/api => k8s.io/api v0.30.3 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.3 + k8s.io/apimachinery => k8s.io/apimachinery v0.30.3 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.3 + k8s.io/client-go => k8s.io/client-go v0.30.3 + k8s.io/component-base => k8s.io/component-base v0.30.3 k8s.io/klog/v2 => k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f - k8s.io/kubernetes => k8s.io/kubernetes v0.30.2 - k8s.io/metrics => k8s.io/metrics v0.30.2 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240730131305-7a9a4e85957e + k8s.io/kubernetes => k8s.io/kubernetes v0.30.3 + k8s.io/metrics => k8s.io/metrics v0.30.3 nhooyr.io/websocket => nhooyr.io/websocket v1.8.11 rsc.io/pdf => rsc.io/pdf v0.1.1 sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.18.4 @@ -405,19 +405,19 @@ require ( golang.org/x/tools v0.23.0 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.14.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a - google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a + google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f + google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.30.2 - k8s.io/apimachinery v0.30.2 + k8s.io/api v0.30.3 + k8s.io/apimachinery v0.30.3 k8s.io/cli-runtime v0.0.0-00010101000000-000000000000 - k8s.io/client-go v0.30.2 + k8s.io/client-go v0.30.3 k8s.io/metrics v0.0.0-00010101000000-000000000000 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 - sigs.k8s.io/yaml v1.3.0 + sigs.k8s.io/yaml v1.4.0 ) require ( @@ -425,7 +425,7 @@ require ( cloud.google.com/go/auth v0.7.2 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.11 // indirect + cloud.google.com/go/iam v1.1.12 // indirect filippo.io/edwards25519 v1.1.0 // indirect git.sr.ht/~sbinet/gg v0.5.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect @@ -437,7 +437,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -447,7 +447,7 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-pdf/fpdf v0.9.0 // indirect github.com/go-toolsmith/astcopy v1.0.2 // indirect @@ -461,7 +461,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 // indirect + github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/wire v0.6.0 // indirect @@ -506,7 +506,7 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.25.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/exp/typeparams v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/image v0.18.0 // indirect golang.org/x/mod v0.19.0 // indirect @@ -514,11 +514,11 @@ require ( golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.189.0 // indirect - google.golang.org/genproto v0.0.0-20240725213756-90e476079158 // indirect + google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.30.1 // indirect - k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect diff --git a/go.sum b/go.sum index 5e3d7727bb..61c1e911aa 100644 --- a/go.sum +++ b/go.sum @@ -4,22 +4,21 @@ cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w= cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/accessapproval v1.7.10/go.mod h1:iOXZj2B/c3N8nf2PYOB3iuRKCbnkn19/F6fqaa2zhn8= +cloud.google.com/go/accessapproval v1.7.11/go.mod h1:KGK3+CLDWm4BvjN0wFtZqdFUGhxlTvTF6PhAwQJGL4M= cloud.google.com/go/accesscontextmanager v1.8.9/go.mod h1:IXvQesVgOC7aXgK9OpYFn5eWnzz8fazegIiJ5WnCOVw= -cloud.google.com/go/accesscontextmanager v1.8.10/go.mod h1:hdwcvyIn3NXgjSiUanbL7drFlOl39rAoj5SKBrNVtyA= +cloud.google.com/go/accesscontextmanager v1.8.11/go.mod h1:nwPysISS3KR5qXipAU6cW/UbDavDdTBBgPohbkhGSok= cloud.google.com/go/aiplatform v1.68.0/go.mod h1:105MFA3svHjC3Oazl7yjXAmIR89LKhRAeNdnDKJczME= -cloud.google.com/go/analytics v0.23.5/go.mod h1:J54PE6xjbmbTA5mOOfX5ibafOs9jyY7sFKTTiAnIIY4= -cloud.google.com/go/apigateway v1.6.10/go.mod h1:3bRZnd+TDYONxRw2W8LB1jG3pDONS7GHJXMm5+BtQ+k= -cloud.google.com/go/apigeeconnect v1.6.10/go.mod h1:MZf8FZK+0JZBcncSSnUkzWw2n2fQnEdIvfI6J7hGcEY= -cloud.google.com/go/apigeeregistry v0.8.8/go.mod h1:0pDUUsNGiqCuBlD0VoPX2ssug6/vJ6BBPg8o4qPkE4k= -cloud.google.com/go/appengine v1.8.10/go.mod h1:4jh9kPp01PeN//i+yEHjIQ5153f/F9q/CDbNTMYBlU4= -cloud.google.com/go/area120 v0.8.10/go.mod h1:vTEko4eg1VkkkEzWDjLtMwBHgm7L4x8HgWE8fgEUd5k= -cloud.google.com/go/artifactregistry v1.14.12/go.mod h1:00qcBxCdu0SKIYPhFOymrsJpdacjBHVSiCsRkyqlRUA= -cloud.google.com/go/asset v1.19.4/go.mod h1:zSEhgb9eNLeBcl4eSO/nsrh1MyUNCBynvyRaFnXMaeY= -cloud.google.com/go/assuredworkloads v1.11.10/go.mod h1:x6pCPBbTVjXbAWu35spKLY3AU4Pmcn4GeXnkZGxOVhU= +cloud.google.com/go/analytics v0.23.6/go.mod h1:cFz5GwWHrWQi8OHKP9ep3Z4pvHgGcG9lPnFQ+8kXsNo= +cloud.google.com/go/apigateway v1.6.11/go.mod h1:4KsrYHn/kSWx8SNUgizvaz+lBZ4uZfU7mUDsGhmkWfM= +cloud.google.com/go/apigeeconnect v1.6.11/go.mod h1:iMQLTeKxtKL+sb0D+pFlS/TO6za2IUOh/cwMEtn/4g0= +cloud.google.com/go/apigeeregistry v0.8.9/go.mod h1:4XivwtSdfSO16XZdMEQDBCMCWDp3jkCBRhVgamQfLSA= +cloud.google.com/go/appengine v1.8.11/go.mod h1:xET3coaDUj+OP4TgnZlgQ+rG2R9fG2nblya13czP56Q= +cloud.google.com/go/area120 v0.8.11/go.mod h1:VBxJejRAJqeuzXQBbh5iHBYUkIjZk5UzFZLCXmzap2o= +cloud.google.com/go/artifactregistry v1.14.13/go.mod h1:zQ/T4xoAFPtcxshl+Q4TJBgsy7APYR/BLd2z3xEAqRA= +cloud.google.com/go/asset v1.19.5/go.mod h1:sqyLOYaLLfc4ACcn3YxqHno+J7lRt9NJTdO50zCUcY0= +cloud.google.com/go/assuredworkloads v1.11.11/go.mod h1:vaYs6+MHqJvLKYgZBOsuuOhBgNNIguhRU0Kt7JTGcnI= cloud.google.com/go/auth v0.2.1/go.mod h1:khQRBNrvNoHiHhV1iu2x8fSnlNbCaVHilznW5MAI5GY= cloud.google.com/go/auth v0.3.0/go.mod h1:lBv6NKTWp8E3LPzmO1TbiiRKc4drLOfHsgmlH9ogv5w= -cloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro= cloud.google.com/go/auth v0.4.2/go.mod h1:Kqvlz1cf1sNA0D+sYJnkPQOP+JMHkuHeIgVmCRtZOLc= cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s= cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= @@ -30,21 +29,21 @@ cloud.google.com/go/auth v0.7.2/go.mod h1:VEc4p5NNxycWQTMQEDQF0bd6aTMb6VgYDXEwiJ cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= -cloud.google.com/go/automl v1.13.10/go.mod h1:I5nlZ4sBYIX90aBwv3mm5A0W6tlGbzrJ4nkaErdsmAk= -cloud.google.com/go/baremetalsolution v1.2.9/go.mod h1:eFlsoR4Im039D+EVn1fKXEKWNPoMW2ewXBTHmjEZxlM= -cloud.google.com/go/batch v1.9.1/go.mod h1:UGOBIGCUNo9NPeJ4VvmGpnTbE8vTewNhFaI/ZcQZaHk= -cloud.google.com/go/beyondcorp v1.0.9/go.mod h1:xa0eU8tIbYVraMOpRh5V9PirdYROvTUcPayJW9UlSNs= +cloud.google.com/go/automl v1.13.11/go.mod h1:oMJdXRDOVC+Eq3PnGhhxSut5Hm9TSyVx1aLEOgerOw8= +cloud.google.com/go/baremetalsolution v1.2.10/go.mod h1:eO2c2NMRy5ytcNPhG78KPsWGNsX5W/tUsCOWmYihx6I= +cloud.google.com/go/batch v1.9.2/go.mod h1:smqwS4sleDJVAEzBt/TzFfXLktmWjFNugGDWl8coKX4= +cloud.google.com/go/beyondcorp v1.0.10/go.mod h1:G09WxvxJASbxbrzaJUMVvNsB1ZiaKxpbtkjiFtpDtbo= cloud.google.com/go/bigquery v1.62.0/go.mod h1:5ee+ZkF1x/ntgCsFQJAQTM3QkAZOecfCmvxhkJsWRSA= cloud.google.com/go/bigtable v1.18.1/go.mod h1:NAVyfJot9jlo+KmgWLUJ5DJGwNDoChzAcrecLpmuAmY= cloud.google.com/go/bigtable v1.20.0/go.mod h1:upJDn8frsjzpRMfybiWkD1PG6WCCL7CRl26MgVeoXY4= -cloud.google.com/go/bigtable v1.27.2-0.20240725222120-ce31365acc54/go.mod h1:NmJ2jfoB34NxQyk4w7UCchopqE9r+a186ewvGrM79TI= -cloud.google.com/go/billing v1.18.8/go.mod h1:oFsuKhKiuxK7dDQ4a8tt5/1cScEo4IzhssWj6TTdi6k= -cloud.google.com/go/binaryauthorization v1.8.6/go.mod h1:GAfktMiQW14Y67lIK5q9QSbzYc4NE/xIpQemVRhIVXc= -cloud.google.com/go/certificatemanager v1.8.4/go.mod h1:knD4QGjaogN6hy/pk1f2Cz1fhU8oYeYSF710RRf+d6k= -cloud.google.com/go/channel v1.17.10/go.mod h1:TzcYuXlpeex8O483ofkxbY/DKRF49NBumZTJPvjstVA= -cloud.google.com/go/cloudbuild v1.16.4/go.mod h1:YSNmtWgg9lmL4st4+lej1XywNEUQnbyA/F+DdXPBevA= -cloud.google.com/go/clouddms v1.7.9/go.mod h1:U2j8sOFtsIovea96mz2joyNMULl43TGadf7tOAUKKzs= -cloud.google.com/go/cloudtasks v1.12.11/go.mod h1:uDR/oUmPZqL2rNz9M9MXvm07hkkLnvvUORbud8MA5p4= +cloud.google.com/go/bigtable v1.27.2-0.20240730134218-123c88616251/go.mod h1:avmXcmxVbLJAo9moICRYMgDyTTPoV0MA0lHKnyqV4fQ= +cloud.google.com/go/billing v1.18.9/go.mod h1:bKTnh8MBfCMUT1fzZ936CPN9rZG7ZEiHB2J3SjIjByc= +cloud.google.com/go/binaryauthorization v1.8.7/go.mod h1:cRj4teQhOme5SbWQa96vTDATQdMftdT5324BznxANtg= +cloud.google.com/go/certificatemanager v1.8.5/go.mod h1:r2xINtJ/4xSz85VsqvjY53qdlrdCjyniib9Jp98ZKKM= +cloud.google.com/go/channel v1.17.11/go.mod h1:gjWCDBcTGQce/BSMoe2lAqhlq0dIRiZuktvBKXUawp0= +cloud.google.com/go/cloudbuild v1.16.5/go.mod h1:HXLpZ8QeYZgmDIWpbl9Gs22p6o6uScgQ/cV9HF9cIZU= +cloud.google.com/go/clouddms v1.7.10/go.mod h1:PzHELq0QDyA7VaD9z6mzh2mxeBz4kM6oDe8YxMxd4RA= +cloud.google.com/go/cloudtasks v1.12.12/go.mod h1:8UmM+duMrQpzzRREo0i3x3TrFjsgI/3FQw3664/JblA= cloud.google.com/go/compute v1.27.4/go.mod h1:7JZS+h21ERAGHOy5qb7+EPyXlQwzshzrx1x6L9JhTqU= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= @@ -52,112 +51,113 @@ cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1h cloud.google.com/go/compute/metadata v0.4.0/go.mod h1:SIQh1Kkb4ZJ8zJ874fqVkslA29PRXuleyj6vOzlbK7M= cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= -cloud.google.com/go/contactcenterinsights v1.13.5/go.mod h1:/27aGOSszuoT547CX4kTbF+4nMv3EIXN8+z+dJcMZco= -cloud.google.com/go/container v1.37.3/go.mod h1:XKwtVfsTBsnZ9Ve1Pw2wkjk5kSjJqsHl3oBrbbi4w/M= -cloud.google.com/go/containeranalysis v0.12.0/go.mod h1:a3Yo1yk1Dv4nVmlxcJWOJDqsnzy5I1HmETg2UGlERhs= +cloud.google.com/go/contactcenterinsights v1.13.6/go.mod h1:mL+DbN3pMQGaAbDC4wZhryLciwSwHf5Tfk4Itr72Zyk= +cloud.google.com/go/container v1.38.0/go.mod h1:U0uPBvkVWOJGY/0qTVuPS7NeafFEUsHSPqT5pB8+fCY= +cloud.google.com/go/containeranalysis v0.12.1/go.mod h1:+/lcJIQSFt45TC0N9Nq7/dPbl0isk6hnC4EvBBqyXsM= cloud.google.com/go/datacatalog v1.20.3/go.mod h1:AKC6vAy5urnMg5eJK3oUjy8oa5zMbiY33h125l8lmlo= -cloud.google.com/go/datacatalog v1.20.4/go.mod h1:71PDwywIYkNgSXdUU3H0mkTp3j15aahfYJ1CY3DogtU= -cloud.google.com/go/dataflow v0.9.10/go.mod h1:lkhCwyVAOR4cKx+TzaxFbfh0tJcBVqxyIN97TDc/OJ8= -cloud.google.com/go/dataform v0.9.7/go.mod h1:zJp0zOSCKHgt2IxTQ90vNeDfT7mdqFA8ZzrYIsxTEM0= -cloud.google.com/go/datafusion v1.7.10/go.mod h1:MYRJjIUs2kVTbYySSp4+foNyq2MfgKTLMcsquEjbapM= -cloud.google.com/go/datalabeling v0.8.10/go.mod h1:8+IBTdU0te7w9b7BoZzUl05XgPvgqOrxQMzoP47skGM= -cloud.google.com/go/dataplex v1.18.1/go.mod h1:G5+muC3D5rLSHG9uKACs5WfRtthIVwyUJSIXi2Wzp30= -cloud.google.com/go/dataproc/v2 v2.5.2/go.mod h1:KCr6aYKulU4Am8utvRoXKe1L2hPkfX9Ox0m/rvenUjU= -cloud.google.com/go/dataqna v0.8.10/go.mod h1:e6Ula5UmCrbT7jOI6zZDwHHtAsDdKHKDrHSkj0pDlAQ= +cloud.google.com/go/datacatalog v1.20.5/go.mod h1:DB0QWF9nelpsbB0eR/tA0xbHZZMvpoFD1XFy3Qv/McI= +cloud.google.com/go/dataflow v0.9.11/go.mod h1:CCLufd7I4pPfyp54qMgil/volrL2ZKYjXeYLfQmBGJs= +cloud.google.com/go/dataform v0.9.8/go.mod h1:cGJdyVdunN7tkeXHPNosuMzmryx55mp6cInYBgxN3oA= +cloud.google.com/go/datafusion v1.7.11/go.mod h1:aU9zoBHgYmoPp4dzccgm/Gi4xWDMXodSZlNZ4WNeptw= +cloud.google.com/go/datalabeling v0.8.11/go.mod h1:6IGUV3z7hlkAU5ndKVshv/8z+7pxE+k0qXsEjyzO1Xg= +cloud.google.com/go/dataplex v1.18.2/go.mod h1:NuBpJJMGGQn2xctX+foHEDKRbizwuiHJamKvvSteY3Q= +cloud.google.com/go/dataproc/v2 v2.5.3/go.mod h1:RgA5QR7v++3xfP7DlgY3DUmoDSTaaemPe0ayKrQfyeg= +cloud.google.com/go/dataqna v0.8.11/go.mod h1:74Icl1oFKKZXPd+W7YDtqJLa+VwLV6wZ+UF+sHo2QZQ= cloud.google.com/go/datastore v1.17.1/go.mod h1:mtzZ2HcVtz90OVrEXXGDc2pO4NM1kiBQy8YV4qGe0ZM= -cloud.google.com/go/datastream v1.10.9/go.mod h1:LvUG7tBqMn9zDkgj5HlefDzaOth8ohVITF8qTtqAINw= -cloud.google.com/go/deploy v1.19.3/go.mod h1:Ut73ILRKoxtcIWeRJyYwuhBAckuSE1KJXlSX38hf4B0= -cloud.google.com/go/dialogflow v1.54.3/go.mod h1:Sm5uznNq8Vrj7R+Uc84qz41gW2AXRZeWgvJ9owKZw9g= -cloud.google.com/go/dlp v1.14.3/go.mod h1:iyhOlJCSAGNP2z5YPoBjV+M9uhyiUuxjZDYqbvO3WMM= -cloud.google.com/go/documentai v1.30.4/go.mod h1:1UqovvxIySy/sQwZcU1O+tm4qA/jnzAwzZLRIhFmhSk= -cloud.google.com/go/domains v0.9.10/go.mod h1:8yArcduQ2fDThBQlnDSwxrkGRgduW8KK2Y/nlL1IU2o= -cloud.google.com/go/edgecontainer v1.2.4/go.mod h1:QiHvO/Xc/8388oPuYZfHn9BpKx3dz1jWSi8Oex5MX6w= +cloud.google.com/go/datastream v1.10.10/go.mod h1:NqchuNjhPlISvWbk426/AU/S+Kgv7srlID9P5XOAbtg= +cloud.google.com/go/deploy v1.20.0/go.mod h1:PaOfS47VrvmYnxG5vhHg0KU60cKeWcqyLbMBjxS8DW8= +cloud.google.com/go/dialogflow v1.55.0/go.mod h1:0u0hSlJiFpMkMpMNoFrQETwDjaRm8Q8hYKv+jz5JeRA= +cloud.google.com/go/dlp v1.15.0/go.mod h1:LtPZxZAenBXKzvWIOB2hdHIXuEcK0wW0En8//u+/nNA= +cloud.google.com/go/documentai v1.30.5/go.mod h1:5ajlDvaPyl9tc+K/jZE8WtYIqSXqAD33Z1YAYIjfad4= +cloud.google.com/go/domains v0.9.11/go.mod h1:efo5552kUyxsXEz30+RaoIS2lR7tp3M/rhiYtKXkhkk= +cloud.google.com/go/edgecontainer v1.2.5/go.mod h1:OAb6tElD3F3oBujFAup14PKOs9B/lYobTb6LARmoACY= cloud.google.com/go/errorreporting v0.3.1/go.mod h1:6xVQXU1UuntfAf+bVkFk6nld41+CPyF2NSPCyXE3Ztk= -cloud.google.com/go/essentialcontacts v1.6.11/go.mod h1:qpdkYSdPY4C69zprW20nKu+5DsED/Gwf1KtFHUSzrC0= -cloud.google.com/go/eventarc v1.13.9/go.mod h1:Jn2EBCgvGXeqndphk0nUVgJm4ZJOhxx4yYcSasvNrh4= -cloud.google.com/go/filestore v1.8.6/go.mod h1:ztH4U+aeH5vWtiyEd4+Dc56L2yRk7EIm0+PAR+9m5Jc= +cloud.google.com/go/essentialcontacts v1.6.12/go.mod h1:UGhWTIYewH8Ma4wDRJp8cMAHUCeAOCKsuwd6GLmmQLc= +cloud.google.com/go/eventarc v1.13.10/go.mod h1:KlCcOMApmUaqOEZUpZRVH+p0nnnsY1HaJB26U4X5KXE= +cloud.google.com/go/filestore v1.8.7/go.mod h1:dKfyH0YdPAKdYHqAR/bxZeil85Y5QmrEVQwIYuRjcXI= cloud.google.com/go/firestore v1.16.0/go.mod h1:+22v/7p+WNBSQwdSwP57vz47aZiY+HrDkrOsJNhk7rg= -cloud.google.com/go/functions v1.16.5/go.mod h1:ds5f+dyMN4kCkTWTLpQl8wMi0sLRuJWrQaWr5eFlUnQ= -cloud.google.com/go/gkebackup v1.5.3/go.mod h1:fzWJXO5v0AzcC3J5KgCTpEcB0uvcC+e0YqIRVYQR4sE= -cloud.google.com/go/gkeconnect v0.8.10/go.mod h1:2r9mjewv4bAEg0VXNqc7uJA2vWuDHy/44IzstIikFH8= -cloud.google.com/go/gkehub v0.14.10/go.mod h1:+bqT9oyCDQG2Dc2pUJKYVNJGvrKgIfm7c+hk9IlDzJU= -cloud.google.com/go/gkemulticloud v1.2.3/go.mod h1:CR97Vcd9XdDLZQtMPfXtbFWRxfIFuO9K6q7oF6+moco= +cloud.google.com/go/functions v1.16.6/go.mod h1:wOzZakhMueNQaBUJdf0yjsJIe0GBRu+ZTvdSTzqHLs0= +cloud.google.com/go/gkebackup v1.5.4/go.mod h1:V+llvHlRD0bCyrkYaAMJX+CHralceQcaOWjNQs8/Ymw= +cloud.google.com/go/gkeconnect v0.8.11/go.mod h1:ejHv5ehbceIglu1GsMwlH0nZpTftjxEY6DX7tvaM8gA= +cloud.google.com/go/gkehub v0.14.11/go.mod h1:CsmDJ4qbBnSPkoBltEubK6qGOjG0xNfeeT5jI5gCnRQ= +cloud.google.com/go/gkemulticloud v1.2.4/go.mod h1:PjTtoKLQpIRztrL+eKQw8030/S4c7rx/WvHydDJlpGE= cloud.google.com/go/grafeas v0.3.6/go.mod h1:to6ECAPgRO2xeqD8ISXHc70nObJuaKZThreQOjeOH3o= -cloud.google.com/go/gsuiteaddons v1.6.10/go.mod h1:daIpNyqugkch134oS116DXGEVrLUt0kSdqvgi0U1DD8= +cloud.google.com/go/gsuiteaddons v1.6.11/go.mod h1:U7mk5PLBzDpHhgHv5aJkuvLp9RQzZFpa8hgWAB+xVIk= cloud.google.com/go/iam v1.1.12 h1:JixGLimRrNGcxvJEQ8+clfLxPlbeZA6MuRJ+qJNQ5Xw= cloud.google.com/go/iam v1.1.12/go.mod h1:9LDX8J7dN5YRyzVHxwQzrQs9opFFqn0Mxs9nAeB+Hhg= -cloud.google.com/go/iap v1.9.9/go.mod h1:7I7ftlLPPU8du0E8jW3koaYkNcX1NLqSDU9jQFRwF04= -cloud.google.com/go/ids v1.4.10/go.mod h1:438ouAjmw7c4/3Q+KbQxuJTU3jek5xo6cVH7EduiKXs= -cloud.google.com/go/iot v1.7.10/go.mod h1:rVBZ3srfCH4yPr2CPkxu3tB/c0avx0KV9K68zVNAh4Q= +cloud.google.com/go/iap v1.9.10/go.mod h1:pO0FEirrhMOT1H0WVwpD5dD9r3oBhvsunyBQtNXzzc0= +cloud.google.com/go/ids v1.4.11/go.mod h1:+ZKqWELpJm8WcRRsSvKZWUdkriu4A3XsLLzToTv3418= +cloud.google.com/go/iot v1.7.11/go.mod h1:0vZJOqFy9kVLbUXwTP95e0dWHakfR4u5IWqsKMGIfHk= cloud.google.com/go/kms v1.18.4/go.mod h1:SG1bgQ3UWW6/KdPo9uuJnzELXY5YTTMJtDYvajiQ22g= -cloud.google.com/go/language v1.12.8/go.mod h1:3706JYCNJKvNXZZzcf7PGUMR2IuEYXQ0o7KqyOLqw+s= -cloud.google.com/go/lifesciences v0.9.10/go.mod h1:zm5Y46HXN/ZoVdQ8HhXJvXG+m4De1HoJye62r/DFXoU= -cloud.google.com/go/logging v1.10.0/go.mod h1:EHOwcxlltJrYGqMGfghSet736KR3hX1MAj614mrMk9I= +cloud.google.com/go/language v1.12.9/go.mod h1:B9FbD17g1EkilctNGUDAdSrBHiFOlKNErLljO7jplDU= +cloud.google.com/go/lifesciences v0.9.11/go.mod h1:NMxu++FYdv55TxOBEvLIhiAvah8acQwXsz79i9l9/RY= +cloud.google.com/go/logging v1.11.0/go.mod h1:5LDiJC/RxTt+fHc1LAt20R9TKiUTReDg6RuuFOZ67+A= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng= cloud.google.com/go/longrunning v0.5.9/go.mod h1:HD+0l9/OOW0za6UWdKJtXoFAX/BGg/3Wj8p10NeWF7c= -cloud.google.com/go/longrunning v0.5.10 h1:eB/BniENNRKhjz/xgiillrdcH3G74TGSl3BXinGlI7E= cloud.google.com/go/longrunning v0.5.10/go.mod h1:tljz5guTr5oc/qhlUjBlk7UAIFMOGuPNxkNDZXlLics= -cloud.google.com/go/managedidentities v1.6.10/go.mod h1:Dg+K/AgKJtOyDjrrMGh4wFrEmtlUUcoEtDdC/WsZxw4= -cloud.google.com/go/maps v1.11.4/go.mod h1:RQ2Vv/f2HKGlvCtj8xyJp8gJbVqh/CWy0xR2Nfe8c0s= -cloud.google.com/go/mediatranslation v0.8.10/go.mod h1:sCTNVpO4Yh9LbkjelsGakWBi93u9THKfKQLSGSLS7rA= -cloud.google.com/go/memcache v1.10.10/go.mod h1:UXnN6UYNoNM6RTExZ7/iW9c2mAaeJjy7R7uaplNRmIc= -cloud.google.com/go/metastore v1.13.9/go.mod h1:KgRseDRcS7Um/mNLbRHJjXZQrK8MqlGSyEga7T/Vs1A= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= +cloud.google.com/go/managedidentities v1.6.11/go.mod h1:df+8oZ1D4Eri+NrcpuiR5Hd6MGgiMqn0ZCzNmBYPS0A= +cloud.google.com/go/maps v1.11.5/go.mod h1:MOS/NN0L6b7Kumr8bLux9XTpd8+D54DYxBMUjq+XfXs= +cloud.google.com/go/mediatranslation v0.8.11/go.mod h1:3sNEm0fx61eHk7rfzBzrljVV9XKr931xI3OFacQBVFg= +cloud.google.com/go/memcache v1.10.11/go.mod h1:ubJ7Gfz/xQawQY5WO5pht4Q0dhzXBFeEszAeEJnwBHU= +cloud.google.com/go/metastore v1.13.10/go.mod h1:RPhMnBxUmTLT1fN7fNbPqtH5EoGHueDxubmJ1R1yT84= cloud.google.com/go/monitoring v1.20.3/go.mod h1:GPIVIdNznIdGqEjtRKQWTLcUeRnPjZW85szouimiczU= -cloud.google.com/go/networkconnectivity v1.14.9/go.mod h1:J1JgZDeSi/elFfOSLkMoY9REuGhoNXqOFuI0cfyS6WY= -cloud.google.com/go/networkmanagement v1.13.5/go.mod h1:znPuYKLqWJLzLI9feH6ex+Mq+6VlexfiUR8F6sFOtGo= -cloud.google.com/go/networksecurity v0.9.10/go.mod h1:pHy4lna09asqVhLwHVUXn92KGlM5oj1iSLFUwqqGZ2g= -cloud.google.com/go/notebooks v1.11.8/go.mod h1:jkRKhXWSXtzKtoPd9QeDzHrMPTYxf4l1rQP1/+6iR9g= -cloud.google.com/go/optimization v1.6.8/go.mod h1:d/uDAEVA0JYzWO3bCcuC6nnZKTjrSWhNkCTFUOV39g0= -cloud.google.com/go/orchestration v1.9.5/go.mod h1:64czIksdxj1B3pu0JXHVqwSmCZEoJfmuJWssWRXrVsc= +cloud.google.com/go/networkconnectivity v1.14.10/go.mod h1:f7ZbGl4CV08DDb7lw+NmMXQTKKjMhgCEEwFbEukWuOY= +cloud.google.com/go/networkmanagement v1.13.6/go.mod h1:WXBijOnX90IFb6sberjnGrVtZbgDNcPDUYOlGXmG8+4= +cloud.google.com/go/networksecurity v0.9.11/go.mod h1:4xbpOqCwplmFgymAjPFM6ZIplVC6+eQ4m7sIiEq9oJA= +cloud.google.com/go/notebooks v1.11.9/go.mod h1:JmnRX0eLgHRJiyxw8HOgumW9iRajImZxr7r75U16uXw= +cloud.google.com/go/optimization v1.6.9/go.mod h1:mcvkDy0p4s5k7iSaiKrwwpN0IkteHhGmuW5rP9nXA5M= +cloud.google.com/go/orchestration v1.9.6/go.mod h1:gQvdIsHESZJigimnbUA8XLbYeFlSg/z+A7ppds5JULg= cloud.google.com/go/orgpolicy v1.12.5/go.mod h1:f778/jOHKp6cP6NbbQgjy4SDfQf6BoVGiSWdxky3ONQ= -cloud.google.com/go/orgpolicy v1.12.6/go.mod h1:yEkOiKK4w2tBzxLFvjO9kqoIRBXoF29vFeNqhGiifpE= +cloud.google.com/go/orgpolicy v1.12.7/go.mod h1:Os3GlUFRPf1UxOHTup5b70BARnhHeQNNVNZzJXPbWYI= cloud.google.com/go/osconfig v1.13.0/go.mod h1:tlACnQi1rtSLnHRYzfw9SH9zXs0M7S1jqiW2EOCn2Y0= -cloud.google.com/go/osconfig v1.13.1/go.mod h1:3EcPSKozSco5jbdv2CZDojH0RVcRKvOdPrkrl+iHwuI= -cloud.google.com/go/oslogin v1.13.6/go.mod h1:7g1whx5UORkP8K8qGFhlc6njxFA35SX1V4dDNpWWku0= -cloud.google.com/go/phishingprotection v0.8.10/go.mod h1:QJKnexvHGqL3u0qshpJBsjqCo+EEy3K/PrvogvcON8Q= -cloud.google.com/go/policytroubleshooter v1.10.8/go.mod h1:d+6phd7MABmER7PCqlHSWGE35NFDMJfu7cLjTr820UE= -cloud.google.com/go/privatecatalog v0.9.10/go.mod h1:RxEAFdbH+8Ogu+1Lfp43KuAC6YIj46zWyoCX1dWB9nk= +cloud.google.com/go/osconfig v1.13.2/go.mod h1:eupylkWQJCwSIEMkpVR4LqpgKkQi0mD4m1DzNCgpQso= +cloud.google.com/go/oslogin v1.13.7/go.mod h1:xq027cL0fojpcEcpEQdWayiDn8tIx3WEFYMM6+q7U+E= +cloud.google.com/go/phishingprotection v0.8.11/go.mod h1:Mge0cylqVFs+D0EyxlsTOJ1Guf3qDgrztHzxZqkhRQM= +cloud.google.com/go/policytroubleshooter v1.10.9/go.mod h1:X8HEPVBWz8E+qwI/QXnhBLahEHdcuPO3M9YvSj0LDek= +cloud.google.com/go/privatecatalog v0.9.11/go.mod h1:awEF2a8M6UgoqVJcF/MthkF8SSo6OoWQ7TtPNxUlljY= cloud.google.com/go/pubsub v1.40.0/go.mod h1:BVJI4sI2FyXp36KFKvFwcfDRDfR8MiLT8mMhmIhdAeA= cloud.google.com/go/pubsublite v1.8.2/go.mod h1:4r8GSa9NznExjuLPEJlF1VjOPOpgf3IT6k8x/YgaOPI= -cloud.google.com/go/recaptchaenterprise/v2 v2.14.1/go.mod h1:s1dcJEzWpEsgZN8aqHacC3mWUaQPd8q/QoibU/nkr18= -cloud.google.com/go/recommendationengine v0.8.10/go.mod h1:vlLaupkdqL3wuabhhjvrpH7TFswyxO6+P0L3AqrATPU= -cloud.google.com/go/recommender v1.12.6/go.mod h1:BNNC/CEIGV3y6hQNjewrVx80PIidfFtf8D+6SCEgLnA= -cloud.google.com/go/redis v1.16.3/go.mod h1:zqagsFk9fZzFKJB5NzijOUi53BeU5jUiPa4Kz/8Qz+Q= -cloud.google.com/go/resourcemanager v1.9.10/go.mod h1:UJ5zGD2ZD+Ng3MNxkU1fwBbpJQEQE1UctqpvV5pbP1M= -cloud.google.com/go/resourcesettings v1.7.3/go.mod h1:lMSnOoQPDKzcF6LGJOBcQqGCY2Zm8ZhbHEzhqdU61S8= -cloud.google.com/go/retail v1.17.3/go.mod h1:8OWmRAUXg8PKs1ef+VwrBLYBRdYJxq+YyxiytMaUBRI= -cloud.google.com/go/run v1.3.10/go.mod h1:zQGa7V57WWZhyiUYMlYitrBZzR+d2drzJQvrpaQ8YIA= -cloud.google.com/go/scheduler v1.10.11/go.mod h1:irpDaNL41B5q8hX/Ki87hzkxO8FnZEhhZnFk6OP8TnE= +cloud.google.com/go/recaptchaenterprise/v2 v2.14.2/go.mod h1:MwPgdgvBkE46aWuuXeBTCB8hQJ88p+CpXInROZYCTkc= +cloud.google.com/go/recommendationengine v0.8.11/go.mod h1:cEkU4tCXAF88a4boMFZym7U7uyxvVwcQtKzS85IbQio= +cloud.google.com/go/recommender v1.12.7/go.mod h1:lG8DVtczLltWuaCv4IVpNphONZTzaCC9KdxLYeZM5G4= +cloud.google.com/go/redis v1.16.4/go.mod h1:unCVfLP5eFrVhGLDnb7IaSaWxuZ+7cBgwwBwbdG9m9w= +cloud.google.com/go/resourcemanager v1.9.11/go.mod h1:SbNAbjVLoi2rt9G74bEYb3aw1iwvyWPOJMnij4SsmHA= +cloud.google.com/go/resourcesettings v1.7.4/go.mod h1:seBdLuyeq+ol2u9G2+74GkSjQaxaBWF+vVb6mVzQFG0= +cloud.google.com/go/retail v1.17.4/go.mod h1:oPkL1FzW7D+v/hX5alYIx52ro2FY/WPAviwR1kZZTMs= +cloud.google.com/go/run v1.4.0/go.mod h1:4G9iHLjdOC+CQ0CzA0+6nLeR6NezVPmlj+GULmb0zE4= +cloud.google.com/go/scheduler v1.10.12/go.mod h1:6DRtOddMWJ001HJ6MS148rtLSh/S2oqd2hQC3n5n9fQ= cloud.google.com/go/secretmanager v1.13.5/go.mod h1:/OeZ88l5Z6nBVilV0SXgv6XJ243KP2aIhSWRMrbvDCQ= -cloud.google.com/go/security v1.17.3/go.mod h1:CuKzQq5OD6TXAYaZs/jI0d7CNHoD0LXbpsznIIIn4f4= -cloud.google.com/go/securitycenter v1.33.0/go.mod h1:lkEPItFjC1RRBHniiWR3lJTpUJW+7+EFAb7nP5ZCQxI= -cloud.google.com/go/servicedirectory v1.11.10/go.mod h1:pgbBjH2r73lEd3Y7eNA64fRO3g1zL96PMu+/hAjkH6g= -cloud.google.com/go/shell v1.7.10/go.mod h1:1sKAD5ijarrTLPX0VMQai6jCduRxaU2A6w0JWVGCNag= -cloud.google.com/go/spanner v1.64.0/go.mod h1:TOFx3pb2UwPsDGlE1gTehW+y6YlU4IFk+VdDHSGQS/M= -cloud.google.com/go/speech v1.23.4/go.mod h1:pv5VPKuXsZStCnTBImQP8HDfQHgG4DxJSlDyx5Kcwak= +cloud.google.com/go/security v1.17.4/go.mod h1:KMuDJH+sEB3KTODd/tLJ7kZK+u2PQt+Cfu0oAxzIhgo= +cloud.google.com/go/securitycenter v1.33.1/go.mod h1:jeFisdYUWHr+ig72T4g0dnNCFhRwgwGoQV6GFuEwafw= +cloud.google.com/go/servicedirectory v1.11.11/go.mod h1:pnynaftaj9LmRLIc6t3r7r7rdCZZKKxui/HaF/RqYfs= +cloud.google.com/go/shell v1.7.11/go.mod h1:SywZHWac7onifaT9m9MmegYp3GgCLm+tgk+w2lXK8vg= +cloud.google.com/go/spanner v1.65.0/go.mod h1:dQGB+w5a67gtyE3qSKPPxzniedrnAmV6tewQeBY7Hxs= +cloud.google.com/go/speech v1.24.0/go.mod h1:HcVyIh5jRXM5zDMcbFCW+DF2uK/MSGN6Rastt6bj1ic= cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= -cloud.google.com/go/storagetransfer v1.10.9/go.mod h1:QKkg5Wau5jc0iXlPOZyEv3hH9mjCLeYIBiRrZTf6Ehw= -cloud.google.com/go/talent v1.6.11/go.mod h1:tmMptbP5zTw6tjudgip8LObeh7E4xHNC/IYsiGtxnrc= -cloud.google.com/go/texttospeech v1.7.10/go.mod h1:ChThPazSxR7e4qe9ryRlFGU4lRONvL9Oo2geyp7LX4o= -cloud.google.com/go/tpu v1.6.10/go.mod h1:O+N+S0i3bOH6NJ+s9GPsg9LC7jnE1HRSp8CSRYjCrfM= +cloud.google.com/go/storagetransfer v1.10.10/go.mod h1:8+nX+WgQ2ZJJnK8e+RbK/zCXk8T7HdwyQAJeY7cEcm0= +cloud.google.com/go/talent v1.6.12/go.mod h1:nT9kNVuJhZX2QgqKZS6t6eCWZs5XEBYRBv6bIMnPmo4= +cloud.google.com/go/texttospeech v1.7.11/go.mod h1:Ua125HU+WT2IkIo5MzQtuNpNEk72soShJQVdorZ1SAE= +cloud.google.com/go/tpu v1.6.11/go.mod h1:W0C4xaSj1Ay3VX/H96FRvLt2HDs0CgdRPVI4e7PoCDk= cloud.google.com/go/trace v1.10.11/go.mod h1:fUr5L3wSXerNfT0f1bBg08W4axS2VbHGgYcfH4KuTXU= -cloud.google.com/go/translate v1.10.6/go.mod h1:vqZOHurggOqpssx/agK9S21UdStpwugMOhlHvWEGAdw= -cloud.google.com/go/video v1.21.3/go.mod h1:tp2KqkcxNEL5k2iF2Hd38aIWlNo/ew+i1yklhlyq6BM= -cloud.google.com/go/videointelligence v1.11.10/go.mod h1:5oW8qq+bk8Me+3fNoQK+27CCw4Nsuk/YN7zMw7vNDTA= -cloud.google.com/go/vision/v2 v2.8.5/go.mod h1:3X2ni4uSzzqpj8zTUD6aia62O1NisD19JH3l5i0CoM4= -cloud.google.com/go/vmmigration v1.7.10/go.mod h1:VkoA4ktmA0C3fr7LqhthGtGWEmgM7WHWg6ObxeXR5lU= -cloud.google.com/go/vmwareengine v1.1.6/go.mod h1:9txHCR2yJ6H9pFsfehTXLte5uvl/wOiM2PCtcVfglvI= -cloud.google.com/go/vpcaccess v1.7.10/go.mod h1:69kdbMh8wvGcM3agEHP1YnHPyxIBSRcZuK+KWZlpVLI= -cloud.google.com/go/webrisk v1.9.10/go.mod h1:wDxtALjJMXlGR2c3qtZaVI5jRKcneIMTYqV1IA1jPmo= -cloud.google.com/go/websecurityscanner v1.6.10/go.mod h1:ndil05bWkG/KDgWAXwFFAuvOYcOKu+mk/wC/nIfLQwE= -cloud.google.com/go/workflows v1.12.9/go.mod h1:g9S8NdA20MnQTReKVrXCDsnPrOsNgwonY7xZn+vr3SY= -code.cloudfoundry.org/bytefmt v0.0.0-20240725181214-870a2a4a34a6 h1:5wA7H4/Uyij80SkebgeIbSSUw14EzaaWw8/VSt/9ke8= -code.cloudfoundry.org/bytefmt v0.0.0-20240725181214-870a2a4a34a6/go.mod h1:0WabI+CfmksKbGuDTQSdOtS0iIfrWLzjLVbgviM82Hg= +cloud.google.com/go/translate v1.10.7/go.mod h1:mH/+8tvcItuy1cOWqU+/Y3iFHgkVUObNIQYI/kiFFiY= +cloud.google.com/go/video v1.22.0/go.mod h1:CxPshUNAb1ucnzbtruEHlAal9XY+SPG2cFqC/woJzII= +cloud.google.com/go/videointelligence v1.11.11/go.mod h1:dab2Ca3AXT6vNJmt3/6ieuquYRckpsActDekLcsd6dU= +cloud.google.com/go/vision/v2 v2.8.6/go.mod h1:G3v0uovxCye3u369JfrHGY43H6u/IQ08x9dw5aVH8yY= +cloud.google.com/go/vmmigration v1.7.11/go.mod h1:PmD1fDB0TEHGQR1tDZt9GEXFB9mnKKalLcTVRJKzcQA= +cloud.google.com/go/vmwareengine v1.2.0/go.mod h1:rPjCHu6hG9N8d6PhkoDWFkqL9xpbFY+ueVW+0pNFbZg= +cloud.google.com/go/vpcaccess v1.7.11/go.mod h1:a2cuAiSCI4TVK0Dt6/dRjf22qQvfY+podxst2VvAkcI= +cloud.google.com/go/webrisk v1.9.11/go.mod h1:mK6M8KEO0ZI7VkrjCq3Tjzw4vYq+3c4DzlMUDVaiswE= +cloud.google.com/go/websecurityscanner v1.6.11/go.mod h1:vhAZjksELSg58EZfUQ1BMExD+hxqpn0G0DuyCZQjiTg= +cloud.google.com/go/workflows v1.12.10/go.mod h1:RcKqCiOmKs8wFUEf3EwWZPH5eHc7Oq0kamIyOUCk0IE= +code.cloudfoundry.org/bytefmt v0.0.0-20240730181512-d61d30bca0a4 h1:0TdG8CEvxn4T76pDdDRdkvUrXvhHnRH5dV/Ldc8rmPs= +code.cloudfoundry.org/bytefmt v0.0.0-20240730181512-d61d30bca0a4/go.mod h1:ujeJbPDuEVVnMj8TgwGJEZ2BCcYOaIa7EVRXu995UKY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= eliasnaur.com/font v0.0.0-20230308162249-dd43949cb42d/go.mod h1:OYVuxibdk9OSLX8vAqydtRPP87PyTFcT9uH3MlEGBQA= @@ -210,8 +210,8 @@ github.com/apache/arrow/go/v15 v15.0.2/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+ye github.com/apache/thrift v0.17.0/go.mod h1:OLxhMRJxomX+1I/KUw03qoV3mMz16BwaKI+d4fPBx7Q= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.55.3 h1:0B5hOX+mIx7I5XPOrjrHlKSDQV/+ypFZpIHOx5LOk3E= -github.com/aws/aws-sdk-go v1.55.3/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= github.com/aws/aws-sdk-go-v2 v1.30.3/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg= @@ -407,8 +407,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= -github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 h1:ssNFCCVmib/GQSzx3uCWyfMgOamLGWuGqlMS77Y1m3Y= -github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -480,8 +480,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.17.10-0.20240719110028-cfab8bd586ec h1:S0mztzoHWmIpI4VuqO7MPIf3DQQxWwW5e3Uurb+HMHA= -github.com/klauspost/compress v1.17.10-0.20240719110028-cfab8bd586ec/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.10-0.20240726110848-d76f801616d1 h1:j6tQDRDYFVnxj0AHKoolYgdATzzNUR8aySZLFF3cuag= +github.com/klauspost/compress v1.17.10-0.20240726110848-d76f801616d1/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= @@ -547,10 +547,10 @@ github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.34.0 h1:eSSPsPNp6ZpsG8X1OVmOTxig+CblTc4AxpPBykhe2Os= -github.com/onsi/gomega v1.34.0/go.mod h1:MIKI8c+f+QLWk+hxbePD4i0LMJSExPaZOVfkoex4cAo= +github.com/onsi/ginkgo/v2 v2.19.1 h1:QXgq3Z8Crl5EL1WBAC98A5sEBHARrAJNzAmMxzLcRF0= +github.com/onsi/ginkgo/v2 v2.19.1/go.mod h1:O3DtEWQkPa/F7fBMgmZQKKsluAy8pd3rEQdrjkPb9zA= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -724,13 +724,13 @@ gonum.org/v1/plot v0.14.0/go.mod h1:MLdR9424SJed+5VqC6MsouEpig9pZX2VZ57H9ko2bXU= google.golang.org/api v0.189.0 h1:equMo30LypAkdkLMBqfeIqtyAnlyig1JSZArl4XPwdI= google.golang.org/api v0.189.0/go.mod h1:FLWGJKb0hb+pU2j+rJqwbnsF+ym+fQs73rbJ+KAUgy8= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f h1:htT2I9bZvGm+110zq8bIErMX+WgBWxCzV3ChwbvnKnc= -google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:Sk3mLpoDFTAp6R4OvlcUgaG4ISTspKeFsIAXMn9Bm4Y= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= +google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf h1:OqdXDEakZCVtDiZTjcxfwbHPCT11ycCEsTKesBVKvyY= +google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:mCr1K1c8kX+1iSBREvU3Juo11CB+QOEWxbRS01wWl5M= +google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf h1:GillM0Ef0pkZPIB+5iO6SDK+4T9pf6TpaYR6ICD5rVE= +google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:OFMYQFHJ4TM3JRlWDZhJbZfra2uqc3WLBZiaaqP4DtU= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240722135656-d784300faade/go.mod h1:5/MT647Cn/GGhwTpXC7QqcaR5Cnee4v4MKCU1/nwnIQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f h1:RARaIm8pxYuxyNPbBQf5igT7XdOyCNtat1qAT2ZxjU4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= @@ -748,22 +748,22 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2/go.mod h1:sUMDUKNB2ZcVjt92UnLy3cdGs+wDAcrPdV3JP6sVgA4= honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= -k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= -k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= -k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= -k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= -k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/cli-runtime v0.30.2 h1:ooM40eEJusbgHNEqnHziN9ZpLN5U4WcQGsdLKVxpkKE= -k8s.io/cli-runtime v0.30.2/go.mod h1:Y4g/2XezFyTATQUbvV5WaChoUGhojv/jZAtdp5Zkm0A= -k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= -k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= +k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= +k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= +k8s.io/apiextensions-apiserver v0.30.3 h1:oChu5li2vsZHx2IvnGP3ah8Nj3KyqG3kRSaKmijhB9U= +k8s.io/apiextensions-apiserver v0.30.3/go.mod h1:uhXxYDkMAvl6CJw4lrDN4CPbONkF3+XL9cacCT44kV4= +k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= +k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/cli-runtime v0.30.3 h1:aG69oRzJuP2Q4o8dm+f5WJIX4ZBEwrvdID0+MXyUY6k= +k8s.io/cli-runtime v0.30.3/go.mod h1:hwrrRdd9P84CXSKzhHxrOivAR9BRnkMt0OeP5mj7X30= +k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= +k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f h1:2sXuKesAYbRHxL3aE2PN6zX/gcJr22cjrsej+W784Tc= -k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= -k8s.io/metrics v0.30.2 h1:zj4kIPTCfEbY0RHEogpA7QtlItU7xaO11+Gz1zVDxlc= -k8s.io/metrics v0.30.2/go.mod h1:GpoO5XTy/g8CclVLtgA5WTrr2Cy5vCsqr5Xa/0ETWIk= +k8s.io/kube-openapi v0.0.0-20240730131305-7a9a4e85957e h1:OnKkExfhk4yxMqvBSPzUfhv3zQ96FWJ+UOZzLrAFyAo= +k8s.io/kube-openapi v0.0.0-20240730131305-7a9a4e85957e/go.mod h1:0CVn9SVo8PeW5/JgsBZZIFmmTk5noOM8WXf2e1tCihE= +k8s.io/metrics v0.30.3 h1:gKCpte5zykrOmQhZ8qmsxyJslMdiLN+sqbBfIWNpbGM= +k8s.io/metrics v0.30.3/go.mod h1:W06L2nXRhOwPkFYDJYWdEIS3u6JcJy3ebIPYbndRs6A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/hack/docker/gen/main.go b/hack/docker/gen/main.go index 34c9425864..989d5a0a87 100644 --- a/hack/docker/gen/main.go +++ b/hack/docker/gen/main.go @@ -19,6 +19,7 @@ package main import ( "bytes" "context" + "fmt" "io/fs" "os" "os/signal" @@ -36,7 +37,7 @@ import ( "github.com/vdaas/vald/internal/sync/errgroup" ) -const tmpl = `# syntax = docker/dockerfile:latest +var tmpl = fmt.Sprintf(`# syntax = docker/dockerfile:latest # # Copyright (C) 2019-{{.Year}} {{.Maintainer}} # @@ -61,14 +62,17 @@ ARG UPX_OPTIONS=-9 ARG {{$key}}={{$value}} {{- end}} {{- range $image := .ExtraImages }} -# skipcq: DOK-DL3026 +# skipcq: DOK-DL3026,DOK-DL3007 FROM {{$image}} {{- end}} -# skipcq: DOK-DL3026 -FROM {{.BuilderImage}}:{{.BuilderTag}}{{- if not .DevContainer}} AS builder {{- end}} +# skipcq: DOK-DL3026,DOK-DL3007 +FROM {{.BuilderImage}}:{{.BuilderTag}}{{if and (not (eq (ContainerName .ContainerType) "%s")) (not (eq (ContainerName .ContainerType) "%s"))}} AS builder {{- end}} ARG MAINTAINER="{{.Maintainer}}" LABEL maintainer="${MAINTAINER}" +# skipcq: DOK-DL3002 +USER {{.BuildUser}} + ARG TARGETARCH ARG TARGETOS ARG GO_VERSION @@ -78,65 +82,52 @@ ARG RUST_VERSION ENV {{$keyValue}} {{- end}} +WORKDIR {{.RootDir}}/${ORG}/${REPO} +{{- range $files := .ExtraCopies }} +COPY {{$files}} +{{- end}} SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# skipcq: DOK-DL3008 -RUN apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ +#skipcq: DOK-W1001, DOK-SC2046, DOK-SC2086, DOK-DL3008 +RUN {{RunMounts .RunMounts}}\ + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \ + && echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/no-install-recommends \ + && apt-get clean \ && apt-get update -y \ && apt-get upgrade -y \ +{{- if eq (ContainerName .ContainerType) "%s"}} + && apt-get install -y --no-install-recommends --fix-missing \ + curl \ + gnupg \ + software-properties-common \ + && add-apt-repository ppa:ubuntu-toolchain-r/test -y \ + && apt-get update -y \ + && apt-get upgrade -y \ +{{- end}} && apt-get install -y --no-install-recommends --fix-missing \ build-essential \ ca-certificates \ +{{- if not (eq (ContainerName .ContainerType) "%s")}} curl \ +{{- end}} + tzdata \ + locales \ git \ {{- range $epkg := .ExtraPackages }} {{$epkg}} \ {{- end}} && ldconfig \ + && echo "${LANG} UTF-8" > /etc/locale.gen \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && locale-gen ${LANGUAGE} \ + && update-locale LANG=${LANGUAGE} \ + && dpkg-reconfigure -f noninteractive tzdata \ && apt-get clean \ - && rm -rf \ - /var/lib/apt/lists/* \ - /var/cache/* \ - && apt-get autoremove - -WORKDIR {{.RootDir}}/${ORG}/${REPO} -COPY Makefile . -COPY .git . -{{- if not .DevContainer}} -{{- if eq .ContainerType 0 }} -COPY go.mod . -COPY go.sum . -{{- else if eq .ContainerType 3 }} -COPY go.mod . -COPY go.sum . -{{- end}} -{{- if .ConfigExists }} -COPY cmd/${PKG}/sample.yaml {{$.TmpConfigPath}} -{{- end}} + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && {{RunCommands .RunCommands}} -{{- range $files := .CopyDirectories }} -WORKDIR {{$.RootDir}}/${ORG}/${REPO}/{{$files}} -COPY {{$files}} . -{{- end}} -{{- range $files := .ExtraCopies }} -COPY {{$files}} -{{- end}} - -{{- else}} -WORKDIR {{.RootDir}}/${ORG}/${REPO} -COPY . . -{{- end}} - -WORKDIR {{.RootDir}}/${ORG}/${REPO} -{{- if .RunCommands}} -#skipcq: DOK-W1001, DOK-SC2086 -RUN {{RunCommands .RunCommands}} -{{- end}} - -{{- if not .DevContainer}} -# skipcq: DOK-DL3026 +{{- if and (not (eq (ContainerName .ContainerType) "%s")) (not (eq (ContainerName .ContainerType) "%s"))}} +# skipcq: DOK-DL3026,DOK-DL3007 FROM {{.RuntimeImage}}:{{.RuntimeTag}} ARG MAINTAINER="{{.Maintainer}}" LABEL maintainer="${MAINTAINER}" @@ -145,19 +136,24 @@ ENV APP_NAME={{.AppName}} COPY --from=builder {{.BinDir}}/${APP_NAME} {{.BinDir}}/${APP_NAME} {{- if .ConfigExists }} -COPY --from=builder {{$.TmpConfigPath}} /etc/server/config.yaml +COPY cmd/{{.PackageDir}}/sample.yaml /etc/server/config.yaml {{- end}} {{- range $from, $file := .StageFiles }} COPY --from=builder {{$file}} {{$file}} {{- end}} -USER nonroot:nonroot +{{- end}} +# skipcq: DOK-DL3002 +USER {{.RuntimeUser}} {{- if .Entrypoints}} ENTRYPOINT [{{Entrypoint .Entrypoints}}] -{{- else}} +{{- else if and (not (eq (ContainerName .ContainerType) "%s")) (not (eq (ContainerName .ContainerType) "%s"))}} ENTRYPOINT ["{{.BinDir}}/{{.AppName}}"] -{{- end}} -{{- end}}` +{{- end}}`, DevContainer.String(), CIContainer.String(), + DevContainer.String(), + DevContainer.String(), + DevContainer.String(), CIContainer.String(), + DevContainer.String(), CIContainer.String()) var docker = template.Must(template.New("Dockerfile").Funcs(template.FuncMap{ "RunCommands": func(commands []string) string { @@ -173,21 +169,38 @@ var docker = template.Must(template.New("Dockerfile").Funcs(template.FuncMap{ } return b.String() }, + "RunMounts": func(commands []string) string { + if len(commands) == 0 { + return "" + } + var b strings.Builder + for i, cmd := range commands { + if i > 0 { + b.WriteString(" \\\n ") + } + b.WriteString(cmd) + } + return b.String() + }, + "Entrypoint": func(entries []string) string { if len(entries) == 0 { return "\"{{.BinDir}}/{{.AppName}}\"" } return "\"" + strings.Join(entries, "\", \"") + "\"" }, + "ContainerName": func(c ContainerType) string { + return c.String() + }, }).Parse(tmpl)) type Data struct { ConfigExists bool - DevContainer bool Year int ContainerType ContainerType AppName string BinDir string + BuildUser string BuilderImage string BuilderTag string Maintainer string @@ -195,17 +208,17 @@ type Data struct { RootDir string RuntimeImage string RuntimeTag string - TmpConfigPath string + RuntimeUser string Arguments map[string]string Environments map[string]string Entrypoints []string EnvironmentsSlice []string - CopyDirectories []string ExtraCopies []string ExtraImages []string ExtraPackages []string Preprocess []string RunCommands []string + RunMounts []string StageFiles []string } @@ -214,15 +227,18 @@ type ContainerType int const ( organization = "vdaas" repository = "vald" - minimumArgumentLength = 2 + defaultBinaryDir = "/usr/bin" + defaultBuilderImage = "ghcr.io/vdaas/vald/vald-buildbase" + defaultBuilderTag = "nightly" + defaultLanguage = "en_US.UTF-8" defaultMaintainer = organization + ".org " + repository + " team <" + repository + "@" + organization + ".org>" - maintainerKey = "MAINTAINER" defaultRuntimeImage = "gcr.io/distroless/static" defaultRuntimeTag = "nonroot" - defaultBuilderImage = "ghcr.io/vdaas/vald/vald-buildbase" - defaultBuilderTag = "nightly" - defaultBinaryDir = "/usr/bin" - defaultTmpConfigPath = "/tmp/config.yaml" + defaultRuntimeUser = "nonroot:nonroot" + defaultBuildUser = "root:root" + maintainerKey = "MAINTAINER" + minimumArgumentLength = 2 + ubuntuVersion = "22.04" goWorkdir = "${GOPATH}/src/github.com" rustWorkdir = "${HOME}/rust/src/github.com" @@ -242,16 +258,34 @@ const ( Rust DevContainer HelmOperator + CIContainer Other ) +func (c ContainerType) String() string { + return containerTypeName[c] +} + var ( + containerTypeName = map[ContainerType]string{ + Go: "Go", + Rust: "Rust", + DevContainer: "DevContainer", + HelmOperator: "HelmOperator", + CIContainer: "CIContainer", + Other: "Other", + } + defaultEnvironments = map[string]string{ "DEBIAN_FRONTEND": "noninteractive", "HOME": "/root", + "USER": "root", "INITRD": "No", - "LANG": "en_US.UTF-8", + "LANG": defaultLanguage, + "LANGUAGE": defaultLanguage, + "LC_ALL": defaultLanguage, "ORG": organization, + "TZ": "Etc/UTC", "PATH": "${PATH}:/usr/local/bin", "REPO": repository, } @@ -267,26 +301,13 @@ var ( "CARGO_HOME": "${RUST_HOME}/cargo", "PATH": "${PATH}:${RUSTUP_HOME}/bin:${CARGO_HOME}/bin:/usr/local/bin", } - - defaultCopyDirectories = []string{ - "Makefile.d", - "versions", - } - goDefaultCopyDirectories = []string{ - "internal", - "apis/grpc", - "pkg/${PKG}", - "cmd/${PKG}", + clangDefaultEnvironments = map[string]string{ + "CC": "gcc", + "CXX": "g++", } - rustDefaultCopyDirectories = []string{ - "rust", - } - goInstallCommands = []string{ - `--mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ - --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ - make GO_VERSION="${GO_VERSION}" go/install`, - "make go/download", + "make GOPATH=\"${GOPATH}\" GOROOT=\"${GOROOT}\" GO_VERSION=\"${GO_VERSION}\" go/install", + "make GOPATH=\"${GOPATH}\" GOROOT=\"${GOROOT}\" GO_VERSION=\"${GO_VERSION}\" go/download", } rustInstallCommands = []string{ "make RUST_VERSION=\"${RUST_VERSION}\" rust/install", @@ -301,11 +322,24 @@ var ( "rm -rf rust/target", } + defaultMounts = []string{ + "--mount=type=bind,target=.,rw", + "--mount=type=tmpfs,target=/tmp", + "--mount=type=cache,target=/var/lib/apt,sharing=locked", + "--mount=type=cache,target=/var/cache/apt,sharing=locked", + } + + goDefaultMounts = []string{ + "--mount=type=cache,target=\"${GOPATH}/pkg\",id=\"go-build-${TARGETARCH}\"", + "--mount=type=cache,target=\"${HOME}/.cache/go-build\",id=\"go-build-${TARGETARCH}\"", + } + clangBuildDeps = []string{ "cmake", - "g++", "gcc", + "g++", "unzip", + "libssl-dev", } ngtBuildDeps = []string{ "liblapack-dev", @@ -314,18 +348,15 @@ var ( } faissBuildDeps = []string{ "gfortran", + "libquadmath0", } devContainerDeps = []string{ - "curl", "gawk", - "git", "gnupg2", "graphviz", "jq", "libhdf5-dev", "libaec-dev", - "nodejs", - "npm", "sed", "zip", } @@ -334,6 +365,7 @@ var ( "make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false", "make GOARCH=${TARGETARCH} GOOS=${TARGETOS} golangci-lint/install", "make GOARCH=${TARGETARCH} GOOS=${TARGETOS} gotestfmt/install", + "make cmake/install", "make buf/install", "make hdf5/install", "make helm-docs/install", @@ -353,7 +385,15 @@ var ( } devContainerPreprocess = []string{ - "echo \"installing golang vscode extension dependencies\"", + "curl -fsSL https://deb.nodesource.com/setup_current.x | bash -", + "apt-get clean", + "apt-get update -y", + "apt-get upgrade -y", + "apt-get install -y --no-install-recommends --fix-missing nodejs", + "npm install -g npm@latest", + "apt-get clean", + "apt-get autoclean -y", + "apt-get autoremove -y", "make delve/install", "make gomodifytags/install", "make gopls/install", @@ -385,6 +425,9 @@ func appendM[K comparable](maps ...map[K]string) map[K]string { if strings.Contains(v, "${PATH}:") { v = strings.TrimPrefix(strings.ReplaceAll(strings.ReplaceAll(v, "${PATH}", ""), "::", ":")+":${PATH}", ":") } + if strings.Contains(v, ":unix") { + v = "unix:" + strings.TrimSuffix(v, ":unix") + } result[k] = v } return result @@ -459,25 +502,24 @@ func main() { syscall.SIGKILL, syscall.SIGTERM) defer cancel() + log.Debug(tmpl) maintainer := os.Getenv(maintainerKey) - if len(maintainer) == 0 { + if maintainer == "" { maintainer = defaultMaintainer } year := time.Now().Year() eg, egctx := errgroup.New(ctx) for n, d := range map[string]Data{ "vald-agent-ngt": { - AppName: "ngt", - PackageDir: "agent/core/ngt", - CopyDirectories: []string{agentInernalPackage}, - ExtraPackages: append(clangBuildDeps, ngtBuildDeps...), - Preprocess: []string{ngtPreprocess}, + AppName: "ngt", + PackageDir: "agent/core/ngt", + ExtraPackages: append(clangBuildDeps, ngtBuildDeps...), + Preprocess: []string{ngtPreprocess}, }, "vald-agent-faiss": { - AppName: "faiss", - PackageDir: "agent/core/faiss", - CopyDirectories: []string{agentInernalPackage}, + AppName: "faiss", + PackageDir: "agent/core/faiss", ExtraPackages: append(clangBuildDeps, append(ngtBuildDeps, faissBuildDeps...)...), @@ -497,9 +539,8 @@ func main() { }, }, "vald-agent-sidecar": { - AppName: "sidecar", - PackageDir: "agent/sidecar", - CopyDirectories: []string{agentInernalPackage}, + AppName: "sidecar", + PackageDir: "agent/sidecar", }, "vald-discoverer-k8s": { AppName: "discoverer", @@ -560,11 +601,6 @@ func main() { Arguments: map[string]string{ "OPERATOR_SDK_VERSION": "latest", }, - CopyDirectories: []string{ - "internal", - "charts", - "hack", - }, ExtraCopies: []string{ "--from=operator /usr/local/bin/${APP_NAME} {{$.BinDir}}/${APP_NAME}", }, @@ -601,42 +637,36 @@ func main() { AppName: "loadtest", PackageDir: "tools/cli/loadtest", ExtraPackages: append(clangBuildDeps, "libhdf5-dev", "libaec-dev"), - CopyDirectories: []string{ - "hack/benchmark/assets/x1b", - }, Preprocess: []string{ "make hdf5/install", }, }, "vald-ci-container": { AppName: "ci-container", - DevContainer: true, - ContainerType: DevContainer, + ContainerType: CIContainer, PackageDir: "ci/base", - ExtraPackages: append(clangBuildDeps, + RuntimeUser: defaultBuildUser, + ExtraPackages: append([]string{"npm"}, append(clangBuildDeps, append(ngtBuildDeps, append(faissBuildDeps, - devContainerDeps...)...)...), - Preprocess: append([]string{ - "sysctl -w net.ipv6.conf.all.disable_ipv6=1", - "sysctl -w net.ipv6.conf.default.disable_ipv6=1", - "sysctl -w net.ipv6.conf.lo.disable_ipv6=1", - "sysctl -p", - }, append(ciContainerPreprocess, ngtPreprocess, faissPreprocess)...), + devContainerDeps...)...)...)...), + Preprocess: append(ciContainerPreprocess, ngtPreprocess, faissPreprocess), + Entrypoints: []string{"/bin/bash"}, }, "vald-dev-container": { AppName: "dev-container", - BuilderImage: "mcr.microsoft.com/vscode/devcontainers/base", - BuilderTag: "debian", - DevContainer: true, + BuilderImage: "mcr.microsoft.com/devcontainers/base", + BuilderTag: "ubuntu" + ubuntuVersion, + BuildUser: defaultBuildUser, + RuntimeUser: defaultBuildUser, ContainerType: DevContainer, PackageDir: "dev", ExtraPackages: append(clangBuildDeps, append(ngtBuildDeps, append(faissBuildDeps, devContainerDeps...)...)...), - Preprocess: append(ciContainerPreprocess, - append(devContainerPreprocess, + Preprocess: append(devContainerPreprocess, + append(ciContainerPreprocess, ngtPreprocess, faissPreprocess)...), }, @@ -650,9 +680,6 @@ func main() { if data.BinDir == "" { data.BinDir = defaultBinaryDir } - if data.TmpConfigPath == "" { - data.TmpConfigPath = defaultTmpConfigPath - } if data.RuntimeImage == "" { data.RuntimeImage = defaultRuntimeImage } @@ -665,13 +692,14 @@ func main() { if data.BuilderTag == "" { data.BuilderTag = defaultBuilderTag } + if data.RuntimeUser == "" { + data.RuntimeUser = defaultRuntimeUser + } - if data.CopyDirectories != nil { - data.CopyDirectories = append(defaultCopyDirectories, data.CopyDirectories...) - } else { - data.CopyDirectories = make([]string, len(defaultCopyDirectories)) - copy(data.CopyDirectories, defaultCopyDirectories) + if data.BuildUser == "" { + data.BuildUser = defaultBuildUser } + if data.Environments != nil { data.Environments = appendM(data.Environments, defaultEnvironments) } else { @@ -680,7 +708,6 @@ func main() { } switch data.ContainerType { case Go: - data.CopyDirectories = append(data.CopyDirectories, goDefaultCopyDirectories...) data.Environments = appendM(data.Environments, goDefaultEnvironments) data.RootDir = goWorkdir commands := make([]string, 0, len(goInstallCommands)+len(data.Preprocess)+len(goBuildCommands)) @@ -692,8 +719,11 @@ func main() { commands = append(commands, goBuildCommands...) } data.RunCommands = commands + mounts := make([]string, 0, len(defaultMounts)+len(goDefaultMounts)) + mounts = append(mounts, defaultMounts...) + mounts = append(mounts, goDefaultMounts...) + data.RunMounts = mounts case Rust: - data.CopyDirectories = append(data.CopyDirectories, rustDefaultCopyDirectories...) data.Environments = appendM(data.Environments, rustDefaultEnvironments) data.RootDir = rustWorkdir commands := make([]string, 0, len(rustInstallCommands)+len(data.Preprocess)+len(rustBuildCommands)) @@ -701,18 +731,23 @@ func main() { if data.Preprocess != nil { commands = append(commands, data.Preprocess...) } - data.RunCommands = append(commands, rustBuildCommands...) - case DevContainer: - data.CopyDirectories = append(data.CopyDirectories, append(goDefaultCopyDirectories, rustDefaultCopyDirectories...)...) - data.Environments = appendM(data.Environments, goDefaultEnvironments, rustDefaultEnvironments) + commands = append(commands, rustBuildCommands...) + data.RunCommands = commands + data.RunMounts = defaultMounts + case DevContainer, CIContainer: + data.Environments = appendM(data.Environments, goDefaultEnvironments, rustDefaultEnvironments, clangDefaultEnvironments) data.RootDir = goWorkdir - commands := make([]string, 0, len(goInstallCommands)+len(rustInstallCommands)+len(data.Preprocess)) + commands := make([]string, 0, len(goInstallCommands)+len(rustInstallCommands)+len(data.Preprocess)+1) commands = append(commands, append(goInstallCommands, rustInstallCommands...)...) if data.Preprocess != nil { commands = append(commands, data.Preprocess...) } commands = append(commands, "rm -rf {{.RootDir}}/${ORG}/${REPO}/*") data.RunCommands = commands + mounts := make([]string, 0, len(defaultMounts)+len(goDefaultMounts)) + mounts = append(mounts, defaultMounts...) + mounts = append(mounts, goDefaultMounts...) + data.RunMounts = mounts case HelmOperator: data.Environments = appendM(data.Environments, goDefaultEnvironments) data.RootDir = goWorkdir @@ -722,10 +757,25 @@ func main() { commands = append(commands, data.Preprocess...) } data.RunCommands = commands + mounts := make([]string, 0, len(defaultMounts)+len(goDefaultMounts)) + mounts = append(mounts, defaultMounts...) + mounts = append(mounts, goDefaultMounts...) + data.RunMounts = mounts default: data.RootDir = "${HOME}" data.Environments["ROOTDIR"] = os.Args[1] } + if strings.Contains(data.BuildUser, "root") { + data.Environments["HOME"] = "/root" + data.Environments["USER"] = "root" + } else { + user := data.BuildUser + if strings.Contains(user, ":") { + user = strings.SplitN(user, ":", 2)[0] + } + data.Environments["HOME"] = "/home/" + user + data.Environments["USER"] = user + } data.Environments["APP_NAME"] = data.AppName data.Environments["PKG"] = data.PackageDir @@ -733,7 +783,7 @@ func main() { data.ConfigExists = file.Exists(file.Join(os.Args[1], "cmd", data.PackageDir, "sample.yaml")) buf := bytes.NewBuffer(make([]byte, 0, len(tmpl))) - log.Infof("generating %s's docker file", name) + log.Infof("Generating %s's Dockerfile", name) docker.Execute(buf, data) tpl := buf.String() buf.Reset() diff --git a/hack/go.mod.default b/hack/go.mod.default index c33a973129..c55303d4ce 100644 --- a/hack/go.mod.default +++ b/hack/go.mod.default @@ -329,16 +329,16 @@ replace ( gopkg.in/yaml.v2 => gopkg.in/yaml.v2 upgrade gopkg.in/yaml.v3 => gopkg.in/yaml.v3 upgrade honnef.co/go/tools => honnef.co/go/tools upgrade - k8s.io/api => k8s.io/api v0.30.2 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.30.2 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.2 - k8s.io/client-go => k8s.io/client-go v0.30.2 - k8s.io/component-base => k8s.io/component-base v0.30.2 + k8s.io/api => k8s.io/api v0.30.3 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.3 + k8s.io/apimachinery => k8s.io/apimachinery v0.30.3 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.3 + k8s.io/client-go => k8s.io/client-go v0.30.3 + k8s.io/component-base => k8s.io/component-base v0.30.3 k8s.io/klog/v2 => k8s.io/klog/v2 upgrade k8s.io/kube-openapi => k8s.io/kube-openapi master - k8s.io/kubernetes => k8s.io/kubernetes v0.30.2 - k8s.io/metrics => k8s.io/metrics v0.30.2 + k8s.io/kubernetes => k8s.io/kubernetes v0.30.3 + k8s.io/metrics => k8s.io/metrics v0.30.3 nhooyr.io/websocket => nhooyr.io/websocket upgrade rsc.io/pdf => rsc.io/pdf upgrade sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.18.4 diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index a13db09c43..27544ca6dc 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -207,14 +207,15 @@ func dirwalk(dir string) []string { case "AUTHORS", "CONTRIBUTORS", + "FAISS_VERSION", "GO_VERSION", "NGT_VERSION", - "FAISS_VERSION", "Pipefile", "VALD_VERSION", "grp", "obj", "prf", + "rust-toolchain", "src", "tre": default: @@ -260,7 +261,7 @@ func readAndRewrite(path string) error { } buf := bytes.NewBuffer(make([]byte, 0, fi.Size())) maintainer := os.Getenv(maintainerKey) - if len(maintainer) == 0 { + if maintainer == "" { maintainer = defaultMaintainer } d := Data{ diff --git a/pkg/agent/core/ngt/handler/grpc/insert.go b/pkg/agent/core/ngt/handler/grpc/insert.go index ed46791b4e..3e982dbaf1 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert.go +++ b/pkg/agent/core/ngt/handler/grpc/insert.go @@ -99,7 +99,7 @@ func (s *server) Insert( log.Warn(err) attrs = trace.StatusCodeAlreadyExists(err.Error()) } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { - err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", vec.GetId()), err, + err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API invalid id: \"%s\" or vector: %v was given", vec.GetId(), vec.GetVector()), err, &errdetails.RequestInfo{ RequestId: req.GetVector().GetId(), ServingData: errdetails.Serialize(req), diff --git a/pkg/agent/core/ngt/handler/grpc/insert_test.go b/pkg/agent/core/ngt/handler/grpc/insert_test.go index fa223ca69d..f03e754476 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert_test.go +++ b/pkg/agent/core/ngt/handler/grpc/insert_test.go @@ -734,7 +734,7 @@ func Test_server_Insert(t *testing.T) { want: want{ err: func() error { err := errors.ErrUUIDNotFound(0) - err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", req.GetVector().GetId()), err, + err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API invalid id: \"%s\" or vector: %v was given", req.GetVector().GetId(), req.GetVector().GetVector()), err, &errdetails.RequestInfo{ RequestId: req.GetVector().GetId(), ServingData: errdetails.Serialize(req), @@ -786,7 +786,7 @@ func Test_server_Insert(t *testing.T) { want: want{ err: func() error { err := errors.ErrUUIDNotFound(0) - err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", req.GetVector().GetId()), err, + err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API invalid id: \"%s\" or vector: %v was given", req.GetVector().GetId(), req.GetVector().GetVector()), err, &errdetails.RequestInfo{ RequestId: req.GetVector().GetId(), ServingData: errdetails.Serialize(req), @@ -838,7 +838,7 @@ func Test_server_Insert(t *testing.T) { want: want{ err: func() error { err := errors.ErrUUIDNotFound(0) - err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", req.GetVector().GetId()), err, + err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API invalid id: \"%s\" or vector: %v was given", req.GetVector().GetId(), req.GetVector().GetVector()), err, &errdetails.RequestInfo{ RequestId: req.GetVector().GetId(), ServingData: errdetails.Serialize(req), diff --git a/pkg/agent/core/ngt/handler/grpc/search_test.go b/pkg/agent/core/ngt/handler/grpc/search_test.go index 936998bdce..1ef340e2c4 100644 --- a/pkg/agent/core/ngt/handler/grpc/search_test.go +++ b/pkg/agent/core/ngt/handler/grpc/search_test.go @@ -92,7 +92,8 @@ func Test_server_Search(t *testing.T) { } } if gotSize := len(gotRes.GetResults()); gotSize != w.resultSize { - return errors.Errorf("got size: \"%#v\",\n\t\t\t\twant size: \"%#v\"", gotSize, w.resultSize) + res, _ := gotRes.MarshalJSON() + return errors.Errorf("got size: \"%#v\",\n\t\t\t\twant size: \"%#v\"\ngotResults: \"%s\"", gotSize, w.resultSize, string(res)) } return nil } diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 787aebcaa7..26126f4525 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -161,17 +161,23 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "cc" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" [[package]] name = "cfg-if" @@ -329,7 +335,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -436,9 +442,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -668,9 +674,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" @@ -958,9 +967,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.1" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d040ac2b29ab03b09d4129c2f5bbd012a3ac2f79d38ff506a4bf8dd34b0eac8a" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", @@ -1307,3 +1316,24 @@ name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/rust/rust-toolchain b/rust/rust-toolchain new file mode 100644 index 0000000000..aaceec04e0 --- /dev/null +++ b/rust/rust-toolchain @@ -0,0 +1 @@ +1.80.0 diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml index 7e37cd2750..f992c12f2c 100644 --- a/rust/rust-toolchain.toml +++ b/rust/rust-toolchain.toml @@ -14,4 +14,4 @@ # limitations under the License. # [toolchain] -channel = "1.77.2" +channel = "1.80.0" diff --git a/tests/e2e/kubernetes/portforward/portforward.go b/tests/e2e/kubernetes/portforward/portforward.go index 1d53431f64..09c11a7af6 100644 --- a/tests/e2e/kubernetes/portforward/portforward.go +++ b/tests/e2e/kubernetes/portforward/portforward.go @@ -68,7 +68,7 @@ func (p *Portforward) Start() error { path := fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/portforward", p.namespace, p.podName) - hostIP := strings.TrimLeft(p.restConfig.Host, "https:/") + hostIP := strings.TrimPrefix(strings.TrimPrefix(p.restConfig.Host, "http://"), "https://") transport, upgrader, err := spdy.RoundTripperFor(p.restConfig) if err != nil { diff --git a/versions/CMAKE_VERSION b/versions/CMAKE_VERSION new file mode 100644 index 0000000000..72bde0ab2a --- /dev/null +++ b/versions/CMAKE_VERSION @@ -0,0 +1 @@ +3.30.1 diff --git a/versions/JAEGER_OPERATOR_VERSION b/versions/JAEGER_OPERATOR_VERSION index 99aed793ad..c2576f1624 100644 --- a/versions/JAEGER_OPERATOR_VERSION +++ b/versions/JAEGER_OPERATOR_VERSION @@ -1 +1 @@ -2.54.0 +2.55.0 diff --git a/versions/OPERATOR_SDK_VERSION b/versions/OPERATOR_SDK_VERSION index 251643f6ba..2f2ce0df61 100644 --- a/versions/OPERATOR_SDK_VERSION +++ b/versions/OPERATOR_SDK_VERSION @@ -1 +1 @@ -v1.35 +v1.33 diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION index d16771deca..9c0be4b799 100644 --- a/versions/PROMETHEUS_STACK_VERSION +++ b/versions/PROMETHEUS_STACK_VERSION @@ -1 +1 @@ -61.3.2 +61.6.0 diff --git a/versions/PROTOBUF_VERSION b/versions/PROTOBUF_VERSION index 40682b3dcc..383283e322 100644 --- a/versions/PROTOBUF_VERSION +++ b/versions/PROTOBUF_VERSION @@ -1 +1 @@ -27.2 +27.3 diff --git a/versions/RUST_VERSION b/versions/RUST_VERSION index 6cdeba3855..aaceec04e0 100644 --- a/versions/RUST_VERSION +++ b/versions/RUST_VERSION @@ -1 +1 @@ -1.77.2 \ No newline at end of file +1.80.0