Skip to content

Commit f3a2df0

Browse files
Merge pull request #133 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents 1759b89 + 9c0914e commit f3a2df0

File tree

13 files changed

+42
-48
lines changed

13 files changed

+42
-48
lines changed

.github/workflows/renovate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
go-version: ${{ steps.go-version.outputs.result }}
5151

5252
- name: Self-hosted Renovate
53-
uses: renovatebot/github-action@aec779d4f7845f8431ddf403cf9659d4702ddde0 # v43.0.18
53+
uses: renovatebot/github-action@a3c115cd6676c8a5bc72f9715f108759e570daf5 # v43.0.19
5454
with:
5555
configurationFile: .github/renovate.json5
5656
token: ${{ steps.octo-sts.outputs.token }}

.golangci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ linters:
6262
- makezero
6363
- mirror
6464
- misspell
65+
- modernize
6566
- musttag
6667
- nakedret
6768
- nilerr
@@ -89,9 +90,10 @@ formatters:
8990
sections:
9091
- standard # Standard section: captures all standard packages.
9192
- default # Default section: contains all imports that could not be matched to another section type.
92-
- prefix(github.com/cert-manager/csi-lib) # Custom section: groups all imports with the specified Prefix.
93+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
9394
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
9495
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
96+
custom-order: true
9597
exclusions:
9698
generated: lax
9799
paths: [third_party, builtin$, examples$]

driver/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func parseEndpoint(ep string) (string, string, error) {
101101
}
102102

