mirror of
https://github.com/k8snetworkplumbingwg/whereabouts.git
synced 2025-06-03 06:42:26 +00:00
Add Interface property in the API
This is needed in order to uniquely identify allocations for pods with multiple interfaces. These allocations have the same podRef. Signed-off-by: Marcelo Guerrero <marguerr@redhat.com>
This commit is contained in:
parent
c06227d4a2
commit
420dc524d6
@ -46,6 +46,8 @@ spec:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
ifname:
|
||||
type: string
|
||||
podref:
|
||||
type: string
|
||||
required:
|
||||
|
@ -43,10 +43,11 @@ spec:
|
||||
properties:
|
||||
containerid:
|
||||
type: string
|
||||
ifname:
|
||||
type: string
|
||||
podref:
|
||||
type: string
|
||||
required:
|
||||
- containerid
|
||||
- podref
|
||||
type: object
|
||||
required:
|
||||
|
@ -24,6 +24,7 @@ func (i IPPool) ParseCIDR() (net.IP, *net.IPNet, error) {
|
||||
type IPAllocation struct {
|
||||
ContainerID string `json:"id"`
|
||||
PodRef string `json:"podref"`
|
||||
IfName string `json:"ifname,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
|
@ -4,8 +4,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// OverlappingRangeIPReservationSpec defines the desired state of OverlappingRangeIPReservation
|
||||
type OverlappingRangeIPReservationSpec struct {
|
||||
ContainerID string `json:"containerid"`
|
||||
ContainerID string `json:"containerid,omitempty"`
|
||||
PodRef string `json:"podref"`
|
||||
IfName string `json:"ifname,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
|
Loading…
Reference in New Issue
Block a user