|
| 1 | +package v1 |
| 2 | + |
| 3 | +import ( |
| 4 | + corev1 "k8s.io/api/core/v1" |
| 5 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 6 | +) |
| 7 | + |
| 8 | +// NBRoutingPeerSpec defines the desired state of NBRoutingPeer. |
| 9 | +type NBRoutingPeerSpec struct { |
| 10 | + // +optional |
| 11 | + Replicas *int32 `json:"replicas"` |
| 12 | + // +optional |
| 13 | + Resources corev1.ResourceRequirements `json:"resources"` |
| 14 | + // +optional |
| 15 | + Labels map[string]string `json:"labels"` |
| 16 | + // +optional |
| 17 | + Annotations map[string]string `json:"annotations"` |
| 18 | + // +optional |
| 19 | + NodeSelector map[string]string `json:"nodeSelector"` |
| 20 | + // +optional |
| 21 | + Tolerations []corev1.Toleration `json:"tolerations"` |
| 22 | +} |
| 23 | + |
| 24 | +// NBRoutingPeerStatus defines the observed state of NBRoutingPeer. |
| 25 | +type NBRoutingPeerStatus struct { |
| 26 | + // +optional |
| 27 | + NetworkID *string `json:"networkID"` |
| 28 | + // +optional |
| 29 | + SetupKeyID *string `json:"setupKeyID"` |
| 30 | + // +optional |
| 31 | + RouterID *string `json:"routerID"` |
| 32 | +} |
| 33 | + |
| 34 | +// +kubebuilder:object:root=true |
| 35 | +// +kubebuilder:subresource:status |
| 36 | + |
| 37 | +// NBRoutingPeer is the Schema for the nbroutingpeers API. |
| 38 | +type NBRoutingPeer struct { |
| 39 | + metav1.TypeMeta `json:",inline"` |
| 40 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 41 | + |
| 42 | + Spec NBRoutingPeerSpec `json:"spec,omitempty"` |
| 43 | + Status NBRoutingPeerStatus `json:"status,omitempty"` |
| 44 | +} |
| 45 | + |
| 46 | +// +kubebuilder:object:root=true |
| 47 | + |
| 48 | +// NBRoutingPeerList contains a list of NBRoutingPeer. |
| 49 | +type NBRoutingPeerList struct { |
| 50 | + metav1.TypeMeta `json:",inline"` |
| 51 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 52 | + Items []NBRoutingPeer `json:"items"` |
| 53 | +} |
| 54 | + |
| 55 | +func init() { |
| 56 | + SchemeBuilder.Register(&NBRoutingPeer{}, &NBRoutingPeerList{}) |
| 57 | +} |
0 commit comments