From 4f702b972771b0f6603579d423e57b9273a46ec5 Mon Sep 17 00:00:00 2001 From: Phil Brookes Date: Wed, 25 Sep 2024 09:47:33 +0200 Subject: [PATCH] adding probe worker Signed-off-by: Phil Brookes --- api/v1alpha1/dnshealthcheckprobe_types.go | 12 ++++++++++++ .../dns-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/dnshealthcheckprobe_types.go b/api/v1alpha1/dnshealthcheckprobe_types.go index 3ded061e..c6c55c84 100644 --- a/api/v1alpha1/dnshealthcheckprobe_types.go +++ b/api/v1alpha1/dnshealthcheckprobe_types.go @@ -18,6 +18,7 @@ package v1alpha1 import ( "fmt" + "net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -96,6 +97,17 @@ type DNSHealthCheckProbeList struct { Items []DNSHealthCheckProbe `json:"items"` } +func (p *DNSHealthCheckProbe) GetIPAddresses() []string { + if net.ParseIP(p.Spec.Address) != nil { + return []string{ + p.Spec.Address, + } + } + ips, _ := net.LookupHost(p.Spec.Address) + return ips + +} + func (p *DNSHealthCheckProbe) Default() { if p.Spec.Protocol == "" { p.Spec.Protocol = HttpProtocol diff --git a/bundle/manifests/dns-operator.clusterserviceversion.yaml b/bundle/manifests/dns-operator.clusterserviceversion.yaml index 069507d6..d1e56bc1 100644 --- a/bundle/manifests/dns-operator.clusterserviceversion.yaml +++ b/bundle/manifests/dns-operator.clusterserviceversion.yaml @@ -58,7 +58,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/dns-operator:latest - createdAt: "2024-10-15T08:54:17Z" + createdAt: "2024-10-02T13:55:34Z" description: A Kubernetes Operator to manage the lifecycle of DNS resources operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4