This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpdf.app.yaml
168 lines (164 loc) · 6.63 KB
/
pdf.app.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: napptive-sc
spec:
components:
- name: napptive-sc
type: k8s-objects # Set to k8s-objects
properties:
objects:
- apiVersion: v1
kind: Secret
metadata:
name: napptive-sc
data:
url: SGkg8J+YiQ==
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: pdf-editor
spec:
components:
- name: frontend
type: webservice
properties:
image: docker.io/dipugodocker/pdf-editor:1.0-frontend
ports:
- port: 80
expose: true
traits:
- type: resource # Set to resource
properties:
requests: # (Optional) Specify resources in requests
cpu: 0.05 # (Optional) Specify the amount of cpu for requests. 1 by default
memory: "10Mi" # (Optional) Specify the amount of memory for requests. 2048Mi by default
limits: # (Optional) Specify resources in limits
cpu: 0.25 # (Optional) Specify the amount of cpu for limits. 1 by default
memory: "200Mi" # (Optional) Specify the amount of memory for limits. 2048Mi by default
- type: napptive-ingress
properties:
port: 80
path: /
workflow:
steps:
- name: apply-frontend
# Apply all the traits and the components in an application
type: apply-application # Set to apply-application
# No arguments required
- name: slack-message
type: notification
properties:
slack: # set to slack
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
url:
# url can either specify in value or secretRef
value: "https://hooks.slack.com/services/AAABBBCdcddcde" # (Optional) slack url
secretRef: # (Optional) slack url in a secret
name: napptive-sc # (Required) secret name
key: url # (Required) secret key
message: # (Required) message to send
text: Hello from frontend!! # (Optional) text
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: backend-merge
spec:
components:
- name: backend-merge
type: webservice
properties:
image: docker.io/dipugodocker/pdf-editor:1.0-backend-merge
ports:
- port: 8080
expose: true
traits:
- type: resource # Set to resource
properties:
requests: # (Optional) Specify resources in requests
cpu: 0.1 # (Optional) Specify the amount of cpu for requests. 1 by default
memory: "50Mi" # (Optional) Specify the amount of memory for requests. 2048Mi by default
limits: # (Optional) Specify resources in limits
cpu: 0.25 # (Optional) Specify the amount of cpu for limits. 1 by default
memory: "200Mi" # (Optional) Specify the amount of memory for limits. 2048Mi by default
- type: init-container
properties:
name: backend-merge-init
image: docker.io/dipugodocker/pdf-editor:1.0-backend-merge
cmd: ["cp", "-vR", ".", "/mnt"] # (Optional) commands run in the init container
mountName: "empty-vol-rotate" # (Required) mount name of shared volume. workdir by default
appMountPath: "/go/src/" # (Required) mount path of app container
initMountPath: "/mnt" # (Required) mount path of init container
workflow:
steps:
- name: apply-backend-merge
# Apply all the traits and the components in an application
type: apply-application # Set to apply-application
# No arguments required
- name: slack-message
type: notification
properties:
slack: # set to slack
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
url:
# url can either specify in value or secretRef
value: "https://hooks.slack.com/services/AAABBBCdcddcde" # (Optional) slack url
secretRef: # (Optional) slack url in a secret
name: napptive-sc # (Required) secret name
key: url # (Required) secret key
message: # (Required) message to send
text: Hello from backend-merger!! # (Optional) text
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: backend-rotate
spec:
components:
- name: backend-rotate
type: webservice
properties:
image: docker.io/dipugodocker/pdf-editor:1.0-backend-rotate
ports:
- port: 8081
expose: true
traits:
- type: resource # Set to resource
properties:
requests: # (Optional) Specify resources in requests
cpu: 0.1 # (Optional) Specify the amount of cpu for requests. 1 by default
memory: "50Mi" # (Optional) Specify the amount of memory for requests. 2048Mi by default
limits: # (Optional) Specify resources in limits
cpu: 0.25 # (Optional) Specify the amount of cpu for limits. 1 by default
memory: "200Mi" # (Optional) Specify the amount of memory for limits. 2048Mi by default
- type: init-container
properties:
name: backend-merge-init
image: docker.io/dipugodocker/pdf-editor:1.0-backend-rotate
cmd: ["cp", "-vR", ".", "/mnt"] # (Optional) commands run in the init container
mountName: "empty-vol-rotate" # (Required) mount name of shared volume. workdir by default
appMountPath: "/go/src/" # (Required) mount path of app container
initMountPath: "/mnt" # (Required) mount path of init container
workflow:
steps:
- name: apply-backend-rotate
# Apply all the traits and the components in an application
type: apply-application # Set to apply-application
# No arguments required
- name: slack-message
type: notification
properties:
slack: # set to slack
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
url:
# url can either specify in value or secretRef
value: "https://hooks.slack.com/services/AAABBBCdcddcde" # (Optional) slack url
secretRef: # (Optional) slack url in a secret
name: napptive-sc # (Required) secret name
key: url # (Required) secret key
message: # (Required) message to send
text: Hello from backend-rotate!! # (Optional) text
...