capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

Support dynamic TypeInstances in umbrella workflow #695

Closed pkosiec closed 2 years ago

pkosiec commented 2 years ago

Description

This is an outcome of #688, discussed and agreed with @mszostok. The solution is to use value field to store the rendered value, even for dynamic TypeInstances (the ones which has dynamic values fetched based on context).

AC

Reason

Previously, every downloaded TypeInstance in a workflow had a form of an artifact with the TypeInstance value. Now, every TypeInstance have:

value: {} # static value, or resolved value based on context
backend:
  context: {} # additional context for storage backend

Jinja2 templating and Artifact Merger already support unpacking value.

Sometimes the artifact could contain just the backend.context. For example, if we took an artifact prepared for Helm Template storage:

backend:
  context:
    chartLocation: https://charts.bitnami.com/bitnami
    driver: secrets
    name: postgresql-1648472938
    namespace: default
value: null

The problem is that some of further workflow steps might need actual values, and the value is null.

Related issues

See #688