Skip to content

Commit

Permalink
Log DNS resolver configuration on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Jan 12, 2024
1 parent 1c9c02e commit e9633ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ The format is based on [Keep a Changelog], and this project adheres to

<!-- REMEMBER TO BUMP THE VERSIONS IN THE CHART FILE -->

## [0.4.11] - 2024-01-12

### Added

- Log DNS resolver configuration on startup

## [0.4.10] - 2024-01-12

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: proclaim
description: A Kubernetes controller and CRD that publishes DNS-SD records.
type: application
version: v0.4.10
appVersion: v0.4.10
version: v0.4.11
appVersion: v0.4.11
icon: https://dogmatiq.io/res/img/icon-144x144.png
11 changes: 10 additions & 1 deletion cmd/proclaim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/dogmatiq/proclaim/crd"
"github.com/dogmatiq/proclaim/reconciler"
"github.com/go-logr/logr"
"github.com/miekg/dns"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
controller "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
Expand All @@ -23,15 +24,23 @@ func main() {

ctx := controller.SetupSignalHandler()

if err := imbue.Invoke3(
if err := imbue.Invoke4(
ctx,
container,
func(
ctx context.Context,
m manager.Manager,
r *reconciler.Reconciler,
c *dns.ClientConfig,
l imbue.ByName[systemLogger, logr.Logger],
) error {
l.Value().Info(
"DNS configuration loaded",
"servers", c.Servers,
"port", c.Port,
"timeout", c.Timeout,
)

err := builder.
ControllerManagedBy(m).
For(&crd.DNSSDServiceInstance{}).
Expand Down

0 comments on commit e9633ef

Please sign in to comment.