Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
This commit is contained in:
Sertac Ozercan
2024-05-17 21:30:28 +00:00
parent 0dde605376
commit 19c6f4db70
3 changed files with 37 additions and 28 deletions

View File

@@ -3,39 +3,53 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
interval: weekly
groups:
actions-all:
patterns:
- "*"
- package-ecosystem: docker
directory: /
schedule:
interval: daily
interval: weekly
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
interval: weekly
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
groups:
k8s:
patterns:
- "k8s.io/*"
- "sigs.k8s.io/*"
- package-ecosystem: docker
directory: /pkg/util/nethealth
schedule:
interval: daily
interval: weekly
- package-ecosystem: gomod
directory: /test
schedule:
interval: daily
interval: weekly
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
groups:
k8s:
patterns:
- "k8s.io/*"
- "sigs.k8s.io/*"
- package-ecosystem: docker
directory: /test/kernel_log_generator
schedule:
interval: daily
- package-ecosystem: docker
directory: /vendor/github.com/hpcloud/tail
schedule:
interval: daily
- package-ecosystem: pip
directory: /vendor/go.opentelemetry.io/otel
schedule:
interval: daily
interval: weekly

View File

@@ -11,16 +11,15 @@
# 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.
ARG BASEIMAGE
# "builder-base" can be overriden using dockerb buildx's --build-context flag,
# by users who want to use a different images for the builder. E.g. if you need to use an older OS
# by users who want to use a different images for the builder. E.g. if you need to use an older OS
# to avoid dependencies on very recent glibc versions.
# E.g. of the param: --build-context builder-base=docker-image://golang:<something>@sha256:<something>
# Must override builder-base, not builder, since the latter is referred to later in the file and so must not be
# directly replaced. See here, and note that "stage" parameter mentioned there has been renamed to
# directly replaced. See here, and note that "stage" parameter mentioned there has been renamed to
# "build-context": https://github.com/docker/buildx/pull/904#issuecomment-1005871838
FROM golang:1.22.3-bookworm@sha256:5c56bd47228dd572d8a82971cf1f946cd8bb1862a8ec6dc9f3d387cc94136976 as builder-base
FROM golang:1.22-bookworm@sha256:5c56bd47228dd572d8a82971cf1f946cd8bb1862a8ec6dc9f3d387cc94136976 as builder-base
FROM builder-base as builder
LABEL maintainer="Andy Xie <andy.xning@gmail.com>"
@@ -36,8 +35,7 @@ COPY . /gopath/src/k8s.io/node-problem-detector/
WORKDIR /gopath/src/k8s.io/node-problem-detector
RUN GOARCH=${TARGETARCH} make bin/node-problem-detector bin/health-checker bin/log-counter
ARG BASEIMAGE
FROM --platform=${TARGETPLATFORM} ${BASEIMAGE}
FROM --platform=${TARGETPLATFORM} registry.k8s.io/build-image/debian-base:bookworm-v1.0.4@sha256:b30608f5a81f8ba99b287322d0bfb77ec506adcce396147aa4a59699d69be3e0 as base
LABEL maintainer="Random Liu <lantaol@google.com>"

View File

@@ -72,9 +72,6 @@ else ifeq ($(shell go env GOHOSTOS), windows)
ENABLE_JOURNALD=0
endif
# Set default base image to Debian 12 (Bookworm)
BASEIMAGE:=registry.k8s.io/build-image/debian-base:bookworm-v1.0.3
# Disable cgo by default to make the binary statically linked.
CGO_ENABLED:=0
@@ -238,7 +235,7 @@ build-binaries: $(ALL_BINARIES)
build-container: clean Dockerfile
docker buildx create --platform $(DOCKER_PLATFORMS) --use
docker buildx build --platform $(DOCKER_PLATFORMS) -t $(IMAGE) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg LOGCOUNTER=$(LOGCOUNTER) .
docker buildx build --platform $(DOCKER_PLATFORMS) -t $(IMAGE) --build-arg LOGCOUNTER=$(LOGCOUNTER) .
$(TARBALL): ./bin/node-problem-detector ./bin/log-counter ./bin/health-checker ./test/bin/problem-maker
tar -zcvf $(TARBALL) bin/ config/ test/e2e-install.sh test/bin/problem-maker
@@ -250,7 +247,7 @@ build-tar: $(TARBALL) $(ALL_TARBALLS)
build: build-container build-tar
docker-builder:
docker build -t npd-builder . --target=builder --build-arg BASEIMAGE=$(BASEIMAGE)
docker build -t npd-builder . --target=builder
build-in-docker: clean docker-builder
docker run \
@@ -263,7 +260,7 @@ ifneq (,$(findstring gcr.io,$(REGISTRY)))
gcloud auth configure-docker
endif
# Build should be cached from build-container
docker buildx build --push --platform $(DOCKER_PLATFORMS) -t $(IMAGE) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg LOGCOUNTER=$(LOGCOUNTER) .
docker buildx build --push --platform $(DOCKER_PLATFORMS) -t $(IMAGE) --build-arg LOGCOUNTER=$(LOGCOUNTER) .
push-tar: build-tar
gsutil cp $(TARBALL) $(UPLOAD_PATH)/node-problem-detector/