Skip to content

Commit

Permalink
Merge pull request #2532 from andyzhangx/add-extra-create-metadata-sn…
Browse files Browse the repository at this point in the history
…apshot

feat: add extra-create-metadata=true on snapshot sidecar
  • Loading branch information
andyzhangx authored Sep 21, 2024
2 parents 44acb93 + 0044ec7 commit ec99ab6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Binary file modified charts/latest/azuredisk-csi-driver-v0.0.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ spec:
- "--leader-election-namespace={{ .Release.Namespace }}"
- "-v=2"
- "--timeout=1200s"
- "--extra-create-metadata=true"
env:
- name: ADDRESS
value: /csi/csi.sock
Expand Down
1 change: 1 addition & 0 deletions deploy/csi-azuredisk-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ spec:
- "--leader-election-namespace=kube-system"
- "--v=2"
- "--timeout=1200s"
- "--extra-create-metadata=true"
env:
- name: ADDRESS
value: /csi/csi.sock
Expand Down
3 changes: 3 additions & 0 deletions pkg/azureconstants/azure_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const (
PvcNamespaceTag = "kubernetes.io-created-for-pvc-namespace"
PvcNameTag = "kubernetes.io-created-for-pvc-name"
PvNameKey = "csi.storage.k8s.io/pv/name"
VolumeSnapshotNameKey = "csi.storage.k8s.io/volumesnapshot/name"
VolumeSnapshotNamespaceKey = "csi.storage.k8s.io/volumesnapshot/namespace"
VolumeSnapshotContentNameKey = "csi.storage.k8s.io/volumesnapshotcontent/name"
PvNameTag = "kubernetes.io-created-for-pv-name"
RateLimited = "rate limited"
RequestedSizeGib = "requestedsizegib"
Expand Down
6 changes: 6 additions & 0 deletions pkg/azuredisk/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,12 @@ func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequ
dataAccessAuthMode = v
case consts.TagValueDelimiterField:
tagValueDelimiter = v
case consts.VolumeSnapshotNameKey:
// ignore the key
case consts.VolumeSnapshotNamespaceKey:
// ignore the key
case consts.VolumeSnapshotContentNameKey:
// ignore the key
default:
return nil, status.Errorf(codes.Internal, "AzureDisk - invalid option %s in VolumeSnapshotClass", k)
}
Expand Down

0 comments on commit ec99ab6

Please sign in to comment.