From 2d669922c6b162b4955abb9a51786fee6b3c5b2d Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Sun, 8 Mar 2020 16:56:10 -0700 Subject: [PATCH] fix format --- ...5-spec-v1alpha2-dependency-parampassing.md | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/design/20200305-spec-v1alpha2-dependency-parampassing.md b/design/20200305-spec-v1alpha2-dependency-parampassing.md index 8d1a008..29caf0d 100644 --- a/design/20200305-spec-v1alpha2-dependency-parampassing.md +++ b/design/20200305-spec-v1alpha2-dependency-parampassing.md @@ -27,7 +27,8 @@ We are proposing to add `dependencies` in AppConfig as follows: ```yaml kind: ApplicationConfiguration -components: +spec: +- components: - componentName: mysql - componentName: web dependencies: @@ -39,24 +40,20 @@ Here a component can describe its dependencies, or dependent components. For Case 1, we also suggest to use ServiceBinding in [trait-injector](https://github.com/oam-dev/trait-injector) to inject secret. It is a trait that should be applied before component starts. We propose to add `ordering` to express trait's ordering w.r.t the component. ```yaml - - componentName: web - dependencies: - - mysql - traits: - - ordering: preStart # applied before component starts - trait: - kind: ServiceBinding - spec: - bindings: - - from: - secret: - secretNameFrom: # Read secret name from MySQLInstance CR and then get secret - apiVersion: ros.aliyun.com/v1alpha2 - kind: MySQLInstance - name: mysql - fieldPath: ".status.connection-secret" - to: # inject into Web Deployment's file path - filePath: /input/mysql-conn +- componentName: web + dependencies: + - mysql + traits: + - ordering: preStart # applied before component starts + trait: + kind: ServiceBinding + spec: + bindings: + - from: + secret: + name: mysql-conn + to: # inject into Web Deployment's file path + filePath: /input/mysql-conn ``` ### Parameter Passing @@ -72,7 +69,7 @@ spec: - componentName: nas-mount-target dependencies: - - nas-file-system + - nas-file-system parameterValues: - name: filesystem-id from: