Skip to content

Commit

Permalink
adding probe worker
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Brookes <[email protected]>
  • Loading branch information
philbrookes authored and maksymvavilov committed Oct 15, 2024
1 parent 5eb982d commit 4f702b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions api/v1alpha1/dnshealthcheckprobe_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha1

import (
"fmt"
"net"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/dns-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f702b9

Please sign in to comment.