File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import (
33
33
"k8s.io/apimachinery/pkg/util/uuid"
34
34
"k8s.io/apimachinery/pkg/util/wait"
35
35
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
36
+ gce "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
36
37
)
37
38
38
39
const (
@@ -238,6 +239,10 @@ func (i *InstanceInfo) createDefaultFirewallRule() error {
238
239
}
239
240
_ , err = i .computeService .Firewalls .Insert (i .project , f ).Do ()
240
241
if err != nil {
242
+ if gce .IsGCEError (err , "alreadyExists" ) {
243
+ glog .V (4 ).Infof ("Default firewall rule %v already exists, skipping creation" , defaultFirewallRule )
244
+ return nil
245
+ }
241
246
return fmt .Errorf ("Failed to insert required default SSH firewall Rule %v: %v" , defaultFirewallRule , err )
242
247
}
243
248
} else {
You can’t perform that action at this time.
0 commit comments