103103
func loggingInterceptor(log logr.Logger) grpc.UnaryServerInterceptor {
104-
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
104+
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {
105105
log := log.WithValues("rpc_method", info.FullMethod, "request", protosanitizer.StripSecrets(req))
106106
log.V(3).Info("handling request")
107107
resp, err := handler(ctx, req)

examples/simple/main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ import (
3636
cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1"
3737
cmclient "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned"
3838
"github.com/cert-manager/cert-manager/pkg/util/pki"
39-
"k8s.io/client-go/rest"
40-
"k8s.io/klog/v2/klogr"
41-
"k8s.io/utils/clock"
42-
4339
"github.com/cert-manager/csi-lib/driver"
4440
"github.com/cert-manager/csi-lib/manager"
4541
"github.com/cert-manager/csi-lib/metadata"
4642
"github.com/cert-manager/csi-lib/storage"
43+
"k8s.io/client-go/rest"
44+
"k8s.io/klog/v2/klogr"
45+
"k8s.io/utils/clock"
4746
)
4847

4948
const (
@@ -345,7 +344,7 @@ func keyUsagesFromAttributes(usagesCSV string) []cmapi.KeyUsage {
345344
}
346345

347346
var keyUsages []cmapi.KeyUsage
348-
for _, usage := range strings.Split(usagesCSV, ",") {
347+
for usage := range strings.SplitSeq(usagesCSV, ",") {
349348
keyUsages = append(keyUsages, cmapi.KeyUsage(strings.TrimSpace(usage)))
350349
}
351350

klone.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,55 @@ targets:
99
- folder_name: boilerplate
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
12+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1313
repo_path: modules/boilerplate
1414
- folder_name: cert-manager
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
17+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1818
repo_path: modules/cert-manager
1919
- folder_name: controller-gen
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
22+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2323
repo_path: modules/controller-gen
2424
- folder_name: generate-verify
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
27+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2828
repo_path: modules/generate-verify
2929
- folder_name: go
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
32+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3333
repo_path: modules/go
3434
- folder_name: help
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
37+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3838
repo_path: modules/help
3939
- folder_name: kind
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
42+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
4343
repo_path: modules/kind
4444
- folder_name: klone
4545
repo_url: https://github.com/cert-manager/makefile-modules.git
4646
repo_ref: main
47-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
47+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
4848
repo_path: modules/klone
4949
- folder_name: oci-build
5050
repo_url: https://github.com/cert-manager/makefile-modules.git
5151
repo_ref: main
52-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
52+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
5353
repo_path: modules/oci-build
5454
- folder_name: repository-base
5555
repo_url: https://github.com/cert-manager/makefile-modules.git
5656
repo_ref: main
57-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
57+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
5858
repo_path: modules/repository-base
5959
- folder_name: tools
6060
repo_url: https://github.com/cert-manager/makefile-modules.git
6161
repo_ref: main
62-
repo_hash: 737c51c1bf36dea15a7ef2bc5c070d09845530a2
62+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
6363
repo_path: modules/tools

make/_shared/go/.golangci.override.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ linters:
4545
- makezero
4646
- mirror
4747
- misspell
48+
- modernize
4849
- musttag
4950
- nakedret
5051
- nilerr
@@ -69,10 +70,11 @@ formatters:
6970
enable: [ gci, gofmt ]
7071
settings:
7172
gci:
73+
custom-order: true
7274
sections:
7375
- standard # Standard section: captures all standard packages.
7476
- default # Default section: contains all imports that could not be matched to another section type.
75-
- prefix({{REPO-NAME}}) # Custom section: groups all imports with the specified Prefix.
77+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
7678
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7779
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
7880
exclusions:

make/_shared/go/01_mod.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ generate-golangci-lint-config: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(bin_dir)/s
117117
cp $(golangci_lint_config) $(bin_dir)/scratch/golangci-lint.yaml.tmp
118118
$(YQ) -i 'del(.linters.enable)' $(bin_dir)/scratch/golangci-lint.yaml.tmp
119119
$(YQ) eval-all -i '. as $$item ireduce ({}; . * $$item)' $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_override)
120-
$(YQ) -i '(.. | select(tag == "!!str")) |= sub("{{REPO-NAME}}", "$(repo_name)")' $(bin_dir)/scratch/golangci-lint.yaml.tmp
121120
mv $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_config)
122121

123122
shared_generate_targets += generate-golangci-lint-config
@@ -147,9 +146,9 @@ fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/
147146
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
148147
| while read d; do \
149148
target=$$(dirname $${d}); \
150-
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint fmt -c $(CURDIR)/$(golangci_lint_config)' in directory '$${target}'"; \
149+
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout)' in directory '$${target}'"; \
151150
pushd "$${target}" >/dev/null; \
152-
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) fmt -c $(CURDIR)/$(golangci_lint_config) || exit; \
151+
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout) || exit; \
153152
popd >/dev/null; \
154153
echo ""; \
155154
done

make/_shared/repository-base/base/.github/workflows/renovate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
go-version: ${{ steps.go-version.outputs.result }}
5151

5252
- name: Self-hosted Renovate
53-
uses: renovatebot/github-action@aec779d4f7845f8431ddf403cf9659d4702ddde0 # v43.0.18
53+
uses: renovatebot/github-action@a3c115cd6676c8a5bc72f9715f108759e570daf5 # v43.0.19
5454
with:
5555
configurationFile: .github/renovate.json5
5656
token: ${{ steps.octo-sts.outputs.token }}

