Compare commits
1 Commits
auto-updat
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a688206a3 |
@@ -44,16 +44,11 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: tgproxy-secret
|
name: tgproxy-secret
|
||||||
key: PORT
|
key: PORT
|
||||||
volumeMounts:
|
|
||||||
- name: data
|
|
||||||
mountPath: /data
|
|
||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
curl -s https://core.telegram.org/getProxySecret -o /data/proxy-secret
|
|
||||||
curl -s https://core.telegram.org/getProxyConfig -o /data/proxy-multi.conf
|
|
||||||
NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
|
NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
|
||||||
SERVER=$(kubectl get node "${NODE_NAME}" -o jsonpath='{.metadata.labels.mtproxy}')
|
SERVER=$(kubectl get node "${NODE_NAME}" -o jsonpath='{.metadata.labels.mtproxy}')
|
||||||
if [ -z "${SERVER}" ]; then
|
if [ -z "${SERVER}" ]; then
|
||||||
@@ -83,14 +78,16 @@ spec:
|
|||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- >-
|
- >-
|
||||||
|
curl -s https://core.telegram.org/getProxySecret -o proxy-secret && \
|
||||||
|
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf && \
|
||||||
mtproto-proxy
|
mtproto-proxy
|
||||||
-u nobody
|
-u nobody
|
||||||
-p 8888
|
-p 8888
|
||||||
-H $(PORT)
|
-H $(PORT)
|
||||||
-M 1
|
-M 1
|
||||||
-S $(SECRET)
|
-S $(SECRET)
|
||||||
--aes-pwd /data/proxy-secret
|
--aes-pwd proxy-secret
|
||||||
/data/proxy-multi.conf
|
proxy-multi.conf
|
||||||
env:
|
env:
|
||||||
- name: SECRET
|
- name: SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ resources:
|
|||||||
- rbac.yaml
|
- rbac.yaml
|
||||||
- redis-deployment.yaml
|
- redis-deployment.yaml
|
||||||
- redis-service.yaml
|
- redis-service.yaml
|
||||||
- paddleocr-deployment.yaml
|
|
||||||
- paddleocr-service.yaml
|
|
||||||
- deployment-main.yaml
|
- deployment-main.yaml
|
||||||
- deployment-worker.yaml
|
- deployment-worker.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: paddleocr
|
|
||||||
labels:
|
|
||||||
app: paddleocr
|
|
||||||
component: n8n
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: paddleocr
|
|
||||||
component: n8n
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: paddleocr
|
|
||||||
component: n8n
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: paddleocr
|
|
||||||
image: c403/paddleocr
|
|
||||||
ports:
|
|
||||||
- containerPort: 5000
|
|
||||||
name: http
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 512Mi
|
|
||||||
limits:
|
|
||||||
cpu: 1000m
|
|
||||||
memory: 2Gi
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 5000
|
|
||||||
initialDelaySeconds: 60
|
|
||||||
periodSeconds: 30
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 5000
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: paddleocr
|
|
||||||
labels:
|
|
||||||
app: paddleocr
|
|
||||||
component: n8n
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: paddleocr
|
|
||||||
component: n8n
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 5000
|
|
||||||
protocol: TCP
|
|
||||||
type: ClusterIP
|
|
||||||
Reference in New Issue
Block a user