|
134 | 134 | THIRD_PARTY_REGISTRY?=$(THIRD_PARTY_REGISTRY_CD) |
135 | 135 | endif |
136 | 136 |
|
137 | | -THIRD_PARTY_BASE_IMAGES_TO_RETAG = elasticsearch fluentd-base kibana snort3 |
| 137 | +THIRD_PARTY_BASE_IMAGES_TO_RETAG = elasticsearch kibana snort3 |
138 | 138 | release-retag-third-party-base-images: var-require-one-of-CONFIRM-DRYRUN var-require-all-RELEASE_BRANCH |
139 | 139 | $(MAKE) $(addprefix release-retag-third-party-base-images-,$(THIRD_PARTY_BASE_IMAGES_TO_RETAG)) |
140 | 140 |
|
@@ -253,15 +253,19 @@ endef |
253 | 253 | # "not a valid application for this OS platform" error. |
254 | 254 | # https://github.com/golang/go/issues/75077 |
255 | 255 |
|
| 256 | +# Docker env for cgo Windows (amd64) cross-compilation via the MinGW toolchain. |
| 257 | +# Shared by build_cgo_windows_binary (go build) and by cgo test-binary targets |
| 258 | +# that need the same toolchain but run `go test -c` (e.g. felix's fv/win-fv.exe). |
| 259 | +CGO_WINDOWS_DOCKER_ENV = \ |
| 260 | + -e CC=x86_64-w64-mingw32-gcc \ |
| 261 | + -e CGO_ENABLED=1 \ |
| 262 | + -e GOARCH=amd64 \ |
| 263 | + -e GOOS=windows \ |
| 264 | + -e GOEXPERIMENT=nodwarf5 |
| 265 | + |
256 | 266 | # For windows builds that require cgo. |
257 | 267 | define build_cgo_windows_binary |
258 | | - $(DOCKER_RUN) \ |
259 | | - -e CC=x86_64-w64-mingw32-gcc \ |
260 | | - -e CGO_ENABLED=1 \ |
261 | | - -e GOARCH=amd64 \ |
262 | | - -e GOOS=windows \ |
263 | | - -e GOEXPERIMENT=nodwarf5 \ |
264 | | - $(CALICO_BUILD) \ |
| 268 | + $(DOCKER_RUN) $(CGO_WINDOWS_DOCKER_ENV) $(CALICO_BUILD) \ |
265 | 269 | sh -c '$(GIT_CONFIG_SSH) go build -o $(2) $(if $(BUILD_TAGS),-tags $(BUILD_TAGS)) -v -buildvcs=false -ldflags "$(LDFLAGS) -s -w" $(1)' |
266 | 270 | endef |
267 | 271 |
|
@@ -294,7 +298,7 @@ endif |
294 | 298 | # only the tag is used without the commit count suffix. |
295 | 299 | # |
296 | 300 | # Skip on Windows: these LDFLAGS-related vars use bash `||` fallbacks that PowerShell |
297 | | -# can't parse, and Windows builds (e.g. fluentd-base) don't link Go binaries that |
| 301 | +# can't parse, and pure-Docker Windows image builds don't link Go binaries that |
298 | 302 | # embed buildinfo. Each $(shell git ...) call would otherwise spawn PowerShell on |
299 | 303 | # every sub-make recursion, multiplying parse time noticeably. |
300 | 304 | ifneq ($(OS),Windows_NT) |
@@ -670,7 +674,7 @@ endef |
670 | 674 | # this variable and include $(IMAGE_DEPS) in their .image.created prereqs. |
671 | 675 | # |
672 | 676 | # Skip on Windows: this is dependency tracking for Linux Go-based image stamps; |
673 | | -# Windows components (e.g. third_party/fluentd-base) build pure Docker images. |
| 677 | +# Windows components that build pure Docker images (no Go binary) don't need it. |
674 | 678 | # Each $(shell find ... grep ... cut ...) call would otherwise spawn PowerShell |
675 | 679 | # (no find/grep/cut available) on every sub-make recursion. With ~20 components |
676 | 680 | # referenced from .image.created-* prerequisites below, this was the dominant |
@@ -1143,7 +1147,6 @@ SEMAPHORE_ES_GATEWAY_PROJECT_ID=3c01c819-532b-4ccc-8305-5dd45c10bf93 |
1143 | 1147 | SEMAPHORE_FELIX_PRIVATE_PROJECT_ID=e439cca4-156c-4d23-b611-002601440ad0 |
1144 | 1148 | SEMAPHORE_FELIX_PROJECT_ID=48267e65-4acc-4f27-a88f-c3df0e8e2c3b |
1145 | 1149 | SEMAPHORE_FIREWALL_INTEGRATION_PROJECT_ID=d4307a31-1e46-4622-82e2-886165b77008 |
1146 | | -SEMAPHORE_FLUENTD_DOCKER_PROJECT_ID=50383fb9-d234-461a-ae00-23e18b7cd5b8 |
1147 | 1150 | SEMAPHORE_INGRESS_COLLECTOR_PROJECT_ID=cf7947e4-a886-404d-ac6a-c3f3ac1a7b93 |
1148 | 1151 | SEMAPHORE_INTRUSION_DETECTION_PROJECT_ID=2beffe81-b05a-41e0-90ce-e0d847dee2ee |
1149 | 1152 | SEMAPHORE_KEY_CERT_PROVISIONER_PROJECT_ID=9efb25f3-8c5d-4f22-aab5-4a1f5519bc7c |
@@ -1851,6 +1854,15 @@ $(REPO_ROOT)/.$(KIND_NAME).created: $(KUBECTL) $(KIND) kind-registry-up |
1851 | 1854 | # Render the kind config with the requested kube-proxy mode. |
1852 | 1855 | sed 's/^\( mode: \)iptables$$/\1$(KIND_DATAPLANE)/' $(KIND_CONFIG) > $(KIND_DIR)/.$(KIND_NAME).rendered.config |
1853 | 1856 |
|
| 1857 | + # calico-fluent-bit's in_tail (several tail inputs) plus per-node kube-proxy |
| 1858 | + # exhaust the default inotify instance limit (128) across the kind nodes, |
| 1859 | + # crash-looping the calico-fluent-bit pods with "too many open files" and |
| 1860 | + # failing kind-deploy. Raise the limits before creating the cluster (same |
| 1861 | + # values as hack/test/kind/vrf/vrf.sh). Non-interactive (sudo -n) so it never |
| 1862 | + # blocks a headless run; best-effort warn (don't fail) if we can't set them, |
| 1863 | + # e.g. no passwordless sudo on a dev box. |
| 1864 | + sudo -n sysctl -w fs.inotify.max_user_instances=512 fs.inotify.max_user_watches=524288 || echo "WARNING: could not raise inotify limits; calico-fluent-bit may crash-loop with 'too many open files'" |
| 1865 | + |
1854 | 1866 | # Create a kind cluster. |
1855 | 1867 | $(KIND) create cluster \ |
1856 | 1868 | --config $(KIND_DIR)/.$(KIND_NAME).rendered.config \ |
@@ -1985,7 +1997,7 @@ TSEE_TEST_LICENSE ?= $(HOME)/secrets/license.yaml |
1985 | 1997 | # pushes each as localhost:5000/tigera/<name>:test-build for the kind cluster. |
1986 | 1998 | KIND_ENTERPRISE_LOCAL_IMAGES = \ |
1987 | 1999 | tigera/egress-gateway:$(KIND_TEST_BUILD_TAG) \ |
1988 | | - tigera/fluentd:$(KIND_TEST_BUILD_TAG) \ |
| 2000 | + tigera/fluent-bit:$(KIND_TEST_BUILD_TAG) \ |
1989 | 2001 | tigera/deep-packet-inspection:$(KIND_TEST_BUILD_TAG) \ |
1990 | 2002 | tigera/intrusion-detection-controller:$(KIND_TEST_BUILD_TAG) \ |
1991 | 2003 | tigera/intrusion-detection-job-installer:$(KIND_TEST_BUILD_TAG) \ |
@@ -2072,7 +2084,7 @@ $(REPO_ROOT)/key-cert-provisioner/.image.created-$(ARCH): \ |
2072 | 2084 | # components without deps.txt approximate with find. |
2073 | 2085 | KIND_ENTERPRISE_IMAGE_MARKERS = \ |
2074 | 2086 | $(REPO_ROOT)/egress-gateway/.image.created-$(ARCH) \ |
2075 | | - $(REPO_ROOT)/fluentd/.image.created-$(ARCH) \ |
| 2087 | + $(REPO_ROOT)/fluent-bit/.fluent-bit.created-$(ARCH) \ |
2076 | 2088 | $(REPO_ROOT)/intrusion-detection-controller/.image.created-$(ARCH) \ |
2077 | 2089 | $(REPO_ROOT)/deep-packet-inspection/.image.created-$(ARCH) \ |
2078 | 2090 | $(REPO_ROOT)/gateway/.gateway-l7-collector.created-$(ARCH) \ |
@@ -2169,12 +2181,13 @@ $(REPO_ROOT)/egress-gateway/.image.created-$(ARCH): \ |
2169 | 2181 | $(MAKE) -C $(REPO_ROOT)/egress-gateway image |
2170 | 2182 | echo "egress-gateway:latest-$(ARCH)" > $@ |
2171 | 2183 |
|
2172 | | -$(REPO_ROOT)/fluentd/.image.created-$(ARCH): \ |
2173 | | - $(shell $(REPO_ROOT)/hack/image-exists $(REPO_ROOT)/fluentd/.image.created-$(ARCH)) \ |
2174 | | - $(call local-deps-go-files,fluentd) |
| 2184 | +# fluent-bit uses its own marker name (.fluent-bit.created-$(ARCH)) rather than |
| 2185 | +# .image.created-$(ARCH); its Makefile creates the marker, like gateway. |
| 2186 | +$(REPO_ROOT)/fluent-bit/.fluent-bit.created-$(ARCH): \ |
| 2187 | + $(shell $(REPO_ROOT)/hack/image-exists $(REPO_ROOT)/fluent-bit/.fluent-bit.created-$(ARCH)) \ |
| 2188 | + $(call local-deps-go-files,fluent-bit) |
2175 | 2189 | rm -f $@ |
2176 | | - $(MAKE) -C $(REPO_ROOT)/fluentd image THIRD_PARTY_REGISTRY=$(THIRD_PARTY_REGISTRY_CD) |
2177 | | - echo "fluentd:latest-$(ARCH)" > $@ |
| 2190 | + $(MAKE) -C $(REPO_ROOT)/fluent-bit image |
2178 | 2191 |
|
2179 | 2192 | # gateway uses its own marker name (.gateway-l7-collector.created-$(ARCH)) |
2180 | 2193 | # rather than .image.created-$(ARCH); follow the same source-tracking pattern. |
|
0 commit comments