capactio / capact

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

Add common TypeInstance injection #635

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

Blocked by: https://github.com/capactio/capact/pull/630

To make it easy to define injection of backend storage for TypeInstances with dynamic values, in Global and Action Policies we need to introduce an additional feature—common TypeInstance injection configuration:

interface:
  rules: [] # rules for Interfaces, now nested under `interface`

  default: # properties applied to all rules above
    inject:
      requiredTypeInstances:
        - id: "3ef2e4ac-9070-4093-a3ce-142139fd4a16"
          description: "Helm storage (cap.type.helm.storage:0.1.0)"

          # it works globally, not only for storage backends:
        - id: "c4f66896-c2a1-4031-b847-b55ae6a26c80"
          description: "GCP SA (cap.type.gcp.auth.service-account:0.1.0)"

typeInstance:
  rules: [] # ...

Acceptance Criteria

mkuziemko commented 2 years ago

Here is a list of PR to review:

During testing, I also spotted a potential issue with one of the manifests from hub-manifest, I added a note in the PR and I will create a PR if it will be verified that is needed.