make/_shared/tools/00_mod.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tools += yq=v4.48.1
8686
tools += ko=0.18.0
8787
# https://github.com/protocolbuffers/protobuf/releases
8888
# renovate: datasource=github-releases packageName=protocolbuffers/protobuf
89-
tools += protoc=v32.1
89+
tools += protoc=v33.0
9090
# https://github.com/aquasecurity/trivy/releases
9191
# renovate: datasource=github-releases packageName=aquasecurity/trivy
9292
tools += trivy=v0.67.2
@@ -167,7 +167,7 @@ tools += cmctl=v2.3.0
167167
tools += cmrel=v1.12.15-0.20241121151736-e3cbe5171488
168168
# https://pkg.go.dev/github.com/golangci/golangci-lint/v2/cmd/golangci-lint?tab=versions
169169
# renovate: datasource=go packageName=github.com/golangci/golangci-lint/v2
170-
tools += golangci-lint=v2.5.0
170+
tools += golangci-lint=v2.6.0
171171
# https://pkg.go.dev/golang.org/x/vuln?tab=versions
172172
# renovate: datasource=go packageName=golang.org/x/vuln
173173
tools += govulncheck=v1.1.4
@@ -499,7 +499,7 @@ $(DOWNLOAD_DIR)/tools/vault@$(VAULT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLO
499499
@source $(lock_script) $@; \
500500
$(CURL) https://releases.hashicorp.com/vault/$(VAULT_VERSION:v%=%)/vault_$(VAULT_VERSION:v%=%)_$(HOST_OS)_$(HOST_ARCH).zip -o $(outfile).zip; \
501501
$(checkhash_script) $(outfile).zip $(vault_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \
502-
unzip -qq -c $(outfile).zip > $(outfile); \
502+
unzip -p $(outfile).zip vault > $(outfile); \
503503
chmod +x $(outfile); \
504504
rm -f $(outfile).zip
505505

@@ -580,10 +580,10 @@ $(DOWNLOAD_DIR)/tools/ko@$(KO_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR
580580
chmod +x $(outfile); \
581581
rm -f $(outfile).tar.gz
582582

583-
protoc_linux_amd64_SHA256SUM=e9c129c176bb7df02546c4cd6185126ca53c89e7d2f09511e209319704b5dd7e
584-
protoc_linux_arm64_SHA256SUM=4a802ed23d70f7bad7eb19e5a3e724b3aa967250d572cadfd537c1ba939aee6a
585-
protoc_darwin_amd64_SHA256SUM=f9caa5b4d0b537acffb0ffd7d53225511a5574ef903fca550ea9e7600987f13b
586-
protoc_darwin_arm64_SHA256SUM=a7b51b2113862690fa52c62f8891a6037bafb9db88d4f9924c486de9d9bb89d5
583+
protoc_linux_amd64_SHA256SUM=d99c011b799e9e412064244f0be417e5d76c9b6ace13a2ac735330fa7d57ad8f
584+
protoc_linux_arm64_SHA256SUM=4b96bc91f8b54d829b8c3ca2207ff1ceb774843321e4fa5a68502faece584272
585+
protoc_darwin_amd64_SHA256SUM=e4e50a703147a92d1a5a2d3a34c9e41717f67ade67d4be72b9a466eb8f22fe87
586+
protoc_darwin_arm64_SHA256SUM=3cf55dd47118bd2efda9cd26b74f8bbbfcf5beb1bf606bc56ad4c001b543f6d3
587587

588588
.PRECIOUS: $(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH)
589589
$(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
@@ -593,7 +593,7 @@ $(DOWNLOAD_DIR)/tools/protoc@$(PROTOC_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWN
593593
@source $(lock_script) $@; \
594594
$(CURL) https://github.com/protocolbuffers/protobuf/releases/download/$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION:v%=%)-$(OS)-$(ARCH).zip -o $(outfile).zip; \
595595
$(checkhash_script) $(outfile).zip $(protoc_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \
596-
unzip -qq -c $(outfile).zip bin/protoc > $(outfile); \
596+
unzip -p $(outfile).zip bin/protoc > $(outfile); \
597597
chmod +x $(outfile); \
598598
rm -f $(outfile).zip
599599

manager/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func NewManager(opts Options) (*Manager, error) {
170170
// registered with the factory
171171
lister := informerFactory.Certmanager().V1().CertificateRequests().Lister()
172172
if _, err := informerFactory.Certmanager().V1().CertificateRequests().Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
173-
DeleteFunc: func(obj interface{}) {
173+
DeleteFunc: func(obj any) {
174174
requestToPrivateKeyLock.Lock()
175175
defer requestToPrivateKeyLock.Unlock()
176176
key, ok := obj.(string)

0 commit comments

Comments
 (0)