Skip to content

Commit 5d42d26

Browse files
authored
Merge branch 'main' into usr/murala7/rep-powermax-action
2 parents d4057cb + db769f3 commit 5d42d26

29 files changed

+741
-379
lines changed

.github/workflows/license-checker.yaml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,8 @@ on:
44
schedule:
55
- cron: '0 0 * * 1' # Runs every Monday at 00:00 UTC
66
workflow_dispatch:
7-
87
jobs:
98
license-check:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v5
14-
15-
- name: Import GPG key
16-
uses: crazy-max/ghaction-import-gpg@v6
17-
with:
18-
gpg_private_key: ${{ secrets.CSM_GPG_PRIVATE_KEY }}
19-
git_user_signingkey: true
20-
git_commit_gpgsign: true
21-
git_tag_gpgsign: true
22-
git_config_global: true
23-
24-
- name: Run License Header Checker
25-
uses: dell/common-github-actions/license-checker@main
26-
with:
27-
autofix: true
28-
29-
- name: Create Pull Request
30-
uses: peter-evans/create-pull-request@v7
31-
with:
32-
token: ${{ secrets.GITHUB_TOKEN }}
33-
branch: autofix/license-header
34-
commit-message: "License header autofix"
35-
title: "Automated PR for file changes"
36-
body: "This PR was created automatically by a GitHub Action."
37-
sign-commits: true
38-
delete-branch: false
9+
name: Run License Header Checker
10+
uses: dell/common-github-actions/.github/workflows/license-checker.yaml@main
11+
secrets: inherit

Dockerfiles/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o dell-csi
3434
FROM $BASEIMAGE AS container-base
3535
LABEL vendor="Dell Technologies" \
3636
maintainer="Dell Technologies" \
37-
release="1.14.0" \
38-
version="1.12.0" \
37+
release="1.15.0" \
38+
version="1.13.0" \
3939
license="Apache-2.0"
4040

4141
# Controller

cmd/csi-replicator/main_test.go

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"errors"
2222
"fmt"
2323
"net/http"
24-
"reflect"
2524
"testing"
2625
"time"
2726

@@ -262,60 +261,52 @@ func TestCreateReplicatorManager(t *testing.T) {
262261
}
263262

264263
func Test_getClusterUID(t *testing.T) {
265-
type args struct {
266-
ctx context.Context
267-
}
268264
tests := []struct {
269265
name string
270-
args args
271-
want *v1.Namespace
266+
prepare func() client.Client
272267
wantErr bool
273268
}{
274269
{
275270
name: "Success",
276-
args: args{
277-
ctx: context.TODO(),
278-
},
279-
want: &v1.Namespace{
280-
TypeMeta: metav1.TypeMeta{
281-
Kind: "Namespace",
282-
APIVersion: "v1",
283-
},
284-
ObjectMeta: metav1.ObjectMeta{
285-
Name: "kube-system",
286-
},
271+
prepare: func() client.Client {
272+
return fake.NewClientBuilder().WithObjects(&v1.Namespace{
273+
ObjectMeta: metav1.ObjectMeta{
274+
Name: "kube-system",
275+
UID: "999", // fake UID
276+
},
277+
}).Build()
287278
},
288279
wantErr: false,
289280
},
290281
{
291282
name: "Error",
292-
args: args{
293-
ctx: context.TODO(),
283+
prepare: func() client.Client {
284+
// no objects in fake client
285+
return fake.NewClientBuilder().Build()
294286
},
295-
want: nil,
296287
wantErr: true,
297288
},
298289
}
299290

300291
for _, tt := range tests {
301292
t.Run(tt.name, func(t *testing.T) {
302-
if tt.name == "Success" {
303-
getControllerClient = func(_ *rest.Config, _ *runtime.Scheme) (client.Client, error) {
304-
return fake.NewClientBuilder().WithObjects(tt.want).Build(), nil
305-
}
306-
} else if tt.name == "Error" {
307-
getControllerClient = func(_ *rest.Config, _ *runtime.Scheme) (client.Client, error) {
308-
return fake.NewClientBuilder().Build(), nil
309-
}
293+
getControllerClient = func(_ *rest.Config, _ *runtime.Scheme) (client.Client, error) {
294+
return tt.prepare(), nil
310295
}
311296

312-
got, err := getClusterUID(tt.args.ctx)
297+
got, err := getClusterUID(context.TODO())
313298
if (err != nil) != tt.wantErr {
314299
t.Errorf("getClusterUID() error = %v, wantErr %v", err, tt.wantErr)
315300
return
316301
}
317-
if !reflect.DeepEqual(got, tt.want) {
318-
t.Errorf("getClusterUID() = %v, want %v", got, tt.want)
302+
303+
if !tt.wantErr {
304+
if got.Name != "kube-system" {
305+
t.Errorf("expected namespace kube-system, got %s", got.Name)
306+
}
307+
if string(got.UID) == "" {
308+
t.Errorf("expected non-empty UID")
309+
}
319310
}
320311
})
321312
}

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
args:
2222
- --enable-leader-election
2323
- --prefix=replication.storage.dell.com
24-
image: quay.io/dell/container-storage-modules/dell-replication-controller:v1.12.0
24+
image: quay.io/dell/container-storage-modules/dell-replication-controller:v1.13.0
2525
imagePullPolicy: IfNotPresent
2626
name: manager
2727
env:

deploy/controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ spec:
306306
value: /app/certs
307307
- name: X_CSI_REPLICATION_CONFIG_FILE_NAME
308308
value: config
309-
image: quay.io/dell/container-storage-modules/dell-replication-controller:v1.12.0
309+
image: quay.io/dell/container-storage-modules/dell-replication-controller:v1.13.0
310310
imagePullPolicy: IfNotPresent
311311
name: manager
312312
resources:

go.mod

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
module github.com/dell/csm-replication
22

3-
go 1.24.0
4-
5-
toolchain go1.24.5
3+
go 1.25
64

75
require (
86
github.com/bombsimon/logrusr/v4 v4.1.0
9-
github.com/dell/dell-csi-extensions/common v1.8.1-0.20250811191959-eb2cab02fb75
10-
github.com/dell/dell-csi-extensions/migration v1.8.1-0.20250811191959-eb2cab02fb75
11-
github.com/dell/dell-csi-extensions/replication v1.11.1-0.20250811191959-eb2cab02fb75
7+
github.com/dell/dell-csi-extensions/common v1.8.1-0.20250825155821-05e7f81ae500
8+
github.com/dell/dell-csi-extensions/migration v1.8.1-0.20250825155821-05e7f81ae500
9+
github.com/dell/dell-csi-extensions/replication v1.11.1-0.20250825155821-05e7f81ae500
1210
github.com/dell/gobrick v1.14.0
1311
github.com/fatih/color v1.18.0
1412
github.com/fsnotify/fsnotify v1.9.0
@@ -24,23 +22,23 @@ require (
2422
golang.org/x/sync v0.16.0
2523
google.golang.org/grpc v1.75.0
2624
google.golang.org/protobuf v1.36.6
27-
k8s.io/api v0.33.0
28-
k8s.io/apiextensions-apiserver v0.33.0
29-
k8s.io/apimachinery v0.33.0
30-
k8s.io/client-go v0.33.0
31-
sigs.k8s.io/controller-runtime v0.21.0
25+
k8s.io/api v0.34.0
26+
k8s.io/apiextensions-apiserver v0.34.0
27+
k8s.io/apimachinery v0.34.0
28+
k8s.io/client-go v0.34.0
29+
sigs.k8s.io/controller-runtime v0.22.0
3230
)
3331

3432
require (
3533
github.com/beorn7/perks v1.0.1 // indirect
3634
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3735
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
38-
github.com/dell/goiscsi v1.12.0 // indirect
39-
github.com/dell/gonvme v1.11.1-0.20250812153009-7dca68734c51 // indirect
40-
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
36+
github.com/dell/goiscsi v1.12.1-0.20250828071455-fd1c391bd920 // indirect
37+
github.com/dell/gonvme v1.11.1-0.20250828071511-e8cac5e362ec // indirect
38+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
4139
github.com/evanphx/json-patch v5.9.10+incompatible // indirect
4240
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
43-
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
41+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
4442
github.com/go-logr/zapr v1.3.0 // indirect
4543
github.com/go-openapi/jsonpointer v0.21.0 // indirect
4644
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -49,15 +47,15 @@ require (
4947
github.com/gogo/protobuf v1.3.2 // indirect
5048
github.com/golang/mock v1.6.0 // indirect
5149
github.com/google/btree v1.1.3 // indirect
52-
github.com/google/gnostic-models v0.6.9 // indirect
50+
github.com/google/gnostic-models v0.7.0 // indirect
5351
github.com/google/go-cmp v0.7.0 // indirect
5452
github.com/josharian/intern v1.0.0 // indirect
5553
github.com/json-iterator/go v1.1.12 // indirect
5654
github.com/mailru/easyjson v0.9.0 // indirect
5755
github.com/mattn/go-colorable v0.1.14 // indirect
5856
github.com/mattn/go-isatty v0.0.20 // indirect
5957
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
60-
github.com/modern-go/reflect2 v1.0.2 // indirect
58+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
6159
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
6260
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
6361
github.com/pkg/errors v0.9.1 // indirect
@@ -76,6 +74,8 @@ require (
7674
github.com/x448/float16 v0.8.4 // indirect
7775
go.uber.org/multierr v1.11.0 // indirect
7876
go.uber.org/zap v1.27.0 // indirect
77+
go.yaml.in/yaml/v2 v2.4.2 // indirect
78+
go.yaml.in/yaml/v3 v3.0.4 // indirect
7979
golang.org/x/oauth2 v0.30.0 // indirect
8080
golang.org/x/sys v0.35.0 // indirect
8181
golang.org/x/term v0.34.0 // indirect
@@ -87,10 +87,10 @@ require (
8787
gopkg.in/inf.v0 v0.9.1 // indirect
8888
gopkg.in/yaml.v3 v3.0.1 // indirect
8989
k8s.io/klog/v2 v2.130.1 // indirect
90-
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
91-
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
92-
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
90+
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
91+
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
92+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
9393
sigs.k8s.io/randfill v1.0.0 // indirect
94-
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
95-
sigs.k8s.io/yaml v1.4.0 // indirect
94+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
95+
sigs.k8s.io/yaml v1.6.0 // indirect
9696
)

0 commit comments

Comments
 (0)