@@ -31,26 +31,37 @@ type IpAddressSpec struct {
31
31
//+kubebuilder:validation:Format=cidr
32
32
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'ipAddress' is immutable"
33
33
//+kubebuilder:validation:Required
34
+ // The actual IP Address that should be reserved in NetBox
34
35
IpAddress string `json:"ipAddress"`
35
36
36
37
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="Field 'tenant' is immutable"
38
+ // The NetBox Tenant to be used for creating this resource in Netbox
37
39
Tenant string `json:"tenant,omitempty"`
38
40
41
+ // NetBox Custom Fields that should be added to the resource in NetBox. Note that currently only Text Type is supported (GitHub #129)
39
42
CustomFields map [string ]string `json:"customFields,omitempty"`
40
43
44
+ // Comment that should be added to the resource in NetBox
41
45
Comments string `json:"comments,omitempty"`
42
46
47
+ // Description that should be added to the resource in NetBox
43
48
Description string `json:"description,omitempty"`
44
49
50
+ // preserveInNetbox defines whether or not the Resource should stay in NetBox when the Kubernetes Resource is deleted
51
+ // When set to true, the resource will not be deleted in NetBox upon CR deletion
52
+ // When set to false, the resource will be cleaned up in NetBox upon CR deletion
53
+ // If you want to restore resources from NetBox (e.g. recreation of an entire cluster), preserveInNetbox set to true is a prerequisite.
45
54
PreserveInNetbox bool `json:"preserveInNetbox,omitempty"`
46
55
}
47
56
48
57
// IpAddressStatus defines the observed state of IpAddress
49
58
type IpAddressStatus struct {
50
59
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
51
60
// Important: Run "make" to regenerate code after modifying this file
61
+ // The ID of the resource in NetBox
52
62
IpAddressId int64 `json:"id,omitempty"`
53
63
64
+ // The URL to the NetBox UI to display this resource. Note that the base depends on the runtime config of NetBox Operator
54
65
IpAddressUrl string `json:"url,omitempty"`
55
66
56
67
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
0 commit comments