From e66facb42f5225b9d010c30ed3ce2e6adb1f0338 Mon Sep 17 00:00:00 2001 From: Manos Vlassis <57320708+mvlassis@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:36:08 +0300 Subject: [PATCH] Cherry pick: Fix recurring runs (#533) * Change namespace in kfp-schedwf * Change namespace in kfp-schedwf * Fix linting * Fix linting * Fix cherry-picking * Remove log_level field --- charms/kfp-schedwf/src/charm.py | 1 - charms/kfp-schedwf/src/components/pebble_component.py | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/charms/kfp-schedwf/src/charm.py b/charms/kfp-schedwf/src/charm.py index 6b11ad9c..7d204386 100755 --- a/charms/kfp-schedwf/src/charm.py +++ b/charms/kfp-schedwf/src/charm.py @@ -73,7 +73,6 @@ def __init__(self, *args): container_name="ml-pipeline-scheduledworkflow", service_name="controller", timezone=self.model.config["timezone"], - namespace=self.model.name, ), depends_on=[self.kubernetes_resources], ) diff --git a/charms/kfp-schedwf/src/components/pebble_component.py b/charms/kfp-schedwf/src/components/pebble_component.py index f10351a6..2238e368 100644 --- a/charms/kfp-schedwf/src/components/pebble_component.py +++ b/charms/kfp-schedwf/src/components/pebble_component.py @@ -13,13 +13,14 @@ def __init__( self, *args, timezone: str, - namespace: str, **kwargs, ): """Pebble service container component in order to configure Pebble layer""" super().__init__(*args, **kwargs) - self.environment = {"CRON_SCHEDULE_TIMEZONE": timezone} - self.namespace = namespace + self.environment = { + "CRON_SCHEDULE_TIMEZONE": timezone, + "NAMESPACE": "", + } def get_layer(self) -> Layer: """Defines and returns Pebble layer configuration @@ -41,8 +42,7 @@ def get_layer(self) -> Layer: "override": "replace", "summary": "scheduled workflow controller service", "startup": "enabled", - "command": "/bin/controller --logtostderr=true" - " --namespace={self.namespace}", + "command": "/bin/controller --logtostderr=true" ' --namespace=""', "environment": self.environment, } },