@@ -635,3 +635,133 @@ type IngressClassList struct {
635
635
// items is the list of IngressClasses.
636
636
Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"`
637
637
}
638
+
639
+ // +genclient
640
+ // +genclient:nonNamespaced
641
+ // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
642
+ // +k8s:prerelease-lifecycle-gen:introduced=1.33
643
+
644
+ // IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs
645
+ // that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses.
646
+ // An IP address can be represented in different formats, to guarantee the uniqueness of the IP,
647
+ // the name of the object is the IP address in canonical format, four decimal digits separated
648
+ // by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6.
649
+ // Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
650
+ // Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
651
+ type IPAddress struct {
652
+ metav1.TypeMeta `json:",inline"`
653
+ // Standard object's metadata.
654
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
655
+ // +optional
656
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
657
+ // spec is the desired state of the IPAddress.
658
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
659
+ // +optional
660
+ Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
661
+ }
662
+
663
+ // IPAddressSpec describe the attributes in an IP Address.
664
+ type IPAddressSpec struct {
665
+ // ParentRef references the resource that an IPAddress is attached to.
666
+ // An IPAddress must reference a parent object.
667
+ // +required
668
+ ParentRef * ParentReference `json:"parentRef,omitempty" protobuf:"bytes,1,opt,name=parentRef"`
669
+ }
670
+
671
+ // ParentReference describes a reference to a parent object.
672
+ type ParentReference struct {
673
+ // Group is the group of the object being referenced.
674
+ // +optional
675
+ Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
676
+ // Resource is the resource of the object being referenced.
677
+ // +required
678
+ Resource string `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"`
679
+ // Namespace is the namespace of the object being referenced.
680
+ // +optional
681
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
682
+ // Name is the name of the object being referenced.
683
+ // +required
684
+ Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"`
685
+ }
686
+
687
+ // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
688
+ // +k8s:prerelease-lifecycle-gen:introduced=1.33
689
+
690
+ // IPAddressList contains a list of IPAddress.
691
+ type IPAddressList struct {
692
+ metav1.TypeMeta `json:",inline"`
693
+ // Standard object's metadata.
694
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
695
+ // +optional
696
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
697
+ // items is the list of IPAddresses.
698
+ Items []IPAddress `json:"items" protobuf:"bytes,2,rep,name=items"`
699
+ }
700
+
701
+ // +genclient
702
+ // +genclient:nonNamespaced
703
+ // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
704
+ // +k8s:prerelease-lifecycle-gen:introduced=1.33
705
+
706
+ // ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64).
707
+ // This range is used to allocate ClusterIPs to Service objects.
708
+ type ServiceCIDR struct {
709
+ metav1.TypeMeta `json:",inline"`
710
+ // Standard object's metadata.
711
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
712
+ // +optional
713
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
714
+ // spec is the desired state of the ServiceCIDR.
715
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
716
+ // +optional
717
+ Spec ServiceCIDRSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
718
+ // status represents the current state of the ServiceCIDR.
719
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
720
+ // +optional
721
+ Status ServiceCIDRStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
722
+ }
723
+
724
+ // ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
725
+ type ServiceCIDRSpec struct {
726
+ // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64")
727
+ // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family.
728
+ // This field is immutable.
729
+ // +optional
730
+ // +listType=atomic
731
+ CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"`
732
+ }
733
+
734
+ const (
735
+ // ServiceCIDRConditionReady represents status of a ServiceCIDR that is ready to be used by the
736
+ // apiserver to allocate ClusterIPs for Services.
737
+ ServiceCIDRConditionReady = "Ready"
738
+ // ServiceCIDRReasonTerminating represents a reason where a ServiceCIDR is not ready because it is
739
+ // being deleted.
740
+ ServiceCIDRReasonTerminating = "Terminating"
741
+ )
742
+
743
+ // ServiceCIDRStatus describes the current state of the ServiceCIDR.
744
+ type ServiceCIDRStatus struct {
745
+ // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR.
746
+ // Current service state
747
+ // +optional
748
+ // +patchMergeKey=type
749
+ // +patchStrategy=merge
750
+ // +listType=map
751
+ // +listMapKey=type
752
+ Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
753
+ }
754
+
755
+ // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
756
+ // +k8s:prerelease-lifecycle-gen:introduced=1.33
757
+
758
+ // ServiceCIDRList contains a list of ServiceCIDR objects.
759
+ type ServiceCIDRList struct {
760
+ metav1.TypeMeta `json:",inline"`
761
+ // Standard object's metadata.
762
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
763
+ // +optional
764
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
765
+ // items is the list of ServiceCIDRs.
766
+ Items []ServiceCIDR `json:"items" protobuf:"bytes,2,rep,name=items"`
767
+ }
0 commit comments