-
Notifications
You must be signed in to change notification settings - Fork 2
/
backend-service.yaml
112 lines (112 loc) · 3.73 KB
/
backend-service.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
# yaml-language-server: $schema=https://run.googleapis.com/$discovery/rest?version=v1
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: backend
annotations:
run.googleapis.com/ingress: all
run.googleapis.com/ingress-status: all
spec:
template:
metadata:
annotations:
run.googleapis.com/cloudsql-instances: stand-with-ukraine-bc-app:us-central1:db
run.googleapis.com/execution-environment: gen2
autoscaling.knative.dev/maxScale: '1'
autoscaling.knative.dev/minScale: '1'
run.googleapis.com/container-dependencies: '{"app":["otel-collector"]}'
spec:
containerConcurrency: 1000
timeoutSeconds: 300
serviceAccountName: "%SERVICE_ACCOUNT%"
containers:
- name: app
image: "%APP_IMAGE%"
ports:
- name: http1
containerPort: "%APP__APPLICATION__PORT%"
env:
- name: OTEL_ENABLE
value: "true"
- name: GCLOUD_TRACE_PROPAGATOR
value: "true"
- name: RUST_LOG
value: "warn,swu_app=trace,otel::tracing=trace"
- name: APP__APPLICATION__PORT
value: "%APP__APPLICATION__PORT%"
- name: APP__APPLICATION__BASE_URL
value: "%APP__APPLICATION__BASE_URL%"
- name: APP__BIGCOMMERCE__INSTALL_REDIRECT_URI
value: "%APP__BIGCOMMERCE__INSTALL_REDIRECT_URI%"
- name: APP__DATABASE__REQUIRE_SSL
value: "false"
- name: APP__DATABASE__SOCKET
valueFrom:
secretKeyRef:
key: "2"
name: APP__DATABASE__SOCKET
- name: APP__DATABASE__DATABASE_NAME
valueFrom:
secretKeyRef:
key: "1"
name: APP__DATABASE__DATABASE_NAME
- name: APP__DATABASE__PASSWORD
valueFrom:
secretKeyRef:
key: "1"
name: APP__DATABASE__PASSWORD
- name: APP__DATABASE__USERNAME
valueFrom:
secretKeyRef:
key: "1"
name: APP__DATABASE__USERNAME
- name: APP__BIGCOMMERCE__CLIENT_SECRET
valueFrom:
secretKeyRef:
key: "1"
name: APP__BIGCOMMERCE__CLIENT_SECRET
- name: APP__BIGCOMMERCE__CLIENT_ID
valueFrom:
secretKeyRef:
key: "1"
name: APP__BIGCOMMERCE__CLIENT_ID
- name: APP__APPLICATION__JWT_SECRET
valueFrom:
secretKeyRef:
key: "1"
name: APP__APPLICATION__JWT_SECRET
- name: APP__LIQ_PAY__PUBLIC_KEY
valueFrom:
secretKeyRef:
key: "2"
name: APP__LIQ_PAY__PUBLIC_KEY
- name: APP__LIQ_PAY__PRIVATE_KEY
valueFrom:
secretKeyRef:
key: "2"
name: APP__LIQ_PAY__PRIVATE_KEY
resources:
limits:
cpu: 750m
memory: 256Mi
startupProbe:
initialDelaySeconds: 0
timeoutSeconds: 1
periodSeconds: 10
failureThreshold: 3
tcpSocket:
port: 8000
- name: otel-collector
image: "%OTEL_COLLECTOR_IMAGE%"
startupProbe:
initialDelaySeconds: 0
timeoutSeconds: 1
periodSeconds: 10
failureThreshold: 3
httpGet:
path: /
port: 13133
resources:
limits:
cpu: 250m
memory: 256Mi