Skip to content

Commit 39f0d27

Browse files
authored
Merge pull request #2310 from kube-logging/fix/ipv6-service-families
Make enabledIPv6 work without breaking single-stack clusters
2 parents 7cf7d1e + 03f0a28 commit 39f0d27

39 files changed

Lines changed: 884 additions & 47 deletions

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ v1alpha1 is the legacy API; conversion functions exist to v1beta1 (which is the
151151

152152
**Immutable fields**: `controlNamespace`, `FluentbitAgentNamespace`, and `AllowClusterResourcesFromAllNamespaces` are CRD-enforced immutable on `Logging` resources (via `XValidation`). Changing them requires deleting and recreating the resource.
153153

154+
**Server-allocated Service fields**: `clusterIP`, `clusterIPs` and `ipFamilies` are assigned by the API server, so reconcilers pin them to the live object in a `beforeUpdateHook` (`v1beta1.PreserveAllocatedIPFamilies`) instead of asserting a desired value. Changing an existing Service's primary IP family is rejected as *invalid* rather than *immutable*, so `MatchImmutableErrorMessages` does not match it and the recreate fallback never fires — the reconcile fails permanently. Naming an IP family the cluster has no range for is rejected the same way, on create.
155+
154156
## Testing
155157

156158
- Unit/integration tests use `envtest` (embedded Kubernetes API server + etcd); no cluster needed

charts/logging-operator/charts/logging-operator-crds/templates/logging.banzaicloud.io_fluentbitagents.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ spec:
794794
type: object
795795
bufferVolumeMetrics:
796796
properties:
797+
bind:
798+
type: string
797799
enabled:
798800
type: boolean
799801
interval:
@@ -1740,6 +1742,8 @@ spec:
17401742
type: string
17411743
metrics:
17421744
properties:
1745+
bind:
1746+
type: string
17431747
enabled:
17441748
type: boolean
17451749
interval:

charts/logging-operator/charts/logging-operator-crds/templates/logging.banzaicloud.io_fluentdconfigs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,8 @@ spec:
782782
type: object
783783
bufferVolumeMetrics:
784784
properties:
785+
bind:
786+
type: string
785787
enabled:
786788
type: boolean
787789
interval:
@@ -3420,6 +3422,8 @@ spec:
34203422
type: string
34213423
metrics:
34223424
properties:
3425+
bind:
3426+
type: string
34233427
enabled:
34243428
type: boolean
34253429
interval:

charts/logging-operator/charts/logging-operator-crds/templates/logging.banzaicloud.io_loggings.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,8 @@ spec:
16631663
type: object
16641664
bufferVolumeMetrics:
16651665
properties:
1666+
bind:
1667+
type: string
16661668
enabled:
16671669
type: boolean
16681670
interval:
@@ -2609,6 +2611,8 @@ spec:
26092611
type: string
26102612
metrics:
26112613
properties:
2614+
bind:
2615+
type: string
26122616
enabled:
26132617
type: boolean
26142618
interval:
@@ -4416,6 +4420,8 @@ spec:
44164420
type: object
44174421
bufferVolumeMetrics:
44184422
properties:
4423+
bind:
4424+
type: string
44194425
enabled:
44204426
type: boolean
44214427
interval:
@@ -7054,6 +7060,8 @@ spec:
70547060
type: string
70557061
metrics:
70567062
properties:
7063+
bind:
7064+
type: string
70577065
enabled:
70587066
type: boolean
70597067
interval:
@@ -9581,6 +9589,8 @@ spec:
95819589
properties:
95829590
bufferVolumeMetrics:
95839591
properties:
9592+
bind:
9593+
type: string
95849594
enabled:
95859595
type: boolean
95869596
interval:
@@ -13788,6 +13798,8 @@ spec:
1378813798
type: integer
1378913799
metrics:
1379013800
properties:
13801+
bind:
13802+
type: string
1379113803
enabled:
1379213804
type: boolean
1379313805
interval:

charts/logging-operator/charts/logging-operator-crds/templates/logging.banzaicloud.io_syslogngconfigs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
properties:
3434
bufferVolumeMetrics:
3535
properties:
36+
bind:
37+
type: string
3638
enabled:
3739
type: boolean
3840
interval:
@@ -4240,6 +4242,8 @@ spec:
42404242
type: integer
42414243
metrics:
42424244
properties:
4245+
bind:
4246+
type: string
42434247
enabled:
42444248
type: boolean
42454249
interval:

charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ spec:
791791
type: object
792792
bufferVolumeMetrics:
793793
properties:
794+
bind:
795+
type: string
794796
enabled:
795797
type: boolean
796798
interval:
@@ -1737,6 +1739,8 @@ spec:
17371739
type: string
17381740
metrics:
17391741
properties:
1742+
bind:
1743+
type: string
17401744
enabled:
17411745
type: boolean
17421746
interval:

charts/logging-operator/crds/logging.banzaicloud.io_fluentdconfigs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ spec:
779779
type: object
780780
bufferVolumeMetrics:
781781
properties:
782+
bind:
783+
type: string
782784
enabled:
783785
type: boolean
784786
interval:
@@ -3417,6 +3419,8 @@ spec:
34173419
type: string
34183420
metrics:
34193421
properties:
3422+
bind:
3423+
type: string
34203424
enabled:
34213425
type: boolean
34223426
interval:

charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,8 @@ spec:
16601660
type: object
16611661
bufferVolumeMetrics:
16621662
properties:
1663+
bind:
1664+
type: string
16631665
enabled:
16641666
type: boolean
16651667
interval:
@@ -2606,6 +2608,8 @@ spec:
26062608
type: string
26072609
metrics:
26082610
properties:
2611+
bind:
2612+
type: string
26092613
enabled:
26102614
type: boolean
26112615
interval:
@@ -4413,6 +4417,8 @@ spec:
44134417
type: object
44144418
bufferVolumeMetrics:
44154419
properties:
4420+
bind:
4421+
type: string
44164422
enabled:
44174423
type: boolean
44184424
interval:
@@ -7051,6 +7057,8 @@ spec:
70517057
type: string
70527058
metrics:
70537059
properties:
7060+
bind:
7061+
type: string
70547062
enabled:
70557063
type: boolean
70567064
interval:
@@ -9578,6 +9586,8 @@ spec:
95789586
properties:
95799587
bufferVolumeMetrics:
95809588
properties:
9589+
bind:
9590+
type: string
95819591
enabled:
95829592
type: boolean
95839593
interval:
@@ -13785,6 +13795,8 @@ spec:
1378513795
type: integer
1378613796
metrics:
1378713797
properties:
13798+
bind:
13799+
type: string
1378813800
enabled:
1378913801
type: boolean
1379013802
interval:

charts/logging-operator/crds/logging.banzaicloud.io_syslogngconfigs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ spec:
3030
properties:
3131
bufferVolumeMetrics:
3232
properties:
33+
bind:
34+
type: string
3335
enabled:
3436
type: boolean
3537
interval:
@@ -4237,6 +4239,8 @@ spec:
42374239
type: integer
42384240
metrics:
42394241
properties:
4242+
bind:
4243+
type: string
42404244
enabled:
42414245
type: boolean
42424246
interval:

config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ spec:
791791
type: object
792792
bufferVolumeMetrics:
793793
properties:
794+
bind:
795+
type: string
794796
enabled:
795797
type: boolean
796798
interval:
@@ -1737,6 +1739,8 @@ spec:
17371739
type: string
17381740
metrics:
17391741
properties:
1742+
bind:
1743+
type: string
17401744
enabled:
17411745
type: boolean
17421746
interval:

0 commit comments

Comments
 (0)