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.

  • Create Config

  • List Configs

  • Read Config

  • Delete Config

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.

  1. kind: Application
  2. apiVersion: core.oam.dev/v1beta1
  3. metadata:
  4. name: create-config
  5. namespace: "config-e2e-test"
  6. spec:
  7. components: []
  8. workflow:
  9. steps:
  10. - name: write-config
  11. type: create-config
  12. properties:
  13. name: test
  14. config:
  15. key1: value1
  16. key2: 2
  17. key3: true
  18. key4:
  19. key5: value5
  20. ---
  21. kind: Application
  22. apiVersion: core.oam.dev/v1beta1
  23. metadata:
  24. name: read-config
  25. namespace: "config-e2e-test"
  26. spec:
  27. components: []
  28. workflow:
  29. steps:
  30. - name: read-config
  31. type: read-config
  32. properties:
  33. name: test
  34. outputs:
  35. - fromKey: config
  36. name: read-config

Last updated on Aug 4, 2023 by Daniel Higuero