diff --git a/build/charts/antrea/crds/bgppolicy.yaml b/build/charts/antrea/crds/bgppolicy.yaml index 9dbe3597a7e..376f286de98 100644 --- a/build/charts/antrea/crds/bgppolicy.yaml +++ b/build/charts/antrea/crds/bgppolicy.yaml @@ -55,6 +55,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea-aks.yml b/build/yamls/antrea-aks.yml index 81679827438..7c9cda47888 100644 --- a/build/yamls/antrea-aks.yml +++ b/build/yamls/antrea-aks.yml @@ -359,6 +359,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea-crds.yml b/build/yamls/antrea-crds.yml index d8f24be9727..b22b1eb873b 100644 --- a/build/yamls/antrea-crds.yml +++ b/build/yamls/antrea-crds.yml @@ -354,6 +354,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea-eks.yml b/build/yamls/antrea-eks.yml index a73bc4dd859..288fab21c32 100644 --- a/build/yamls/antrea-eks.yml +++ b/build/yamls/antrea-eks.yml @@ -359,6 +359,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea-gke.yml b/build/yamls/antrea-gke.yml index 220149ddfd0..f16d186ea27 100644 --- a/build/yamls/antrea-gke.yml +++ b/build/yamls/antrea-gke.yml @@ -359,6 +359,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea-ipsec.yml b/build/yamls/antrea-ipsec.yml index ffb114b2625..040ff5ae303 100644 --- a/build/yamls/antrea-ipsec.yml +++ b/build/yamls/antrea-ipsec.yml @@ -359,6 +359,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/build/yamls/antrea.yml b/build/yamls/antrea.yml index 205ffc38f48..a3ff0166f93 100644 --- a/build/yamls/antrea.yml +++ b/build/yamls/antrea.yml @@ -359,6 +359,21 @@ spec: minimum: 1 maximum: 65535 default: 179 + confederation: + type: object + properties: + identifier: + type: integer + format: int32 + minimum: 1 + maximum: 65535 + memberASNs: + type: array + items: + type: integer + format: int32 + minimum: 1 + maximum: 65535 advertisements: type: object properties: diff --git a/pkg/apis/crd/v1alpha1/types.go b/pkg/apis/crd/v1alpha1/types.go index c13a9954dac..e83418ef858 100644 --- a/pkg/apis/crd/v1alpha1/types.go +++ b/pkg/apis/crd/v1alpha1/types.go @@ -269,6 +269,9 @@ type BGPPolicySpec struct { // ListenPort is the port on which the BGP process listens, and the default value is 179. ListenPort *int32 `json:"listenPort,omitempty"` + // Confederation specifies BGP confederation configuration. + Confederation *Confederation `json:"confederation,omitempty"` + // Advertisements configures IPs or CIDRs to be advertised to BGP peers. Advertisements Advertisements `json:"advertisements,omitempty"` @@ -289,6 +292,14 @@ type Advertisements struct { Egress *EgressAdvertisement `json:"egress,omitempty"` } +type Confederation struct { + // Identifier specifies the confederation's ASN. + Identifier int32 `json:"identifier,omitempty"` + + // MemberASNs lists the ASNs of other members in the confederation. + MemberASNs []int32 `json:"memberASNs,omitempty"` +} + type ServiceIPType string const ( diff --git a/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go index 4dea41e333a..02d0fef1f6e 100644 --- a/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -// Copyright 2024 Antrea Authors +// Copyright 2025 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -157,6 +157,11 @@ func (in *BGPPolicySpec) DeepCopyInto(out *BGPPolicySpec) { *out = new(int32) **out = **in } + if in.Confederation != nil { + in, out := &in.Confederation, &out.Confederation + *out = new(Confederation) + (*in).DeepCopyInto(*out) + } in.Advertisements.DeepCopyInto(&out.Advertisements) if in.BGPPeers != nil { in, out := &in.BGPPeers, &out.BGPPeers @@ -293,6 +298,27 @@ func (in *CaptureConfig) DeepCopy() *CaptureConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Confederation) DeepCopyInto(out *Confederation) { + *out = *in + if in.MemberASNs != nil { + in, out := &in.MemberASNs, &out.MemberASNs + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Confederation. +func (in *Confederation) DeepCopy() *Confederation { + if in == nil { + return nil + } + out := new(Confederation) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Destination) DeepCopyInto(out *Destination) { *out = *in