Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Weit <[email protected]>
  • Loading branch information
aviweit committed Jun 25, 2024
1 parent 805194c commit 40d67ce
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/controlplane/control/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ func restartCoreDNS(ctx context.Context, mClient client.Client, logger *logrus.E
}

// Add coredns rewrite for a given external dns service.
func addCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *logrus.Entry, name *types.NamespacedName, alias string) error {
func addCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *logrus.Entry, name *types.NamespacedName,
alias string,
) error {
corednsName := types.NamespacedName{
Name: "coredns",
Namespace: "kube-system",
Expand Down Expand Up @@ -101,7 +103,7 @@ func addCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *logru

if coreFileUpdated {
// update configmap and restart the pods
var newLines string = ""
var newLines string
for _, line := range lines {
// return back EOL
newLines += (line + "\n")
Expand All @@ -122,7 +124,7 @@ func addCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *logru
return nil
}

// Remove coredns rewrite for a given external dns service
// Remove coredns rewrite for a given external dns service.
func removeCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *logrus.Entry, name *types.NamespacedName) error {
corednsName := types.NamespacedName{
Name: "coredns",
Expand Down Expand Up @@ -156,7 +158,7 @@ func removeCoreDNSRewrite(ctx context.Context, mClient client.Client, logger *lo

if coreFileUpdated {
// update configmap and restart the pods
var newLines string = ""
var newLines string
for _, line := range lines {
// return back EOL
newLines += (line + "\n")
Expand Down

0 comments on commit 40d67ce

Please sign in to comment.