Skip to content

Commit 89bf551

Browse files
Merge pull request #5 from cert-manager/fix-ci-issues
Fix CI issues
2 parents 97607f5 + d819661 commit 89bf551

20 files changed

+88
-52
lines changed

internal/pki/errors/errors.go renamed to internal/errors/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2020 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

internal/pki/cert_pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2022 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

internal/pki/csr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2020 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -114,7 +114,7 @@ func EncodeX509(cert *x509.Certificate) ([]byte, error) {
114114
func signatureAlgorithmFromPublicKey(alg x509.PublicKeyAlgorithm, arg any) (x509.SignatureAlgorithm, error) {
115115
var signatureAlgorithm x509.SignatureAlgorithm
116116

117-
switch alg {
117+
switch alg { //nolint:exhaustive // There is a default that appears to be not picked up by the linter
118118
case x509.RSA:
119119
size, ok := arg.(int)
120120
if !ok {

internal/pki/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2020 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

internal/pki/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2020 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import (
2121
"crypto/x509"
2222
"encoding/pem"
2323

24-
"github.com/cert-manager/webhook-cert-lib/internal/pki/errors"
24+
"github.com/cert-manager/webhook-cert-lib/internal/errors"
2525
)
2626

2727
// DecodeX509CertificateBytes will decode a PEM encoded x509 Certificate.

pkg/authority/api/api.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2025 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -24,16 +24,16 @@ const (
2424
// `inject-dynamic-ca-from-secret` label.
2525
// If an injectable references a Secret that does NOT have this annotation,
2626
// the dynamic ca-injector will refuse to inject the secret.
27-
DynamicAuthoritySecretLabel = "cert-manager.io/allow-dynamic-ca-injection"
27+
DynamicAuthoritySecretLabel = "cert-manager.io/allow-dynamic-ca-injection" //#nosec G101 - This is not credentials
2828
// WantInjectFromSecretNamespaceLabel is the label that specifies that a
2929
// particular object wants injection of dynamic CAs from secret in
3030
// namespace.
3131
// Must be used in conjunction with WantInjectFromSecretNameLabel.
32-
WantInjectFromSecretNamespaceLabel = "cert-manager.io/inject-dynamic-ca-from-secret-namespace"
32+
WantInjectFromSecretNamespaceLabel = "cert-manager.io/inject-dynamic-ca-from-secret-namespace" //#nosec G101 - This is not credentials
3333
// WantInjectFromSecretNameLabel is the label that specifies that a
3434
// particular object wants injection of dynamic CAs from secret with name.
3535
// Must be used in conjunction with WantInjectFromSecretNamespaceLabel.
36-
WantInjectFromSecretNameLabel = "cert-manager.io/inject-dynamic-ca-from-secret-name"
36+
WantInjectFromSecretNameLabel = "cert-manager.io/inject-dynamic-ca-from-secret-name" //#nosec G101 - This is not credentials
3737

3838
// TLSCABundleKey is used as a data key in Secret resources to store a CA
3939
// certificate bundle.
@@ -42,9 +42,9 @@ const (
4242
// RenewCertificateSecretAnnotation is an annotation that can be set to
4343
// an arbitrary value on a certificate secret to trigger a renewal of the
4444
// certificate managed in the secret.
45-
RenewCertificateSecretAnnotation = "renew.cert-manager.io/requestedAt"
45+
RenewCertificateSecretAnnotation = "renew.cert-manager.io/requestedAt" //#nosec G101 - This is not credentials
4646
// RenewHandledCertificateSecretAnnotation is an annotation that will be set on a
4747
// certificate secret whenever a new certificate is renewed using the
4848
// RenewCertificateSecretAnnotation annotation.
49-
RenewHandledCertificateSecretAnnotation = "renew.cert-manager.io/lastRequestedAt"
49+
RenewHandledCertificateSecretAnnotation = "renew.cert-manager.io/lastRequestedAt" //#nosec G101 - This is not credentials
5050
)

pkg/authority/authority.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2025 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -21,17 +21,18 @@ import (
2121
"errors"
2222
"time"
2323

24-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
25-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/cert"
26-
leadercontrollers "github.com/cert-manager/webhook-cert-lib/pkg/authority/leader_controllers"
27-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/leader_controllers/injectable"
2824
corev1 "k8s.io/api/core/v1"
2925
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
3026
"k8s.io/apimachinery/pkg/fields"
3127
"k8s.io/apimachinery/pkg/labels"
3228
ctrl "sigs.k8s.io/controller-runtime"
3329
"sigs.k8s.io/controller-runtime/pkg/cache"
3430
"sigs.k8s.io/controller-runtime/pkg/client"
31+
32+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
33+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/cert"
34+
leadercontrollers "github.com/cert-manager/webhook-cert-lib/pkg/authority/leader_controllers"
35+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/leader_controllers/injectable"
3536
)
3637

3738
type LeafOptions struct {

pkg/authority/cert/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2025 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

pkg/authority/leader_controllers/ca_secret_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright The cert-manager Authors.
2+
Copyright 2025 The cert-manager Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import (
2121
"crypto"
2222
"crypto/x509"
2323

24+
"github.com/go-logr/logr"
2425
corev1 "k8s.io/api/core/v1"
2526
"k8s.io/apimachinery/pkg/api/errors"
2627
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -35,7 +36,6 @@ import (
3536
"github.com/cert-manager/webhook-cert-lib/internal/pki"
3637
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
3738
"github.com/cert-manager/webhook-cert-lib/pkg/authority/cert"
38-
"github.com/go-logr/logr"
3939
)
4040

4141
// CASecretReconciler reconciles a CA Secret object

pkg/authority/leader_controllers/injectable/injectable.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2025 The cert-manager Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
package injectable
218

319
import (

0 commit comments

Comments
 (0)