From 72e7404a9480300bae5d2a44a768249eddecedee Mon Sep 17 00:00:00 2001 From: Revital Sur Date: Tue, 13 Jul 2021 09:38:27 +0300 Subject: [PATCH 1/4] Add minor comments. Signed-off-by: Revital Sur --- manager/testdata/new-blueprints/copy-module.yaml | 1 + manager/testdata/new-blueprints/read-module.yaml | 2 ++ .../testdata/new-blueprints/read-transform-blueprint.yaml | 7 ++++++- manager/testdata/new-blueprints/transform-module.yaml | 1 + manager/testdata/new-blueprints/write-module.yaml | 4 +++- manager/testdata/new-blueprints/write-plotter.yaml | 3 ++- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/manager/testdata/new-blueprints/copy-module.yaml b/manager/testdata/new-blueprints/copy-module.yaml index aff5a7bef..a1bf2a5c3 100644 --- a/manager/testdata/new-blueprints/copy-module.yaml +++ b/manager/testdata/new-blueprints/copy-module.yaml @@ -10,6 +10,7 @@ spec: multi-user: false # Could be multi user depending on naming strategy of deployments chart: name: ghcr.io/mesh-for-data/m4d-implicit-copy-batch:0.1.0 + # StatusIndicators allow to check status of a non-standard resource that can not be computed by helm/kstatus statusIndicators: - kind: BatchTransfer successCondition: status.status == SUCCEEDED diff --git a/manager/testdata/new-blueprints/read-module.yaml b/manager/testdata/new-blueprints/read-module.yaml index a48276f72..e279a670b 100644 --- a/manager/testdata/new-blueprints/read-module.yaml +++ b/manager/testdata/new-blueprints/read-module.yaml @@ -26,6 +26,7 @@ spec: confChart: name: ghcr.io/mesh-for-data/read-module-conf:0.1.0 values: {} + # StatusIndicators allow to check status of a non-standard resource that can not be computed by helm/kstatus statusIndicators: - kind: ConfigMap successCondition: metadata.labels.configured == SUCCEEDED @@ -41,6 +42,7 @@ spec: dataformat: csv api: endpoint: + # Always equals the release name. It is mandatory if this module exposes a common service. host: common-arrow-flight-read-service # This can e.g. be used for multi-user services selector: "mod: common-arrow-flight-read-service" # Can be set for multi-user services port: 80 # Mandatory for each service diff --git a/manager/testdata/new-blueprints/read-transform-blueprint.yaml b/manager/testdata/new-blueprints/read-transform-blueprint.yaml index 5a97533b1..5994748e3 100644 --- a/manager/testdata/new-blueprints/read-transform-blueprint.yaml +++ b/manager/testdata/new-blueprints/read-transform-blueprint.yaml @@ -11,6 +11,7 @@ spec: workloadSelector: matchLabels: app: demoapp + # List of modules deployed on the cluster. The modules are deployed in parallel. modules: # The names are human readable in this example. In the implementation this will differ. - name: read-data @@ -31,6 +32,7 @@ spec: bucket: srcbucket object: data.parq service: + # name is the release name. It equals to M4DModule.spec.api.endpoint.host if such defined. name: common-arrow-flight-read-service assetID: m4d-notebook-sample/paysim-csv # Differentiator to original asset for multi user arrow flight service? How to best specify? port: 8080 @@ -47,6 +49,7 @@ spec: selector: "mod: common-arrow-flight-read-service" # Selector of the dependency connection: service: + # name is the release name. It equals to M4DModule.spec.api.endpoint.host if such defined. name: common-arrow-flight-read-service assetID: m4d-notebook-sample/paysim-csv port: 8080 @@ -54,6 +57,7 @@ spec: protocol: arrow-flight dataformat: arrow service: + # name is the release name. It equals to M4DModule.spec.api.endpoint.host if such defined. name: common-transform-arrow-flight assetID: m4d-notebook-sample/paysim-csv port: 8080 @@ -85,6 +89,7 @@ status: status: Ready - name: isolation-transform-to-app status: Ready + # status per dataset assets: - name: m4d-notebook-sample/paysim-csv status: Ready @@ -97,4 +102,4 @@ status: status: Ready - name: transform-step status: Ready - conditions: [] \ No newline at end of file + conditions: [] diff --git a/manager/testdata/new-blueprints/transform-module.yaml b/manager/testdata/new-blueprints/transform-module.yaml index b42d76753..afa9b454d 100644 --- a/manager/testdata/new-blueprints/transform-module.yaml +++ b/manager/testdata/new-blueprints/transform-module.yaml @@ -34,6 +34,7 @@ spec: level: column api: endpoint: + # Always equals the release name. It is mandatory if this module exposes a common service. host: common-transform-arrow-flight # This can e.g. be used for multi-user modules selector: "mod: common-transform-arrow-flight" port: 80 diff --git a/manager/testdata/new-blueprints/write-module.yaml b/manager/testdata/new-blueprints/write-module.yaml index ae90673c5..2ca15edcc 100644 --- a/manager/testdata/new-blueprints/write-module.yaml +++ b/manager/testdata/new-blueprints/write-module.yaml @@ -17,6 +17,7 @@ spec: confChart: name: ghcr.io/mesh-for-data/afwm:0.1.0 values: {} + # StatusIndicators allow to check status of a non-standard resource that can not be computed by helm/kstatus statusIndicators: capabilities: - capability: write @@ -31,9 +32,10 @@ spec: dataformat: csv api: endpoint: + # Always equals the release name. It is mandatory if this module exposes a common service. host: common-arrow-flight-write-service # This can e.g. be used for multi-user modules selector: "mod: common-arrow-flight-write-service" - port: 80 + port: 80 # Mandatory for each service protocol: m4d-arrow-flight dataformat: arrow actions: [] diff --git a/manager/testdata/new-blueprints/write-plotter.yaml b/manager/testdata/new-blueprints/write-plotter.yaml index 7e467a6d8..74efdff50 100644 --- a/manager/testdata/new-blueprints/write-plotter.yaml +++ b/manager/testdata/new-blueprints/write-plotter.yaml @@ -131,6 +131,7 @@ status: status: Ready - name: 04 status: Ready + # status per dataset assets: - name: m4d-notebook-sample/paysim-csv # Endpoint where the asset can be reached. If this was on a different cluster it might point to a different endpoint. @@ -147,4 +148,4 @@ status: conditions: - type: Error status: "False" - message: "This would be a possible error" \ No newline at end of file + message: "This would be a possible error" From bc4780e8907887ba117499aa3d308e87853f4a6a Mon Sep 17 00:00:00 2001 From: Revital Sur Date: Tue, 13 Jul 2021 10:15:07 +0300 Subject: [PATCH 2/4] Add multi-cluster-conf-module.yam Signed-off-by: Revital Sur --- .../multi-cluster-conf-module.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manager/testdata/new-blueprints/multi-cluster-conf-module.yaml diff --git a/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml b/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml new file mode 100644 index 000000000..84db3b257 --- /dev/null +++ b/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml @@ -0,0 +1,23 @@ +# This is an example of a module that deploy (secured) ingress/route in a specific cluster. +# it assumes that an Ingress Controller is already deployed in the cluster. +apiVersion: app.m4d.ibm.com/v1alpha2 +kind: M4DModule +metadata: + name: multi-cluster-conf + namespace: m4d-system + labels: + version: 0.0.1 + name: multi-cluster-conf +spec: + chart: + name: ghcr.io/mesh-for-data/commin-multi-cluster-conf:0.1.0 + # StatusIndicators allow to check status of a non-standard resource that can not be computed by helm/kstatus + statusIndicators: + - kind: Job + successCondition: metadata.annotations.configured == SUCCEEDED + failureCondition: metadata.annotations.configured == FAILED + errorMessage: metadata.annotations.error + capabilities: + - capability: ingress # on openshift a route will be genereted + scope: cluster + From f325c05d9c9c62856864d1a3e8d0e5e3f076dd35 Mon Sep 17 00:00:00 2001 From: Revital Sur Date: Tue, 13 Jul 2021 10:16:34 +0300 Subject: [PATCH 3/4] Minor fix. Signed-off-by: Revital Sur --- .../testdata/new-blueprints/multi-cluster-conf-module.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml b/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml index 84db3b257..5c04df996 100644 --- a/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml +++ b/manager/testdata/new-blueprints/multi-cluster-conf-module.yaml @@ -14,9 +14,9 @@ spec: # StatusIndicators allow to check status of a non-standard resource that can not be computed by helm/kstatus statusIndicators: - kind: Job - successCondition: metadata.annotations.configured == SUCCEEDED - failureCondition: metadata.annotations.configured == FAILED - errorMessage: metadata.annotations.error + successCondition: status.status == SUCCEEDED + failureCondition: status.status == FAILED + errorMessage: status.error capabilities: - capability: ingress # on openshift a route will be genereted scope: cluster From 6e0b2099be80b1ad68ba6e2ee065757a8495b226 Mon Sep 17 00:00:00 2001 From: Revital Sur Date: Thu, 15 Jul 2021 13:00:59 +0300 Subject: [PATCH 4/4] Clerify comment. Signed-off-by: Revital Sur --- manager/testdata/new-blueprints/read-transform-blueprint.yaml | 4 +++- manager/testdata/new-blueprints/transform-module.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manager/testdata/new-blueprints/read-transform-blueprint.yaml b/manager/testdata/new-blueprints/read-transform-blueprint.yaml index 5994748e3..d051f5923 100644 --- a/manager/testdata/new-blueprints/read-transform-blueprint.yaml +++ b/manager/testdata/new-blueprints/read-transform-blueprint.yaml @@ -32,7 +32,9 @@ spec: bucket: srcbucket object: data.parq service: - # name is the release name. It equals to M4DModule.spec.api.endpoint.host if such defined. + # Always equals the release name: If this module exposes a common service than the host is the release + # name of the common service, otherwise it is the release name of the deployed module. + # It is mandatory if this module exposes a common service. name: common-arrow-flight-read-service assetID: m4d-notebook-sample/paysim-csv # Differentiator to original asset for multi user arrow flight service? How to best specify? port: 8080 diff --git a/manager/testdata/new-blueprints/transform-module.yaml b/manager/testdata/new-blueprints/transform-module.yaml index afa9b454d..e32140a50 100644 --- a/manager/testdata/new-blueprints/transform-module.yaml +++ b/manager/testdata/new-blueprints/transform-module.yaml @@ -34,7 +34,9 @@ spec: level: column api: endpoint: - # Always equals the release name. It is mandatory if this module exposes a common service. + # Always equals the release name: If this module exposes a common service than the host is the release + # name of the common service, otherwise it is the release name of the deployed module. + # It is mandatory if this module exposes a common service. host: common-transform-arrow-flight # This can e.g. be used for multi-user modules selector: "mod: common-transform-arrow-flight" port: 80