Skip to content

Commit db4a107

Browse files
committed
fix(controller): load_db_state_to_k8s err
1 parent 2f84679 commit db4a107

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

rootfs/api/management/commands/load_db_state_to_k8s.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from api.models.domain import Domain
88
from api.models.certificate import Certificate
99
from api.models.service import Service
10+
from api.models.volume import Volume
11+
from api.models.gateway import Route, Gateway
1012
from api.exceptions import DryccException, AlreadyExists
1113

1214

@@ -63,11 +65,13 @@ def save_apps(self):
6365
try:
6466
app.save()
6567
app.config_set.latest().save()
66-
app.tls_set.latest().sync()
68+
tls = app.tls_set.latest()
69+
tls.refresh_issuer_to_k8s()
70+
tls.refresh_certificate_to_k8s()
6771
except DryccException as error:
6872
print('ERROR: Problem saving to model {} for {}'
6973
'due to {}'.format(str(App.__name__), str(app), str(error)))
70-
for model in (Key, Domain, Certificate, Service):
74+
for model in (Volume, Route, Gateway, Key, Domain, Certificate, Service):
7175
for obj in model.objects.all():
7276
try:
7377
obj.save()

0 commit comments

Comments
 (0)