Read And Write Config In Pipeline
After you read the Connect Helm Repository and the Connect Image Registry guides, you learned to manage the config via CLI and UI. In this guide, we will introduce how to read and write the config in the Pipeline or Workflow.
There are many scenarios, such as:
- Deploy a DB application and write the connector info to the config and share it with other applications.
- Read the shared config to deploy the application.
Base the config to orchestrate the Pipeline and Workflow.
All steps are suitable for the Workflow and Pipeline.
In the workflow, if we only want to share the config content and can not need to check the content validity, we could create the config without the template.
kind: Application
apiVersion: core.oam.dev/v1beta1
metadata:
name: create-config
namespace: "config-e2e-test"
spec:
components: []
workflow:
steps:
- name: write-config
type: create-config
properties:
name: test
config:
key1: value1
key2: 2
key3: true
key4:
key5: value5
---
kind: Application
apiVersion: core.oam.dev/v1beta1
metadata:
name: read-config
namespace: "config-e2e-test"
spec:
components: []
workflow:
steps:
- name: read-config
type: read-config
properties:
name: test
outputs:
- fromKey: config
name: read-config
Last updated on Feb 9, 2023 by dependabot[bot]