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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fix plugin name derivation from image name #3711

Merged
merged 2 commits into from Apr 22, 2021

Conversation

ashish-amarnath
Copy link
Contributor

@ashish-amarnath ashish-amarnath commented Apr 21, 2021

Signed-off-by: Ashish Amarnath ashisham@vmware.com

Thank you for contributing to Velero!

Plugin's init container name is derived from the plugin's image that is supplied in the velero plugin add command.
This derivation is a concatenation of image's repository name, and the image name. Further replacing characters that are allowed in container images repository name but not in a valid RFC-1123 label. Specifically, the container image repository name matches the regex [a-z0-9]+(?:[._-][a-z0-9]+)*. However, valid RFC-1123 labels should not have _ or ..
This PR replaces _ and .with - making the derived name RFC-1123 compliant.

Does your change fix a particular issue?

Fixes #3715

Please indicate you've done the following:

@ashish-amarnath ashish-amarnath added this to In progress in Velero Sprint 04-19-2021 via automation Apr 21, 2021
@ashish-amarnath ashish-amarnath added this to the v1.7.0 milestone Apr 21, 2021
@ashish-amarnath
Copy link
Contributor Author

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Apr 21, 2021
@carlisia carlisia moved this from In progress to Review in progress in Velero Sprint 04-19-2021 Apr 21, 2021
@zubron
Copy link
Contributor

zubron commented Apr 21, 2021

The issue this PR fixes has been reported here: #3715.

Copy link
Contributor

@zubron zubron left a comment

Choose a reason for hiding this comment

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

This looks good, thanks for addressing it so quickly, @ashish-amarnath! Given that this has been reported by a community member (#3715) and is a bug, I think it should have a changelog.

@carlisia carlisia self-requested a review April 21, 2021 14:56
@ashish-amarnath ashish-amarnath removed the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Apr 21, 2021
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
@ashish-amarnath
Copy link
Contributor Author

@zubron I've added the changelog that you requested. PTAL.
The failing CI check is for auto assigning of reviewers that @carlisia fixed or is fixing.

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

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

Thsnkd for adding the test!

@ashish-amarnath ashish-amarnath moved this from Review in progress to Reviewer approved in Velero Sprint 04-19-2021 Apr 22, 2021
@carlisia carlisia moved this from Reviewer approved to Review in progress in Velero Sprint 04-19-2021 Apr 22, 2021
Velero Sprint 04-19-2021 automation moved this from Review in progress to Reviewer approved Apr 22, 2021
Copy link
Contributor

@zubron zubron left a comment

Choose a reason for hiding this comment

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

Thanks!

@zubron zubron merged commit 32c3820 into vmware-tanzu:main Apr 22, 2021
Velero Sprint 04-19-2021 automation moved this from Reviewer approved to Done Apr 22, 2021
zubron pushed a commit to zubron/velero that referenced this pull request Jun 21, 2021
* 馃悰 Fix plugin name derivation from image name

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
ywk253100 pushed a commit to ywk253100/velero that referenced this pull request Jun 29, 2021
* 馃悰 Fix plugin name derivation from image name

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
gyaozhou pushed a commit to gyaozhou/velero-read that referenced this pull request May 14, 2022
* 馃悰 Fix plugin name derivation from image name

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>

* changelog

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

[Velero 1.6.0] velero plugin add command fails when the registry path has _ in it.
4 participants