Skip to content

Commit 4b4c139

Browse files
authored
Merge pull request #179 from hypersign-protocol/bypass/authz
2 parents 9a025c1 + 19640f9 commit 4b4c139

File tree

92 files changed

+3944
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3944
-700
lines changed

.deploy/deployment.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ spec:
2727
failureThreshold: 3
2828

2929
resources:
30-
limits:
30+
requests:
3131
memory: "2Gi"
32-
cpu: "1000m"
32+
cpu: "4000m"
33+
limits:
34+
memory: "4Gi"
35+
cpu: "8000m"
3336
ports:
3437
- containerPort: __PORT__
3538
env:
@@ -59,8 +62,12 @@ spec:
5962
value: __JWT_SECRET__
6063
- name: GLOBAL_TXN_CONTROLLER_QUEUE
6164
value: __GLOBAL_TXN_CONTROLLER_QUEUE__
65+
- name: Tx_Query_API
66+
value: __Tx_Query_API__
6267
- name: RABBIT_MQ_URI
6368
value: __RABBIT_MQ_URI__
69+
- name: NODE_ENV
70+
value: __NODE_ENV__
6471
- name: WHITELISTED_CORS
6572
value: "['https://entity.hypersign.id','https://api.entity.hypersign.id','https://api.entity-test.hypersign.id','https://wallet-prajna.hypersign.id']"
6673
volumeMounts:
@@ -87,6 +94,7 @@ spec:
8794
- port: __PORT__
8895
targetPort: __PORT__
8996
protocol: TCP
97+
9098
# ---
9199
# apiVersion: apps/v1
92100
# kind: Deployment
@@ -132,6 +140,3 @@ spec:
132140
# - port: 8080
133141
# targetPort: 8080
134142
# protocol: TCP
135-
136-
137-

.deploy/hpa2.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: autoscaling/v2
2+
kind: HorizontalPodAutoscaler
3+
metadata:
4+
name: entity-api-test
5+
namespace: hypermine-development
6+
spec:
7+
scaleTargetRef:
8+
apiVersion: apps/v1
9+
kind: Deployment
10+
name: entity-api-test
11+
minReplicas: 1
12+
maxReplicas: 5
13+
metrics:
14+
- type: Resource
15+
resource:
16+
name: cpu
17+
target:
18+
type: Utilization
19+
averageUtilization: 70
20+
- type: Resource
21+
resource:
22+
name: memory
23+
target:
24+
type: Utilization
25+
averageUtilization: 70

.deploy/ingress.yaml

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,42 @@ metadata:
1414

1515
spec:
1616
tls:
17-
- secretName: entity-ssl
18-
hosts:
19-
- "api.entity.hypersign.id"
20-
- "*.api.entity.hypersign.id"
21-
17+
- secretName: entity-ssl
18+
hosts:
19+
- "api.entity.hypersign.id"
20+
- "*.api.entity.hypersign.id"
2221
rules:
23-
- host: "api.entity.hypersign.id"
24-
http:
25-
paths:
26-
- path: /
27-
pathType: Prefix
28-
backend:
29-
service:
30-
name: entity-api-service
31-
port:
32-
number: 3001
33-
- path: /ssi/
34-
pathType: Prefix
35-
backend:
36-
service:
37-
name: entity-api-service
38-
port:
39-
number: 3001
40-
- path: /api/
41-
pathType: Prefix
42-
backend:
43-
service:
44-
name: entity-api-service
45-
port:
46-
number: 3001
47-
- host: "*.api.entity.hypersign.id"
48-
http:
49-
paths:
50-
- path: /
51-
pathType: Prefix
52-
backend:
53-
service:
54-
name: entity-api-service
55-
port:
56-
number: 3001
57-
- path: /ssi/
58-
pathType: Prefix
59-
backend:
60-
service:
61-
name: entity-api-service
62-
port:
63-
number: 3001
64-
- path: /api/
65-
pathType: Prefix
66-
backend:
67-
service:
68-
name: entity-api-service
69-
port:
70-
number: 3001
22+
- host: "api.entity.hypersign.id"
23+
http:
24+
paths:
25+
- path: /
26+
pathType: Prefix
27+
backend:
28+
service:
29+
name: entity-api-service
30+
port:
31+
number: 3001
32+
- path: /api/
33+
pathType: Prefix
34+
backend:
35+
service:
36+
name: entity-api-service
37+
port:
38+
number: 3001
39+
- host: "*.api.entity.hypersign.id"
40+
http:
41+
paths:
42+
- path: /
43+
pathType: Prefix
44+
backend:
45+
service:
46+
name: entity-api-service
47+
port:
48+
number: 3001
49+
- path: /api/
50+
pathType: Prefix
51+
backend:
52+
service:
53+
name: entity-api-service
54+
port:
55+
number: 3001

.deploy/vpa.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: autoscaling.k8s.io/v1
2+
kind: VerticalPodAutoscaler
3+
metadata:
4+
name: entity-api-vpa
5+
namespace: hypermine-development
6+
spec:
7+
targetRef:
8+
apiVersion: apps/v1
9+
kind: Deployment
10+
name: entity-api
11+
updatePolicy:
12+
updateMode: "Auto" # Options: "Off", "Initial", "Auto"
13+
resourcePolicy:
14+
containerPolicies:
15+
- containerName: "*"
16+
minAllowed:
17+
cpu: "2000m"
18+
memory: "2Gi"
19+
maxAllowed:
20+
cpu: "8000m"
21+
memory: "4Gi"

0 commit comments

Comments
 (0)