-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomform.yaml
91 lines (91 loc) · 2.57 KB
/
customform.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
apiVersion: v1
data:
panel: "true"
kind: ConfigMap
metadata:
name: template-mlflow-runs-card
namespace: mlflow-system
---
apiVersion: templates.krateo.io/v1alpha1
kind: Widget
metadata:
name: template-mlflow-runs-card
namespace: mlflow-system
spec:
actions:
- template:
apiVersion: templates.krateo.io/v1alpha1
name: template-mlflow-runs-customform
namespace: mlflow-system
resource: customforms
verb: GET
- template:
apiVersion: core.krateo.io/v1alpha1
name: mlflow-runs
namespace: mlflow-system
resource: compositiondefinitions
verb: DELETE
app:
template:
color: ${ .getCompositionDefinition.status.conditions[] | select(.type == "Ready") | if .status == "False" then "orange" elif .status == "True" then "green" else "grey" end }
content: This is a card for MLFlow model runs
icon: fa-person-running
tags: mlflow-system,0.0.3
title: MLFlow Model Runs
status: ${ .getCompositionDefinition.status.conditions[] | select(.type == "Ready") | "Ready:" + .status }
date: ${ .getCompositionDefinition.metadata.creationTimestamp }
propsRef:
name: template-mlflow-runs-card
namespace: mlflow-system
type: card
api:
- name: getCompositionDefinition
path: "/apis/core.krateo.io/v1alpha1/namespaces/mlflow-system/compositiondefinitions/mlflow-runs"
verb: GET
headers:
- 'Accept: application/json'
---
kind: ConfigMap
apiVersion: v1
metadata:
name: template-mlflow-runs-customform
namespace: mlflow-system
data:
onSubmitId: submit
onSubmitVerb: POST
payloadFormKey: spec
---
apiVersion: templates.krateo.io/v1alpha1
kind: CustomForm
metadata:
name: template-mlflow-runs-customform
namespace: mlflow-system
spec:
type: customform
propsRef:
name: template-mlflow-runs-customform
namespace: mlflow-system
actions:
- template:
id: submit
apiVersion: composition.krateo.io/v0-0-3
verb: POST
resource: mlflowruns
payloadToOverride:
- name: metadata.name
value: ${ mlflow.run.name }
- name: metadata.namespace
value: ${ "mlflow-system" }
app:
template:
schema: ${ .getCRD | .spec.versions[] | select(.name == "v0-0-3") | .schema.openAPIV3Schema.properties.spec.properties }
# propertiesToHide:
# - mlflow.properties.credentials
# - mlflow.properties.repo
# - repo
api:
- name: getCRD
path: "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/mlflowruns.composition.krateo.io"
verb: GET
headers:
- 'Accept: application/json'