2 Commits
Author SHA1 Message Date
pierre.geeraert 294af1945d add the actua_replicas to gather the data whenever required
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
2026-09-09 13:49:53 +01:00
pierre.geeraert 430172911e not touching kube-system 2026-09-09 13:29:31 +01:00
3 changed files with 22 additions and 1 deletions
@@ -0,0 +1,19 @@
# Generated by Django 4.2.30 on 2026-09-09 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cloudmanager', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='deployment_data',
name='actual_replica',
field=models.IntegerField(default=1),
preserve_default=False,
),
]
+1
View File
@@ -54,6 +54,7 @@ class Deployment_Data(models.Model):
schedule_week = models.ForeignKey(Schedule_Week_Data,null=True, blank=True, on_delete=models.SET_NULL)
schedule_day = models.ForeignKey(Schedule_Day_Data,null=True, blank=True, on_delete=models.SET_NULL)
replicas = models.IntegerField()
actual_replica = models.IntegerField()
class Meta:
db_table = 'machine'
+2 -1
View File
@@ -8,7 +8,8 @@ from apps.cloudmanager.models import Schedule_Day_Data,Schedule_Week_Data,Namesp
def import_namespace():
namespaces_list = get_namespace()
for namespace in namespaces_list:
Namespace_Data.objects.get_or_create(namespace=namespace)
if namespace[0]!="kube-system":
Namespace_Data.objects.get_or_create(namespace=namespace)
def import_deployment():
deployment_list = get_deployments()