File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 3
3
from os .path import basename
4
4
from datetime import timezone
5
5
from dateutil .parser import parse
6
+ from webui .PCWConfig import ConfigFile
6
7
import googleapiclient .discovery
7
8
from googleapiclient .errors import HttpError
8
9
from google .oauth2 import service_account
11
12
12
13
class GCE (Provider ):
13
14
__instances = {}
14
- __skip_networks = frozenset ({"default" })
15
15
16
16
def __new__ (cls , namespace ):
17
17
if namespace not in GCE .__instances :
@@ -20,6 +20,9 @@ def __new__(cls, namespace):
20
20
21
21
def __init__ (self , namespace ):
22
22
super ().__init__ (namespace )
23
+
24
+ self .__skip_networks = frozenset (ConfigFile ().getList ('cleanup/gce-skip-networks' , ["default" ]))
25
+
23
26
self .__compute_client = None
24
27
self .private_key_data = self .get_data ()
25
28
self .project = self .private_key_data ["project_id" ]
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ to = <your_email@suse.com>
31
31
[cleanup]
32
32
# Max age of data storage resources ( used in EC2 only )
33
33
ec2-max-age-days = 1
34
+ # The list of networks which themselves as well as their resources should not be cleaned up
35
+ # This is due to fact that netowrk and security resources in GCP don't have neither tags nor metadata
36
+ gce-skip-networks = default,tf-network
34
37
# Max age of data storage resources ( used in Azure and GCE )
35
38
max-age-hours = 1
36
39
# Max age for images in Openstack
You can’t perform that action at this time.
0 commit comments