Skip to content

Commit 082d0df

Browse files
authored
Merge pull request #745 from jetstack/upgrade
Upgrade go dependencies and makefile modules
2 parents c847309 + 32d7c68 commit 082d0df

32 files changed

+334
-339
lines changed

.github/workflows/make-self-upgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
exit 1
3333
3434
- name: Octo STS Token Exchange
35-
uses: octo-sts/action@a26b0c6455c7f13316f29a8766287f939e75f6c8 # v1.0.2
35+
uses: octo-sts/action@d6c70ad3b9ac85df6da6b9749014d7283987cfec # v1.0.3
3636
id: octo-sts
3737
with:
3838
scope: 'jetstack/jetstack-secure'

.github/workflows/renovate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
exit 1
2828
2929
- name: Octo STS Token Exchange
30-
uses: octo-sts/action@a26b0c6455c7f13316f29a8766287f939e75f6c8 # v1.0.2
30+
uses: octo-sts/action@d6c70ad3b9ac85df6da6b9749014d7283987cfec # v1.0.3
3131
id: octo-sts
3232
with:
3333
scope: 'jetstack/jetstack-secure'
@@ -50,7 +50,7 @@ jobs:
5050
go-version: ${{ steps.go-version.outputs.result }}
5151

5252
- name: Self-hosted Renovate
53-
uses: renovatebot/github-action@70ea19f1b0dc8a9cc7af1b4278f8d3fd9778b577 # v43.0.17
53+
uses: renovatebot/github-action@c5fdc9f98fdf9e9bb16b5760f7e560256eb79326 # v44.0.2
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
@@ -54,6 +54,7 @@ linters:
5454
- makezero
5555
- mirror
5656
- misspell
57+
- modernize
5758
- musttag
5859
- nakedret
5960
- nilerr
@@ -81,9 +82,10 @@ formatters:
8182
sections:
8283
- standard # Standard section: captures all standard packages.
8384
- default # Default section: contains all imports that could not be matched to another section type.
84-
- prefix(github.com/jetstack/preflight) # Custom section: groups all imports with the specified Prefix.
85+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
8586
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
8687
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
88+
custom-order: true
8789
exclusions:
8890
generated: lax
8991
paths: [third_party, builtin$, examples$]

