Skip to content

Pass credentials and parameters to a dependency #424

@carolynvs

Description

@carolynvs

When a bundle has a dependency, that dependency will also have its own parameters and credentials. How should the parent bundle decide which credentials and parameters to give to a dependency?

Here's one thought. I'm using yaml but this would all be defined in the custom dependencies section in bundle.json. In the example below, the parent bundle would pass its admin-kubeconfig credential to the mysql bundle's kubeconfig credential.

dependencies:
  requires:
    - name: mysql
       reference: getporter/mysql:v0.1.1
       credentials:
         kubeconfig:
           credential: admin-kubeconfig # pass the admin-kubeconfig credential to the kubeconfig credential
       parameters:
         databaseName:
           value: "wordpress" # hard code passing wordpress as the database name
         databaseUser:
           parameter: username # pass the username parameter to the databaseUser parameter

The example above demonstrates how a parent can pass its own parameters and credentials to the dependency. Another scenario is that the output from one dependency needs to be passed to another as a parameter/credential.

dependencies:
  requires:
    - name: mysql
       reference: getporter/mysql:v0.1.1
    - name: wordpress
       reference: getporter/wordpress:v0.1.1
       parameters:
         mysqlConnStr:
           dependency: mysql
           output: connectionString

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions