mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 13:55:20 +00:00
Add --namespace parameter to install command (#1380)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
committed by
KubeKween
parent
0750b2c789
commit
f8f0d15da2
@@ -133,13 +133,13 @@ func isAvailable(c appsv1beta1.DeploymentCondition) bool {
|
||||
}
|
||||
|
||||
// DeploymentIsReady will poll the kubernetes API server to see if the velero deployment is ready to service user requests.
|
||||
func DeploymentIsReady(factory client.DynamicFactory) (bool, error) {
|
||||
func DeploymentIsReady(factory client.DynamicFactory, namespace string) (bool, error) {
|
||||
gvk := schema.FromAPIVersionAndKind(appsv1beta1.SchemeGroupVersion.String(), "Deployment")
|
||||
apiResource := metav1.APIResource{
|
||||
Name: "deployments",
|
||||
Namespaced: true,
|
||||
}
|
||||
c, err := factory.ClientForGroupVersionResource(gvk.GroupVersion(), apiResource, "velero")
|
||||
c, err := factory.ClientForGroupVersionResource(gvk.GroupVersion(), apiResource, namespace)
|
||||
if err != nil {
|
||||
return false, errors.Wrapf(err, "Error creating client for deployment polling")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user