forked from cloud-ark/kubeplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom-hello-world-app-composition.yaml
More file actions
49 lines (48 loc) · 1.91 KB
/
custom-hello-world-app-composition.yaml
File metadata and controls
49 lines (48 loc) · 1.91 KB
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
apiVersion: workflows.kubeplus/v1alpha1
kind: ResourceComposition
metadata:
name: custom-hello-world-app-composition
spec:
# newResource defines the new CRD to be installed define a workflow.
newResource:
resource:
kind: CustomHelloWorldApp
group: platformapi.kubeplus
version: v1alpha1
plural: customhelloworldapps
# URL of the Helm chart that contains Kubernetes resources that represent a workflow.
chartURL: file:///custom-hello-chart-0.0.1.tgz
chartName: custom-hello-chart
# respolicy defines the resource policy to be applied to instances of the specified custom resource.
respolicy:
apiVersion: workflows.kubeplus/v1alpha1
kind: ResourcePolicy
metadata:
name: custom-hello-world-app-policy
spec:
resource:
kind: CustomHelloWorldApp
group: platformapi.kubeplus
version: v1alpha1
# resmonitor identifies the resource instances that should be monitored for CPU/Memory/Storage.
# All the Pods that are related to the resource instance through either ownerReference relationship, or all the relationships
# (ownerReference, label, annotation, spec properties) are considered in calculating the statistics.
# The generated output is in Prometheus format.
resmonitor:
apiVersion: workflows.kubeplus/v1alpha1
kind: ResourceMonitor
metadata:
name: custom-hello-world-app-monitor
spec:
resource:
kind: CustomHelloWorldApp
group: platformapi.kubeplus
version: v1alpha1
# This attribute indicates that Pods that are reachable through all the relationships should be used
# as part of calculating the monitoring statistics.
monitorRelationships: all
# Define endpoint for where to pull application specific metrics
appEndpoints:
label: "app=customhelloworld"
endpoint: "metrics"
metrics: ["hello_requests_total", "bye_requests_total"]