api/datareading.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ type DataReadingsPost struct {
2222
type DataReading struct {
2323
// ClusterID is optional as it can be inferred from the agent
2424
// token when using basic authentication.
25-
ClusterID string `json:"cluster_id,omitempty"`
26-
DataGatherer string `json:"data-gatherer"`
27-
Timestamp Time `json:"timestamp"`
28-
Data interface{} `json:"data"`
29-
SchemaVersion string `json:"schema_version"`
25+
ClusterID string `json:"cluster_id,omitempty"`
26+
DataGatherer string `json:"data-gatherer"`
27+
Timestamp Time `json:"timestamp"`
28+
Data any `json:"data"`
29+
SchemaVersion string `json:"schema_version"`
3030
}
3131

3232
// UnmarshalJSON implements the json.Unmarshaler interface for DataReading.
@@ -61,11 +61,11 @@ func (o *DataReading) UnmarshalJSON(data []byte) error {
6161

6262
// Define a list of decoding attempts with prioritized types
6363
dataTypes := []struct {
64-
target interface{}
65-
assign func(interface{})
64+
target any
65+
assign func(any)
6666
}{
67-
{&DiscoveryData{}, func(v interface{}) { o.Data = v.(*DiscoveryData) }},
68-
{&DynamicData{}, func(v interface{}) { o.Data = v.(*DynamicData) }},
67+
{&DiscoveryData{}, func(v any) { o.Data = v.(*DiscoveryData) }},
68+
{&DynamicData{}, func(v any) { o.Data = v.(*DynamicData) }},
6969
}
7070

7171
// Attempt to decode the Data field into each type
@@ -82,7 +82,7 @@ func (o *DataReading) UnmarshalJSON(data []byte) error {
8282

8383
// jsonUnmarshalStrict unmarshals JSON data into the provided interface,
8484
// disallowing unknown fields to ensure strict adherence to the expected structure.
85-
func jsonUnmarshalStrict(data []byte, v interface{}) error {
85+
func jsonUnmarshalStrict(data []byte, v any) error {
8686
decoder := json.NewDecoder(bytes.NewReader(data))
8787
decoder.DisallowUnknownFields()
8888
return decoder.Decode(v)
@@ -92,8 +92,8 @@ func jsonUnmarshalStrict(data []byte, v interface{}) error {
9292
type GatheredResource struct {
9393
// Resource is a reference to a k8s object that was found by the informer
9494
// should be of type unstructured.Unstructured, raw Object
95-
Resource interface{} `json:"resource"`
96-
DeletedAt Time `json:"deleted_at,omitempty"`
95+
Resource any
96+
DeletedAt Time
9797
}
9898

9999
func (v GatheredResource) MarshalJSON() ([]byte, error) {
@@ -103,8 +103,8 @@ func (v GatheredResource) MarshalJSON() ([]byte, error) {
103103
}
104104

105105
data := struct {
106-
Resource interface{} `json:"resource"`
107-
DeletedAt string `json:"deleted_at,omitempty"`
106+
Resource any `json:"resource"`
107+
DeletedAt string `json:"deleted_at,omitempty"`
108108
}{
109109
Resource: v.Resource,
110110
DeletedAt: dateString,
@@ -116,7 +116,7 @@ func (v GatheredResource) MarshalJSON() ([]byte, error) {
116116
func (v *GatheredResource) UnmarshalJSON(data []byte) error {
117117
var tmpResource struct {
118118
Resource *unstructured.Unstructured `json:"resource"`
119-
DeletedAt Time `json:"deleted_at,omitempty"`
119+
DeletedAt Time `json:"deleted_at"`
120120
}
121121

122122
d := json.NewDecoder(bytes.NewReader(data))

api/datareading_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestDataReading_UnmarshalJSON(t *testing.T) {
4343
tests := []struct {
4444
name string
4545
input string
46-
wantDataType interface{}
46+
wantDataType any
4747
expectError string
4848
}{
4949
{

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ require (
1616
github.com/spf13/cobra v1.10.1
1717
github.com/spf13/pflag v1.0.10
1818
github.com/stretchr/testify v1.11.1
19-
golang.org/x/sync v0.17.0
19+
golang.org/x/sync v0.18.0
2020
gopkg.in/yaml.v2 v2.4.0
21-
k8s.io/api v0.34.1
22-
k8s.io/apimachinery v0.34.1
23-
k8s.io/client-go v0.34.1
24-
k8s.io/component-base v0.34.1
25-
sigs.k8s.io/controller-runtime v0.22.3
21+
k8s.io/api v0.34.2
22+
k8s.io/apimachinery v0.34.2
23+
k8s.io/client-go v0.34.2
24+
k8s.io/component-base v0.34.2
25+
sigs.k8s.io/controller-runtime v0.22.4
2626
sigs.k8s.io/yaml v1.6.0
2727
)
2828

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKl
246246
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
247247
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
248248
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
249-
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
250-
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
249+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
250+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
251251
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
252252
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
253253
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -297,18 +297,18 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
297297
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
298298
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
299299
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
300-
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
301-
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
300+
k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
301+
k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
302302
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
303303
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
304-
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
305-
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
304+
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
305+
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
306306
k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA=
307307
k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0=
308-
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
309-
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
310-
k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A=
311-
k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0=
308+
k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
309+
k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
310+
k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ=
311+
k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM=
312312
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
313313
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
314314
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
@@ -317,8 +317,8 @@ k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzk
317317
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
318318
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
319319
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
320-
sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTijTq8Y=
321-
sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
320+
sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A=
321+
sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
322322
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
323323
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
324324
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=

internal/cyberark/servicediscovery/discovery.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ func New(httpClient *http.Client) *Client {
5858
// DiscoveryResponse represents the full JSON response returned by the CyberArk api/tenant-discovery/public API
5959
// The API is documented here https://ca-il-confluence.il.cyber-ark.com/spaces/EV/pages/575618345/Updated+PD+APIs+doc
6060
type DiscoveryResponse struct {
61-
Region string `json:"region"`
62-
DRRegion string `json:"dr_region"`
63-
Subdomain string `json:"subdomain"`
64-
TenantID string `json:"tenant_id"`
65-
PlatformID string `json:"platform_id"`
66-
IdentityID string `json:"identity_id"`
67-
DefaultURL string `json:"default_url"`
68-
TenantFlags map[string]interface{} `json:"tenant_flags"`
69-
Services []Service `json:"services"`
61+
Region string `json:"region"`
62+
DRRegion string `json:"dr_region"`
63+
Subdomain string `json:"subdomain"`
64+
TenantID string `json:"tenant_id"`
65+
PlatformID string `json:"platform_id"`
66+
IdentityID string `json:"identity_id"`
67+
DefaultURL string `json:"default_url"`
68+
TenantFlags map[string]any `json:"tenant_flags"`
69+
Services []Service `json:"services"`
7070
}
7171

7272
type Service struct {

klone.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,55 @@ targets:
1010
- folder_name: generate-verify
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
13+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
1414
repo_path: modules/generate-verify
1515
- folder_name: go
1616
repo_url: https://github.com/cert-manager/makefile-modules.git
1717
repo_ref: main
18-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
18+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
1919
repo_path: modules/go
2020
- folder_name: helm
2121
repo_url: https://github.com/cert-manager/makefile-modules.git
2222
repo_ref: main
23-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
23+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
2424
repo_path: modules/helm
2525
- folder_name: help
2626
repo_url: https://github.com/cert-manager/makefile-modules.git
2727
repo_ref: main
28-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
28+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
2929
repo_path: modules/help
3030
- folder_name: kind
3131
repo_url: https://github.com/cert-manager/makefile-modules.git
3232
repo_ref: main
33-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
33+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
3434
repo_path: modules/kind
3535
- folder_name: klone
3636
repo_url: https://github.com/cert-manager/makefile-modules.git
3737
repo_ref: main
38-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
38+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
3939
repo_path: modules/klone
4040
- folder_name: licenses
4141
repo_url: https://github.com/cert-manager/makefile-modules.git
4242
repo_ref: main
43-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
43+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
4444
repo_path: modules/licenses
4545
- folder_name: oci-build
4646
repo_url: https://github.com/cert-manager/makefile-modules.git
4747
repo_ref: main
48-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
48+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
4949
repo_path: modules/oci-build
5050
- folder_name: oci-publish
5151
repo_url: https://github.com/cert-manager/makefile-modules.git
5252
repo_ref: main
53-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
53+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
5454
repo_path: modules/oci-publish
5555
- folder_name: repository-base
5656
repo_url: https://github.com/cert-manager/makefile-modules.git
5757
repo_ref: main
58-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
58+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
5959
repo_path: modules/repository-base
6060
- folder_name: tools
6161
repo_url: https://github.com/cert-manager/makefile-modules.git
6262
repo_ref: main
63-
repo_hash: 3640ec2744eca6198a647fa0cd6ca09536aa4f8e
63+
repo_hash: 4479013f57fb2f7f0f28b4e951dc1ba6e6badddc
6464
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:

0 commit comments

Comments
 (0)