Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
26 changes: 18 additions & 8 deletions crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import (
// +kubebuilder:metadata:labels=managed=
// +kubebuilder:metadata:labels=owner=
// +kubebuilder:printcolumn:name="PodNetworkInstance",type=string,JSONPath=`.spec.podNetworkInstance`
// +kubebuilder:printcolumn:name="PodNetwork",type=string,JSONPath=`.spec.podNetwork`
// +kubebuilder:printcolumn:name="PodName",type=string,JSONPath=`.spec.podName`
// +kubebuilder:printcolumn:name="PodUID",type=string,JSONPath=`.spec.podUID`
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`
type MultitenantPodNetworkConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down Expand Up @@ -64,17 +65,26 @@ const (
)

// MTPNCStatus indicates the high-level status of MultitenantPodNetworkConfig
// +kubebuilder:validation:Enum=Ready;Pending;InternalError;PNINotFound;PNINotReady;NodeCapacityExceeded;IPsExhausted
// +kubebuilder:validation:Enum=Ready;Pending;InternalError;PNINotFound;PNINotReady;NodeCapacityExceeded;IPsExhausted;Deleting
type MTPNCStatus string

const (
MTPNCStatusReady MTPNCStatus = "Ready"
MTPNCStatusPending MTPNCStatus = "Pending"
MTPNCStatusInternalError MTPNCStatus = "InternalError"
MTPNCStatusPNINotFound MTPNCStatus = "PNINotFound"
MTPNCStatusPNINotReady MTPNCStatus = "PNINotReady"
// MTPNCStatusReady indicates the MTPNC has been successfully programmed and is ready for use
MTPNCStatusReady MTPNCStatus = "Ready"
// MTPNCStatusPending indicates the MTPNC is awaiting processing
MTPNCStatusPending MTPNCStatus = "Pending"
// MTPNCStatusInternalError indicates an internal error occurred while processing the MTPNC
MTPNCStatusInternalError MTPNCStatus = "InternalError"
// MTPNCStatusPNINotFound indicates the referenced PodNetworkInstance was not found
MTPNCStatusPNINotFound MTPNCStatus = "PNINotFound"
// MTPNCStatusPNINotReady indicates the referenced PodNetworkInstance is not yet ready
MTPNCStatusPNINotReady MTPNCStatus = "PNINotReady"
// MTPNCStatusNodeCapacityExceeded indicates the node has exceeded its capacity for network resources
MTPNCStatusNodeCapacityExceeded MTPNCStatus = "NodeCapacityExceeded"
MTPNCStatusIPsExhausted MTPNCStatus = "IPsExhausted"
// MTPNCStatusIPsExhausted indicates no IP addresses are available for allocation
MTPNCStatusIPsExhausted MTPNCStatus = "IPsExhausted"
// MTPNCStatusDeleting indicates MTPNC is being deleted, status may not be set at the same time as deletionTimestamp.
MTPNCStatusDeleting MTPNCStatus = "Deleting"
)

type InterfaceInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion crd/multitenancy/api/v1alpha1/podnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.networkID`
// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnetResourceID`
// +kubebuilder:printcolumn:name="SubnetGUID",type=string,priority=1,JSONPath=`.spec.subnetGUID`
// +kubebuilder:printcolumn:name="DeviceType",type=string,priority=1,JSONPath=`.spec.subnetGUID`
// +kubebuilder:printcolumn:name="DeviceType",type=string,priority=1,JSONPath=`.spec.deviceType`
type PodNetwork struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
1 change: 0 additions & 1 deletion crd/multitenancy/api/v1alpha1/podnetworkinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
// +kubebuilder:metadata:labels=managed=
// +kubebuilder:metadata:labels=owner=
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`
// +kubebuilder:printcolumn:name="PodNetworks",priority=1,type=string,JSONPath=`.spec.podNetworks`
type PodNetworkInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ spec:
- jsonPath: .spec.podNetworkInstance
name: PodNetworkInstance
type: string
- jsonPath: .spec.podNetwork
name: PodNetwork
type: string
- jsonPath: .spec.podName
name: PodName
type: string
- jsonPath: .spec.podUID
name: PodUID
type: string
- jsonPath: .status.status
name: Status
type: string
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -154,6 +157,7 @@ spec:
- PNINotReady
- NodeCapacityExceeded
- IPsExhausted
- Deleting
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ spec:
- jsonPath: .status.status
name: Status
type: string
- jsonPath: .spec.podNetworks
name: PodNetworks
priority: 1
type: string
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
name: SubnetGUID
priority: 1
type: string
- jsonPath: .spec.subnetGUID
- jsonPath: .spec.deviceType
name: DeviceType
priority: 1
type: string
Expand Down
Loading