Skip to content

Commit bcd9d6c

Browse files
Auto: sync API from tigera/calico-private [master] (#261)
Automated sync of API files from `tigera/calico-private` `master` branch into this repo via `make -f Makefile.local update`. Triggered by scheduled workflow.
2 parents c9a1f7c + a8e0ea7 commit bcd9d6c

5 files changed

Lines changed: 55 additions & 33 deletions

File tree

config/crd/projectcalico.org_felixconfigurations.yaml

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib.Makefile

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ else
134134
THIRD_PARTY_REGISTRY?=$(THIRD_PARTY_REGISTRY_CD)
135135
endif
136136

137-
THIRD_PARTY_BASE_IMAGES_TO_RETAG = elasticsearch fluentd-base kibana snort3
137+
THIRD_PARTY_BASE_IMAGES_TO_RETAG = elasticsearch kibana snort3
138138
release-retag-third-party-base-images: var-require-one-of-CONFIRM-DRYRUN var-require-all-RELEASE_BRANCH
139139
$(MAKE) $(addprefix release-retag-third-party-base-images-,$(THIRD_PARTY_BASE_IMAGES_TO_RETAG))
140140

@@ -253,15 +253,19 @@ endef
253253
# "not a valid application for this OS platform" error.
254254
# https://github.com/golang/go/issues/75077
255255

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+
256266
# For windows builds that require cgo.
257267
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) \
265269
sh -c '$(GIT_CONFIG_SSH) go build -o $(2) $(if $(BUILD_TAGS),-tags $(BUILD_TAGS)) -v -buildvcs=false -ldflags "$(LDFLAGS) -s -w" $(1)'
266270
endef
267271

@@ -294,7 +298,7 @@ endif
294298
# only the tag is used without the commit count suffix.
295299
#
296300
# 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
298302
# embed buildinfo. Each $(shell git ...) call would otherwise spawn PowerShell on
299303
# every sub-make recursion, multiplying parse time noticeably.
300304
ifneq ($(OS),Windows_NT)
@@ -670,7 +674,7 @@ endef
670674
# this variable and include $(IMAGE_DEPS) in their .image.created prereqs.
671675
#
672676
# 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.
674678
# Each $(shell find ... grep ... cut ...) call would otherwise spawn PowerShell
675679
# (no find/grep/cut available) on every sub-make recursion. With ~20 components
676680
# referenced from .image.created-* prerequisites below, this was the dominant
@@ -1143,7 +1147,6 @@ SEMAPHORE_ES_GATEWAY_PROJECT_ID=3c01c819-532b-4ccc-8305-5dd45c10bf93
11431147
SEMAPHORE_FELIX_PRIVATE_PROJECT_ID=e439cca4-156c-4d23-b611-002601440ad0
11441148
SEMAPHORE_FELIX_PROJECT_ID=48267e65-4acc-4f27-a88f-c3df0e8e2c3b
11451149
SEMAPHORE_FIREWALL_INTEGRATION_PROJECT_ID=d4307a31-1e46-4622-82e2-886165b77008
1146-
SEMAPHORE_FLUENTD_DOCKER_PROJECT_ID=50383fb9-d234-461a-ae00-23e18b7cd5b8
11471150
SEMAPHORE_INGRESS_COLLECTOR_PROJECT_ID=cf7947e4-a886-404d-ac6a-c3f3ac1a7b93
11481151
SEMAPHORE_INTRUSION_DETECTION_PROJECT_ID=2beffe81-b05a-41e0-90ce-e0d847dee2ee
11491152
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
18511854
# Render the kind config with the requested kube-proxy mode.
18521855
sed 's/^\( mode: \)iptables$$/\1$(KIND_DATAPLANE)/' $(KIND_CONFIG) > $(KIND_DIR)/.$(KIND_NAME).rendered.config
18531856

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+
18541866
# Create a kind cluster.
18551867
$(KIND) create cluster \
18561868
--config $(KIND_DIR)/.$(KIND_NAME).rendered.config \
@@ -1985,7 +1997,7 @@ TSEE_TEST_LICENSE ?= $(HOME)/secrets/license.yaml
19851997
# pushes each as localhost:5000/tigera/<name>:test-build for the kind cluster.
19861998
KIND_ENTERPRISE_LOCAL_IMAGES = \
19871999
tigera/egress-gateway:$(KIND_TEST_BUILD_TAG) \
1988-
tigera/fluentd:$(KIND_TEST_BUILD_TAG) \
2000+
tigera/fluent-bit:$(KIND_TEST_BUILD_TAG) \
19892001
tigera/deep-packet-inspection:$(KIND_TEST_BUILD_TAG) \
19902002
tigera/intrusion-detection-controller:$(KIND_TEST_BUILD_TAG) \
19912003
tigera/intrusion-detection-job-installer:$(KIND_TEST_BUILD_TAG) \
@@ -2072,7 +2084,7 @@ $(REPO_ROOT)/key-cert-provisioner/.image.created-$(ARCH): \
20722084
# components without deps.txt approximate with find.
20732085
KIND_ENTERPRISE_IMAGE_MARKERS = \
20742086
$(REPO_ROOT)/egress-gateway/.image.created-$(ARCH) \
2075-
$(REPO_ROOT)/fluentd/.image.created-$(ARCH) \
2087+
$(REPO_ROOT)/fluent-bit/.fluent-bit.created-$(ARCH) \
20762088
$(REPO_ROOT)/intrusion-detection-controller/.image.created-$(ARCH) \
20772089
$(REPO_ROOT)/deep-packet-inspection/.image.created-$(ARCH) \
20782090
$(REPO_ROOT)/gateway/.gateway-l7-collector.created-$(ARCH) \
@@ -2169,12 +2181,13 @@ $(REPO_ROOT)/egress-gateway/.image.created-$(ARCH): \
21692181
$(MAKE) -C $(REPO_ROOT)/egress-gateway image
21702182
echo "egress-gateway:latest-$(ARCH)" > $@
21712183

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)
21752189
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
21782191

