Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is the group version used to register netbox objects. SchemeGroupVersion = schema.GroupVersion{Group: "netbox.digitalocean.com", Version: "v1beta1"} // AddToScheme is the default scheme applier. AddToScheme = schemeBuilder.AddToScheme )
var NetBoxIPValidationSchema = &apiextensionsv1.CustomResourceValidation{ OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "spec": apiextensionsv1.JSONSchemaProps{Type: "object", Properties: map[string]apiextensionsv1.JSONSchemaProps{ "address": apiextensionsv1.JSONSchemaProps{ Type: "string", MinLength: pointer.Int64(1), }, "dnsName": apiextensionsv1.JSONSchemaProps{ Type: "string", MinLength: pointer.Int64(1), MaxLength: pointer.Int64(253), Pattern: dnsNameRegexp, }, "tags": apiextensionsv1.JSONSchemaProps{ Type: "array", Items: &apiextensionsv1.JSONSchemaPropsOrArray{ Schema: tagSchema, }, }, "description": apiextensionsv1.JSONSchemaProps{ Type: "string", MaxLength: pointer.Int64(200), }, }, }, }, }, }
NetBoxIPValidationSchema is the validation schema for NetBoxIP resource.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group-qualified GroupResource.
Types ¶
type NetBoxIP ¶
type NetBoxIP struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NetBoxIPSpec `json:"spec"` }
NetBoxIP represents the IP address exported to NetBox.
func (*NetBoxIP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetBoxIP.
func (*NetBoxIP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetBoxIP) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetBoxIPList ¶
type NetBoxIPList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:",inline"` Items []NetBoxIP `json:"items"` }
NetBoxIPList represents a list of custom NetBoxIP resources.
func (*NetBoxIPList) DeepCopy ¶
func (in *NetBoxIPList) DeepCopy() *NetBoxIPList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetBoxIPList.
func (*NetBoxIPList) DeepCopyInto ¶
func (in *NetBoxIPList) DeepCopyInto(out *NetBoxIPList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetBoxIPList) DeepCopyObject ¶
func (in *NetBoxIPList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetBoxIPSpec ¶
type NetBoxIPSpec struct { Address netip.Addr `json:"address"` DNSName string `json:"dnsName"` Tags []Tag `json:"tags,omitempty"` Description string `json:"description,omitempty"` }
NetBoxIPSpec defines the custom fields of the NetBoxIP resource.
func (NetBoxIPSpec) Changed ¶
func (spec NetBoxIPSpec) Changed(spec2 NetBoxIPSpec) bool
Changed returns true if the two NetBoxIP specs differ. It ignores differences in slice ordering.
func (*NetBoxIPSpec) DeepCopy ¶
func (in *NetBoxIPSpec) DeepCopy() *NetBoxIPSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetBoxIPSpec.
func (*NetBoxIPSpec) DeepCopyInto ¶
func (spec *NetBoxIPSpec) DeepCopyInto(out *NetBoxIPSpec)
DeepCopyInto is normally an autogenerated deepcopy function, copying the receiver, writing into out. spec must be non-nil. It is added explicitly here b/c https://github.com/kubernetes/gengo (responsible for code generation) does not know how to copy netip.Addr. That's b/c netip.Addr is internally represented as a `struct` Kind, and `gengo` expects that structs implement DeepCopyInto method for copying. But since we cannot add a method on netip.Addr, we have to handle it in the struct that _contains_ netip.Addr as a field.