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

Added CSI provisioner check to func isEBSVolume #11

Merged
merged 2 commits into from
May 20, 2021
Merged

Added CSI provisioner check to func isEBSVolume #11

merged 2 commits into from
May 20, 2021

Conversation

kristianfzr
Copy link

Please review the change and make any needed adjustments. :))

Copy link
Owner

@sergiorua sergiorua left a comment

Choose a reason for hiding this comment

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

The syntax is not right. This is what you need. Amend the PR request if you'd like or let me know and I can fix it myself now I know what the annotation is called.

func isEBSVolume(volume *v1.PersistentVolumeClaim) bool {
	for k, v := range volume.Annotations {
		if k == "volume.beta.kubernetes.io/storage-provisioner" && (v == "kubernetes.io/aws-ebs" || v == "kubernetes.io/ebs.csi.aws.com") {
			return true
		}
	}
	return false
}

@kristianfzr
Copy link
Author

@sergiorua Thanks! I did another commit with the correct syntax.

@sergiorua sergiorua merged commit ce2f993 into sergiorua:master May 20, 2021
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