21792192
# gateway uses its own marker name (.gateway-l7-collector.created-$(ARCH))
21802193
# rather than .image.created-$(ARCH); follow the same source-tracking pattern.

pkg/apis/projectcalico/v3/felixconfig.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,11 @@ type FelixConfigurationSpec struct {
11741174
// FlowLogsFileEnabledForDenied is used to enable/disable flow logs entries created for denied flows. Default is true.
11751175
// This parameter only takes effect when FlowLogsFileReporterEnabled is set to true.
11761176
FlowLogsFileEnabledForDenied *bool `json:"flowLogsFileEnabledForDenied,omitempty"`
1177-
// FlowLogsDynamicAggregationEnabled is used to enable/disable dynamically changing aggregation levels. Default is true.
1177+
// FlowLogsDynamicAggregationEnabled is used to enable/disable dynamically changing aggregation levels. Default is false.
11781178
FlowLogsDynamicAggregationEnabled *bool `json:"flowLogsDynamicAggregationEnabled,omitempty"`
1179-
// FlowLogsPositionFilePath is used specify the position of the external pipeline that reads flow logs. Default is /var/log/calico/flows.log.pos.
1179+
// FlowLogsPositionFilePath is the path of the log collector's tail-offset database for flow logs (fluent-bit's
1180+
// in_tail SQLite DB), used to determine how far behind the flow logs the collector is.
1181+
// Default is /var/log/calico/calico-fluent-bit/in_tail_flows.db.
11801182
// This parameter only takes effect when FlowLogsDynamicAggregationEnabled is set to true.
11811183
FlowLogsPositionFilePath *string `json:"flowLogsPositionFilePath,omitempty"`
11821184
// FlowLogsAggregationThresholdBytes is used specify how far behind the external pipeline that reads flow logs can be. Default is 8192 bytes.
@@ -1198,8 +1200,9 @@ type FelixConfigurationSpec struct {
11981200

11991201
// WindowsFlowLogsFileDirectory sets the directory where flow logs files are stored on Windows nodes. [Default: "c:\\TigeraCalico\\flowlogs"].
12001202
WindowsFlowLogsFileDirectory string `json:"windowsFlowLogsFileDirectory,omitempty"`
1201-
// WindowsFlowLogsPositionFilePath is used to specify the position of the external pipeline that reads flow logs on Windows nodes.
1202-
// [Default: "c:\\TigeraCalico\\flowlogs\\flows.log.pos"].
1203+
// WindowsFlowLogsPositionFilePath is the path of the log collector's tail-offset database for flow logs
1204+
// (fluent-bit's in_tail SQLite DB) on Windows nodes.
1205+
// [Default: "c:\\TigeraCalico\\calico-fluent-bit\\in_tail_flows.db"].
12031206
// This parameter only takes effect when FlowLogsDynamicAggregationEnabled is set to true.
12041207
WindowsFlowLogsPositionFilePath string `json:"windowsFlowLogsPositionFilePath,omitempty"`
12051208
// WindowsStatsDumpFilePath is used to specify the path of the stats dump file on Windows nodes. [Default: "c:\\TigeraCalico\\stats\\dump"]

pkg/client/applyconfiguration_generated/projectcalico/v3/felixconfigurationspec.go

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/openapi/generated.openapi.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)