From 6b594377f75afba843f521fc35eb6666ba155d71 Mon Sep 17 00:00:00 2001 From: vankichi Date: Sat, 9 Nov 2024 01:23:25 +0900 Subject: [PATCH 1/8] :recycle: update ubuntu version for devcontainer Signed-off-by: vankichi --- dockers/dev/Dockerfile | 2 +- dockers/index/job/deletion/Dockerfile | 3 ++- hack/docker/gen/main.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index 3e80596341..f1f0464a0a 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -18,7 +18,7 @@ # DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go ARG UPX_OPTIONS=-9 # skipcq: DOK-DL3026,DOK-DL3007 -FROM mcr.microsoft.com/devcontainers/base:ubuntu22.04 +FROM mcr.microsoft.com/devcontainers/base:ubuntu24.04 LABEL maintainer="vdaas.org vald team " # skipcq: DOK-DL3002 USER root:root diff --git a/dockers/index/job/deletion/Dockerfile b/dockers/index/job/deletion/Dockerfile index cd1d29eac8..323965dfcd 100644 --- a/dockers/index/job/deletion/Dockerfile +++ b/dockers/index/job/deletion/Dockerfile @@ -82,6 +82,7 @@ RUN --mount=type=bind,target=.,rw \ FROM gcr.io/distroless/static:nonroot LABEL maintainer="vdaas.org vald team " COPY --from=builder /usr/bin/index-deletion /usr/bin/index-deletion +COPY cmd/index/job/deletion/sample.yaml /etc/server/config.yaml # skipcq: DOK-DL3002 USER nonroot:nonroot -ENTRYPOINT ["/usr/bin/index-deletion"] +ENTRYPOINT ["/usr/bin/index-deletion"] \ No newline at end of file diff --git a/hack/docker/gen/main.go b/hack/docker/gen/main.go index 2e3487a779..c619fdc35c 100644 --- a/hack/docker/gen/main.go +++ b/hack/docker/gen/main.go @@ -238,7 +238,7 @@ const ( defaultBuildStageName = "builder" maintainerKey = "MAINTAINER" minimumArgumentLength = 2 - ubuntuVersion = "22.04" + ubuntuVersion = "24.04" goWorkdir = "${GOPATH}/src/github.com" rustWorkdir = "${HOME}/rust/src/github.com" From 699a180dc934381573aeef7dfdf72a03e60929a7 Mon Sep 17 00:00:00 2001 From: vankichi Date: Sat, 9 Nov 2024 02:21:57 +0900 Subject: [PATCH 2/8] :green_heart: add platform opts Signed-off-by: vankichi --- .github/workflows/dockers-dev-container-image.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dockers-dev-container-image.yaml b/.github/workflows/dockers-dev-container-image.yaml index e9e7c4cbbe..8ff51e8749 100644 --- a/.github/workflows/dockers-dev-container-image.yaml +++ b/.github/workflows/dockers-dev-container-image.yaml @@ -63,4 +63,5 @@ jobs: uses: ./.github/workflows/_docker-image.yaml with: target: dev-container + platforms: "linux/amd64,linux/arm64" secrets: inherit From f55b80c64202d26343d912a9d1ec5e830e8f2f8c Mon Sep 17 00:00:00 2001 From: vankichi Date: Mon, 11 Nov 2024 15:06:24 +0900 Subject: [PATCH 3/8] :recycle: Remove unnecessary installation Signed-off-by: vankichi --- dockers/dev/Dockerfile | 9 ++------- hack/docker/gen/main.go | 13 ++----------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index f1f0464a0a..6ccedfc882 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -64,15 +64,10 @@ RUN --mount=type=bind,target=.,rw \ && 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 \ + gnupg \ tzdata \ locales \ git \ diff --git a/hack/docker/gen/main.go b/hack/docker/gen/main.go index c619fdc35c..d49c4d2cb2 100644 --- a/hack/docker/gen/main.go +++ b/hack/docker/gen/main.go @@ -92,20 +92,12 @@ RUN {{RunMounts .RunMounts}} \ && 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 \ +{{- if eq (ContainerName .ContainerType) "%s"}} + gnupg \ {{- end}} tzdata \ locales \ @@ -143,7 +135,6 @@ ENTRYPOINT [{{Entrypoint .Entrypoints}}] ENTRYPOINT ["{{.BinDir}}/{{.AppName}}"] {{- end}} {{- end}}`, DevContainer.String(), CIContainer.String(), - DevContainer.String(), DevContainer.String(), DevContainer.String(), CIContainer.String(), DevContainer.String(), CIContainer.String()) From 460e97282e68830f46f46e61417af0bc39a0dd1a Mon Sep 17 00:00:00 2001 From: vankichi Date: Wed, 13 Nov 2024 11:52:50 +0900 Subject: [PATCH 4/8] :recycle: Change install helm command Signed-off-by: vankichi --- Makefile.d/helm.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index a665eda631..8429dc1a37 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -20,7 +20,12 @@ helm/install: $(BINDIR)/helm $(BINDIR)/helm: mkdir -p $(BINDIR) - curl -fsSL "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" | HELM_INSTALL_DIR=$(BINDIR) bash + $(eval DARCH := $(subst aarch64,arm64,$(ARCH))) + TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')).tar.gz \ + && cd $(TEMP_DIR) \ + && curl -fsSL "https://github.com/helm/helm/releases/download/$(HELM_VERSION)/$${TAR_NAME}" -o "$(TEMP_DIR)/$${TAR_NAME}" + && tar xzvf "$(TEMP_DIR)/$${TAR_NAME}" \ + && mv helm $(BINDIR)/helm .PHONY: helm-docs/install ## install helm-docs From a31e43c5e7537659adc72a9ebe8f3407a631b686 Mon Sep 17 00:00:00 2001 From: vankichi Date: Wed, 13 Nov 2024 15:25:00 +0900 Subject: [PATCH 5/8] :recycle: Fix Signed-off-by: vankichi --- Makefile.d/helm.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 8429dc1a37..38c9309036 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -21,11 +21,11 @@ helm/install: $(BINDIR)/helm $(BINDIR)/helm: mkdir -p $(BINDIR) $(eval DARCH := $(subst aarch64,arm64,$(ARCH))) - TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')).tar.gz \ + TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')) \ && cd $(TEMP_DIR) \ - && curl -fsSL "https://github.com/helm/helm/releases/download/$(HELM_VERSION)/$${TAR_NAME}" -o "$(TEMP_DIR)/$${TAR_NAME}" + && curl -fsSL "https://get.helm.sh/$${TAR_NAME}.tar.gz" -o "$(TEMP_DIR)/$${TAR_NAME}" \ && tar xzvf "$(TEMP_DIR)/$${TAR_NAME}" \ - && mv helm $(BINDIR)/helm + && mv $(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]'))/helm $(BINDIR)/helm .PHONY: helm-docs/install ## install helm-docs From 5b3359bfea965e75dcda001ccda930aaea5c886b Mon Sep 17 00:00:00 2001 From: vankichi Date: Wed, 13 Nov 2024 15:31:20 +0900 Subject: [PATCH 6/8] :recycle: Fix Signed-off-by: vankichi --- Makefile.d/helm.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 38c9309036..83b4c5a7c1 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -24,8 +24,8 @@ $(BINDIR)/helm: TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')) \ && cd $(TEMP_DIR) \ && curl -fsSL "https://get.helm.sh/$${TAR_NAME}.tar.gz" -o "$(TEMP_DIR)/$${TAR_NAME}" \ - && tar xzvf "$(TEMP_DIR)/$${TAR_NAME}" \ - && mv $(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]'))/helm $(BINDIR)/helm + && tar xzvf --strip=1 "$(TEMP_DIR)/$${TAR_NAME}" \ + && mv helm $(BINDIR)/helm .PHONY: helm-docs/install ## install helm-docs From 72b063de8f774e60a909d29cc8f545d9abd4c9ef Mon Sep 17 00:00:00 2001 From: vankichi Date: Wed, 13 Nov 2024 15:50:07 +0900 Subject: [PATCH 7/8] :recycle: Fix Signed-off-by: vankichi --- Makefile.d/helm.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 83b4c5a7c1..74dd358fc8 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -24,7 +24,7 @@ $(BINDIR)/helm: TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')) \ && cd $(TEMP_DIR) \ && curl -fsSL "https://get.helm.sh/$${TAR_NAME}.tar.gz" -o "$(TEMP_DIR)/$${TAR_NAME}" \ - && tar xzvf --strip=1 "$(TEMP_DIR)/$${TAR_NAME}" \ + && tar -xzvf "$(TEMP_DIR)/$${TAR_NAME}" --strip=1 \ && mv helm $(BINDIR)/helm .PHONY: helm-docs/install @@ -37,7 +37,7 @@ $(BINDIR)/helm-docs: TAR_NAME=helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(DARCH).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}" \ + && tar -xzvf "$(TEMP_DIR)/$${TAR_NAME}" \ && mv helm-docs $(BINDIR)/helm-docs .PHONY: helm/package/vald From 415e4afecd9a11dc95faa56688f95b99cb9bf9a9 Mon Sep 17 00:00:00 2001 From: vankichi Date: Wed, 13 Nov 2024 16:42:30 +0900 Subject: [PATCH 8/8] :green_heart: remove platform opts Signed-off-by: vankichi --- .github/workflows/dockers-dev-container-image.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dockers-dev-container-image.yaml b/.github/workflows/dockers-dev-container-image.yaml index 8ff51e8749..e9e7c4cbbe 100644 --- a/.github/workflows/dockers-dev-container-image.yaml +++ b/.github/workflows/dockers-dev-container-image.yaml @@ -63,5 +63,4 @@ jobs: uses: ./.github/workflows/_docker-image.yaml with: target: dev-container - platforms: "linux/amd64,linux/arm64" secrets: inherit