more changes
Some checks failed
Lint / Run on Ubuntu (push) Has been cancelled
E2E Tests / Run on Ubuntu (push) Has been cancelled
Tests / Run on Ubuntu (push) Has been cancelled

This commit is contained in:
2026-04-14 07:40:25 +02:00
parent 168e9c6db2
commit d7c9e217be
10 changed files with 141 additions and 38 deletions

View File

@@ -35,6 +35,10 @@ type ResolutionSpec struct {
// Address to be queried for IP
// +required
Address string `json:"address"`
// Resolver can be used to specify another resolver instead of the hosts default resolver
// +optional
Resolver *string `json:"resolver,omitempty"`
}
// ResolutionStatus defines the observed state of Resolution.
@@ -63,11 +67,16 @@ type ResolutionStatus struct {
// +kubebuilder:title=`IP Addresses`
// +optional
IPAddresses []net.IP `json:"ipAddresses,omitempty"`
// Resolver used for this lookup
// +optional
Resolver *string `json:"resolver,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Address",type=string,JSONPath=`.spec.address`
// +kubebuilder:printcolumn:name="Resolver",type=string,JSONPath=`.spec.resolver`
// +kubebuilder:printcolumn:name="IPs",type=string,JSONPath=`.status.ipAddresses`
// Resolution is the Schema for the resolutions API

View File

@@ -35,6 +35,11 @@ type ResolverSpec struct {
// IPAddress is the main field for a resolver. This will be used to run queries against.
// +required
IPAddress net.IP `json:"ipAddress"`
// Port used for dns lookup queries, will default to 53 if omitted
// +kubebuilder:default=53
// +optional
Port uint `json:"port"`
}
// ResolverStatus defines the observed state of Resolver.

View File

@@ -31,7 +31,7 @@ func (in *Resolution) DeepCopyInto(out *Resolution) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
@@ -88,6 +88,11 @@ func (in *ResolutionList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResolutionSpec) DeepCopyInto(out *ResolutionSpec) {
*out = *in
if in.Resolver != nil {
in, out := &in.Resolver, &out.Resolver
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolutionSpec.
@@ -121,6 +126,11 @@ func (in *ResolutionStatus) DeepCopyInto(out *ResolutionStatus) {
}
}
}
if in.Resolver != nil {
in, out := &in.Resolver, &out.Resolver
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolutionStatus.