Skip to content

Commit

Permalink
vendor stork changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbinnal-px committed Nov 17, 2024
1 parent 55ab3af commit f038050
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/hashicorp/go-version v1.6.0
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc7
github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc
github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097
github.com/portworx/pxc v0.33.0
github.com/portworx/sched-ops v1.20.4-rc1.0.20240812234304-948bf116243e
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3394,8 +3394,8 @@ github.com/libopenstorage/stork v1.4.1-0.20230502135851-9cacb19e1df5/go.mod h1:R
github.com/libopenstorage/stork v1.4.1-0.20230519043154-cbc10dffaf19/go.mod h1:Xm4DHoViynFXMQKBXGj3IkA77LY2RBFkNtv6vbo3wNw=
github.com/libopenstorage/stork v1.4.1-0.20230601053837-5dd68f026569/go.mod h1:+mKPMCPNhS/XOF2RPcNFijkr67CCCWp0o8OXVG6xxAk=
github.com/libopenstorage/stork v1.4.1-0.20230610103146-72cf75320066/go.mod h1:Yst+fnOYjWk6SA5pXZBKm19wtiinjxQ/vgYTXI3k80Q=
github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc h1:awMZ+7AxZQMSZQ8MXfJJfs/f1bQNeWyRTm2M7ZpiGUk=
github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc/go.mod h1:6LHv0kJyrIftmHrS+Xx59SCMqDdclnXdi14vrTafFxg=
github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097 h1:FmNAsrl3gOZP2WCC9zKAyGxGxG67Vi15aaFZS1DtN7k=
github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097/go.mod h1:NRQF3hftRQG4moohiYUCt/tY9JEUhV0BuBRxeAJj0x8=
github.com/libopenstorage/systemutils v0.0.0-20160208220149-44ac83be3ce1/go.mod h1:xwNGC7xiz/BQ/wbMkvHujL8Gjgseg+x41xMek7sKRRQ=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
Expand Down
2 changes: 1 addition & 1 deletion pkg/drivers/nfsrestore/nfsrestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func jobForRestoreResource(
}
// Not passing the groupId as we do not want to set the RunAsGroup field in the securityContext
// This helps us in setting the primaryGroup ID to root for the user ID.
job, err = utils.AddSecurityContextToJob(job, utils.KdmpJobUid, "", jobOption.SourcePVCName, jobOption.SourcePVCNamespace)
job, err = utils.AddSecurityContextToJob(job, utils.KdmpJobUid, "", jobOption.DestinationPVCName, jobOption.Namespace)
if err != nil {
return nil, err
}
Expand Down
10 changes: 6 additions & 4 deletions pkg/drivers/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,15 +1041,17 @@ func AddSecurityContextToJob(job *batchv1.Job, podUserId, podGroupId, pvcName, p
// If PROVISIONERS_TO_USE_ANYUID is set in kdmp-config, then add rolebinding for anyuid SCC
provisionersListToUseAnyUid, err := extractArrayFromKdmpConfigMap(provisionersToUseAnyUid)
if err != nil {
logrus.Errorf("failed to extract provisioners list from configmap: %v", err)
return nil, err
errMsg := fmt.Sprintf("failed to extract provisioners list from configmap: %v", err)
logrus.Errorf(errMsg)
return nil, fmt.Errorf(errMsg)
}

// Get provisioner name from the pvcName, pvcNamespace
provisionerName, err := GetProvisionerNameFromPvc(pvcName, pvcNamespace)
if err != nil {
logrus.Errorf("failed to get storage class name for pvc [%s/%s]: %v", pvcNamespace, pvcName, err)
return nil, err
errMsg := fmt.Sprintf("failed to get provisionerName name for pvc [%s/%s]: %v", pvcNamespace, pvcName, err)
logrus.Errorf(errMsg)
return nil, fmt.Errorf(errMsg)
}

if len(provisionersListToUseAnyUid) > 0 {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ github.com/libopenstorage/openstorage-sdk-clients/sdk/golang
github.com/libopenstorage/secrets
github.com/libopenstorage/secrets/aws/credentials
github.com/libopenstorage/secrets/k8s
# github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc
# github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097
## explicit; go 1.21
github.com/libopenstorage/stork/drivers
github.com/libopenstorage/stork/drivers/volume
Expand Down

0 comments on commit f038050

Please sign in to comment.