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

Add --plugins flag to velero install #1930

Merged
merged 5 commits into from
Oct 3, 2019
Merged

Conversation

nrb
Copy link
Contributor

@nrb nrb commented Oct 2, 2019

Fixes #1740

@nrb nrb requested review from carlisia and skriss October 2, 2019 20:36
@nrb nrb changed the title Fix 1740 Add --plugins flag to velero install Oct 2, 2019
@@ -90,6 +91,7 @@ func (o *InstallOptions) BindFlags(flags *pflag.FlagSet) {
flags.BoolVar(&o.UseRestic, "use-restic", o.UseRestic, "create restic deployment. Optional.")
flags.BoolVar(&o.Wait, "wait", o.Wait, "wait for Velero deployment to be ready. Optional.")
flags.DurationVar(&o.DefaultResticMaintenanceFrequency, "default-restic-prune-frequency", o.DefaultResticMaintenanceFrequency, "how often 'restic prune' is run for restic repositories by default. Optional.")
flags.Var(&o.Plugins, "plugins", "Plugin container images to install into the Velero Deployment. Optional.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this supposed to be required?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or should I change it to required on my PR that extracts the cloudproviders?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can change it now if you'd like; I actually need to add a change log anyway.

It's a bit awkward either way at the moment - if it's required now, we basically have to add a dummy plugin image to get velero install to work on master, as the cloud provider plugins aren't present yet.

If it's optional once the plugins are out of tree, then velero install could install a deployment without any object storage plugins present, which would mean it's nonfunctional.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me change it to required as part of the PR that extracts the providers then. That will only go in once we have the plugin repos and their images.

@carlisia
Copy link
Contributor

carlisia commented Oct 2, 2019

Should any documentation be added now?

@carlisia
Copy link
Contributor

carlisia commented Oct 3, 2019

Or, would the documentation for this be this issue: #1884?

nrb added 2 commits October 3, 2019 17:00
Signed-off-by: Nolan Brubaker <[email protected]>
@nrb
Copy link
Contributor Author

nrb commented Oct 3, 2019

I opened #1884 as an alternative to this. I think the documentation that makes sense for this PR is to document that the plugin flag exists and will install any specified container image into the deployment. Specific cloud provider instructions can be done in their respective PR(s).

@skriss
Copy link
Contributor

skriss commented Oct 3, 2019

That makes sense to me re: documentation!

Will review the updated code shortly.

Signed-off-by: Nolan Brubaker <[email protected]>
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM. Some day we should look at converting more of pkg/install to make use of pkg/builder.

@@ -0,0 +1 @@
Add a new required --plugins flag for velero install command. --plugins takes a list of container images to add as initcontainers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically it's optional now, but will be required by the time we release - I'm fine leaving it as-is given that it'll change, but wasn't sure if it was intentional or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll change it to required when I merge the cloud provider extraction PR. I added a todo for that.

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.

👍

@carlisia carlisia merged commit f009fe9 into vmware-tanzu:master Oct 3, 2019
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.

Add --plugins flag to velero install to allow plugins to be included at install time
3 participants