ci: fix integration tests
diff --git a/atmosphere/flows.py b/atmosphere/flows.py
index 77ba09b..43c254c 100644
--- a/atmosphere/flows.py
+++ b/atmosphere/flows.py
@@ -148,7 +148,9 @@
if config.memcached.enabled:
flow.add(
openstack_helm.ApplyReleaseSecretTask(
- namespace=constants.NAMESPACE_OPENSTACK, chart="memcached"
+ config=config,
+ namespace=constants.NAMESPACE_OPENSTACK,
+ chart="memcached",
),
openstack_helm.ApplyHelmReleaseTask(
namespace=constants.NAMESPACE_OPENSTACK,
diff --git a/atmosphere/models/config.py b/atmosphere/models/config.py
index 20ad2ce..2e4c3bb 100644
--- a/atmosphere/models/config.py
+++ b/atmosphere/models/config.py
@@ -65,7 +65,9 @@
class Config(base.Model):
- memcached = types.ModelType(MemcachedConfig, required=True)
+ memcached = types.ModelType(
+ MemcachedConfig, default=MemcachedConfig(), required=True
+ )
issuer = types.DictType(
types.PolyModelType([AcmeIssuerConfig, SelfSignedIssuerConfig])
)
diff --git a/atmosphere/models/openstack_helm/values.py b/atmosphere/models/openstack_helm/values.py
index afa3eab..b203239 100644
--- a/atmosphere/models/openstack_helm/values.py
+++ b/atmosphere/models/openstack_helm/values.py
@@ -13,7 +13,7 @@
monitoring = types.ModelType(monitoring.Monitoring)
class Options:
- roles = {"default": blacklist("chart", "config")}
+ roles = {"default": blacklist("chart")}
@classmethod
def for_chart(cls, chart, config):
diff --git a/atmosphere/tasks/composite/openstack_helm.py b/atmosphere/tasks/composite/openstack_helm.py
index 5f329b9..7f189b1 100644
--- a/atmosphere/tasks/composite/openstack_helm.py
+++ b/atmosphere/tasks/composite/openstack_helm.py
@@ -10,14 +10,14 @@
class ApplyReleaseSecretTask(v1.ApplySecretTask):
- def __init__(self, namespace: str, chart: str, *args, **kwargs):
- cfg = config.Config.load_from_file()
- vals = values.Values.for_chart(chart, cfg)
-
- data = values.to_native()
- overrides = getattr(cfg, chart).overrides
-
- vals = mergedeep.merge({}, data, overrides)
+ def __init__(
+ self, config: config.Config, namespace: str, chart: str, *args, **kwargs
+ ):
+ vals = mergedeep.merge(
+ {},
+ values.Values.for_chart(chart, config).to_native(),
+ getattr(config, chart).overrides,
+ )
values_yaml = yaml.dump(vals, default_flow_style=False)
super().__init__(