forked from openchoreo/openchoreo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment-component.yaml
More file actions
69 lines (61 loc) · 1.47 KB
/
payment-component.yaml
File metadata and controls
69 lines (61 loc) · 1.47 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
apiVersion: openchoreo.dev/v1alpha1
kind: Component
metadata:
name: payment
spec:
owner:
projectName: gcp-microservice-demo
type: Service
---
apiVersion: openchoreo.dev/v1alpha1
kind: Workload
metadata:
name: payment
spec:
owner:
componentName: payment
projectName: gcp-microservice-demo
containers:
main:
image: us-central1-docker.pkg.dev/google-samples/microservices-demo/paymentservice:v0.10.3
env:
- key: DISABLE_PROFILER
value: "1"
- key: PORT
value: "50051"
endpoints:
grpc-endpoint:
type: gRPC
port: 50051
schema:
type: gRPC
content: |
syntax = "proto3";
package hipstershop;
service PaymentService {
rpc Charge(ChargeRequest) returns (ChargeResponse) {}
}
message CreditCardInfo {
string credit_card_number = 1;
int32 credit_card_cvv = 2;
int32 credit_card_expiration_year = 3;
int32 credit_card_expiration_month = 4;
}
message ChargeRequest {
Money amount = 1;
CreditCardInfo credit_card = 2;
}
message ChargeResponse {
string transaction_id = 1;
}
---
apiVersion: openchoreo.dev/v1alpha1
kind: Service
metadata:
name: payment
spec:
owner:
componentName: payment
projectName: gcp-microservice-demo
workloadName: payment
overrides: {}