Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/ipam/v1alpha1/ip_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ type IPSpec struct {
// IP is the local IP.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="IP field is immutable"
IP networkingv1beta1.IP `json:"ip"`
// CIDR is the network CIDR where the desired IP should be allocated from.
// It is optional, if left empty the IP will be allocated in a default network CIDR (e.g., external CIDR).
// +kubebuilder:validation:Optional
CIDR *networkingv1beta1.CIDR `json:"cidr,omitempty"`
// ServiceTemplate contains the template to create the associated service (and endpointslice) for the IP endopoint.
// If empty the creation of the service is disabled (default).
// +kubebuilder:validation:Optional
Expand Down
5 changes: 5 additions & 0 deletions apis/ipam/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions deployments/liqo/charts/liqo-crds/crds/ipam.liqo.io_ips.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ spec:
spec:
description: IPSpec defines a local IP.
properties:
cidr:
description: |-
CIDR is the network CIDR where the desired IP should be allocated from.
It is optional, if left empty the IP will be allocated in a default network CIDR (e.g., external CIDR).
format: cidr
type: string
ip:
description: IP is the local IP.
format: ipv4
Expand Down
17 changes: 4 additions & 13 deletions pkg/ipam/ipam.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pkg/ipam/ipam.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ message ResponseResult {
}

message IPAcquireRequest {
string ip = 1;
string cidr = 2;
string cidr = 1;
}

message IPAcquireResponse {
Expand Down