Skip to content

Commit ca2fc22

Browse files
committed
Use debian-base image from kubernetes repository as base for NPD.
This image is based on Debian Stretch (9) which has a recent version of systemd libraries that includes all necessary compression algorithms. I propose using that image unconditionally (instead of Alpine when journald is disabled) since the image size with debian-base is not that much of a concern anymore.
1 parent c430627 commit ca2fc22

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,17 @@ IMAGE:=$(REGISTRY)/node-problem-detector:$(TAG)
5050
ENABLE_JOURNALD?=1
5151

5252
# TODO(random-liu): Support different architectures.
53-
BASEIMAGE:=alpine:3.4
53+
# The debian-base:0.3 image built from kubernetes repository is based on Debian Stretch.
54+
# It includes systemd 232 with support for both +XZ and +LZ4 compression.
55+
# +LZ4 is needed on some os distros such as COS.
56+
BASEIMAGE:=gcr.io/google-containers/debian-base-amd64:0.3
5457

5558
# Disable cgo by default to make the binary statically linked.
5659
CGO_ENABLED:=0
5760

58-
# NOTE that enable journald will increase the image size.
5961
ifeq ($(ENABLE_JOURNALD), 1)
6062
# Enable journald build tag.
6163
BUILD_TAGS:=-tags journald
62-
# Use fedora because it has newer systemd version (229) and support +LZ4. +LZ4 is needed
63-
# on some os distros such as GCI.
64-
BASEIMAGE:=fedora
6564
# Enable cgo because sdjournal needs cgo to compile. The binary will be dynamically
6665
# linked if CGO_ENABLED is enabled. This is fine because fedora already has necessary
6766
# dynamic library. We can not use `-extldflags "-static"` here, because go-systemd uses

0 commit comments

Comments
 (0)