Skip to content

deprecate: driver.spec.EnableMetadata field#454

Open
iPraveenParihar wants to merge 2 commits intoceph:mainfrom
iPraveenParihar:deprecate/setmetadata-flag
Open

deprecate: driver.spec.EnableMetadata field#454
iPraveenParihar wants to merge 2 commits intoceph:mainfrom
iPraveenParihar:deprecate/setmetadata-flag

Conversation

@iPraveenParihar
Copy link
Copy Markdown
Contributor

Describe what this PR does

The EnableMetadata field and --setmetadata flag are no longer used
by the ceph-csi driver. Remove the field from the DriverSpec API,
generated deepcopy, CRD manifests, and Helm chart values/templates.

See: ceph/ceph-csi#6225

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@iPraveenParihar iPraveenParihar changed the title Deprecate/setmetadata flag deprecate: driver.spec.EnableMetadata field Apr 17, 2026
@iPraveenParihar iPraveenParihar marked this pull request as ready for review April 17, 2026 06:09
Comment thread api/v1/driver_types.go
// Not all users might be interested in getting volume/snapshot details as metadata on CephFS subvolume and RBD images.
// Hence enable metadata is false by default.
//+kubebuilder:validation:Optional
EnableMetadata *bool `json:"enableMetadata,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing CRD settings is a breaking change. Consider leaving this setting here, just deprecate it and only remove the internal code that calls the --setmetadata flag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it is okay to remove since we are still at pre v1.0.0 release?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not remove the CRD setting, we can mark this as deprecated and add a notice that the feature is enabled by default in csi now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it is okay to remove since we are still at pre v1.0.0 release?

Since we are shipping already in stable upstream and downstream releases, we need to anyway treat it as v1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understood, will add deprecation notice and keep the field.

@iPraveenParihar iPraveenParihar force-pushed the deprecate/setmetadata-flag branch 4 times, most recently from be23753 to 06806ae Compare April 21, 2026 06:38
# -- Cluster name identifier (default: "")
clusterName: ""
# -- Flag to enable metadata (default: false)
# -- [Deprecated] This field is no longer used and will be ignored (default: false)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing a setting from a helm chart is not a breaking change. Any extra values in the values.yaml would be ignored. So you could go ahead and remove the setting from values.yaml

}
if dest.EnableMetadata == nil {
dest.EnableMetadata = src.EnableMetadata
if dest.EnableMetadata == nil { //nolint:staticcheck // backward compatibility for deprecated field
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think this is not necessary. Backward compatibility is to avoid breaking API changes, but we don't need to keep code that preserves the setting.

The EnableMetadata field and --setmetadata flag are no longer used
by the ceph-csi driver. Mark the field as deprecated in the v1
DriverSpec API, generated CRD manifests, and Helm chart values
instead of removing it, to avoid a breaking CRD schema change.

Signed-off-by: Praveen M <m.praveen@ibm.com>
Remove the SetMetadataContainerArg utility function and its usage
in the driver controller. The deprecated EnableMetadata API field
is retained for backward compatibility but no longer results in the
--setmetadata flag being passed to ceph-csi containers.

Signed-off-by: Praveen M <m.praveen@ibm.com>
@iPraveenParihar iPraveenParihar force-pushed the deprecate/setmetadata-flag branch from 06806ae to dc6c4e3 Compare April 22, 2026 04:43
@iPraveenParihar iPraveenParihar requested a review from travisn April 22, 2026 08:51
Copy link
Copy Markdown
Member

@travisn travisn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants