Add --plugins flag to velero install (#1930)

* Add plugins flag to install

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2019-10-03 16:44:52 -07:00
committed by KubeKween
parent db59d8d4bc
commit f009fe9bd1
7 changed files with 63 additions and 34 deletions
+5 -1
View File
@@ -215,6 +215,7 @@ type VeleroOptions struct {
BSLConfig map[string]string
VSLConfig map[string]string
DefaultResticMaintenanceFrequency time.Duration
Plugins []string
}
// AllResources returns a list of all resources necessary to install Velero, in the appropriate order, into a Kubernetes cluster.
@@ -266,13 +267,16 @@ func AllResources(o *VeleroOptions) (*unstructured.UnstructuredList, error) {
deployOpts = append(deployOpts, WithRestoreOnly())
}
if len(o.Plugins) > 0 {
deployOpts = append(deployOpts, WithPlugins(o.Plugins))
}
deploy := Deployment(o.Namespace, deployOpts...)
appendUnstructured(resources, deploy)
if o.UseRestic {
ds := DaemonSet(o.Namespace,
WithAnnotations(o.PodAnnotations),
WithImage(o.Image),
WithResources(o.ResticPodResources),