From 753e49e8c3de41b3ca2ac0a24b47e993f1ff7a6b Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Wed, 27 Mar 2024 11:37:46 +0100 Subject: [PATCH 1/3] Made compliant with version 3.0 of the REUSE Specification --- pkg/controller/dnsrecord/add.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pkg/controller/dnsrecord/add.go b/pkg/controller/dnsrecord/add.go index 9f441e8..d90be18 100644 --- a/pkg/controller/dnsrecord/add.go +++ b/pkg/controller/dnsrecord/add.go @@ -1,16 +1,7 @@ -// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors +// SPDX-FileCopyrightText: 2024 metal-stack Authors // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package dnsrecord From a3ff11d64303683537e44ff720c0ea5aa3a793eb Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Wed, 27 Mar 2024 11:38:03 +0100 Subject: [PATCH 2/3] Fix linter warning --- pkg/powerdns/secret.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/powerdns/secret.go b/pkg/powerdns/secret.go index b3f4cb5..be33d2f 100644 --- a/pkg/powerdns/secret.go +++ b/pkg/powerdns/secret.go @@ -50,7 +50,7 @@ func readCredentialsSecret(secret *corev1.Secret) (*pdnsclient.Credentials, erro return nil, err } - virtualHost, err := getSecretStringValue(secret, VirtualHost, false) + virtualHost, _ := getSecretStringValue(secret, VirtualHost, false) insecureSkipVerify, err := getSecretBoolValue(secret, InsecureSkipVerify) if err != nil { From 742b84f9165617907b9ca7f83e6a7d981c2088c8 Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Thu, 18 Apr 2024 09:16:44 +0200 Subject: [PATCH 3/3] Fail on missing required field server --- pkg/powerdns/secret.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/powerdns/secret.go b/pkg/powerdns/secret.go index be33d2f..50107b0 100644 --- a/pkg/powerdns/secret.go +++ b/pkg/powerdns/secret.go @@ -45,7 +45,7 @@ func readCredentialsSecret(secret *corev1.Secret) (*pdnsclient.Credentials, erro return nil, err } - server, _ := getSecretStringValue(secret, Server, true) + server, err := getSecretStringValue(secret, Server, true) if err != nil { return nil, err }