Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and fix name issue with ToCoreVolume #576

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

dprince
Copy link
Contributor

@dprince dprince commented Oct 28, 2024

No description provided.

volSource, err := s.VolumeSource.ToCoreVolumeSource()
coreVolume := &corev1.Volume{
Name: s.Name,
VolumeSource: *volSource,
Copy link
Contributor

Choose a reason for hiding this comment

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

in case of error when *volSource is nil this will hit a nil ptr dereference error. should check for err condition before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, pushed a fix for that

@dprince dprince force-pushed the to_core_volume_fix branch from 0f8bfb6 to fd3b69f Compare October 29, 2024 10:30
Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

/lgtm

@stuggi stuggi merged commit 1fa2876 into openstack-k8s-operators:main Oct 29, 2024
2 checks passed
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.

2 participants