Compare commits
5 Commits
auto-updat
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c52c00de4a | ||
|
|
e1230f29b3 | ||
|
|
40d908d1ba | ||
|
|
1e6a9affad | ||
|
|
f2e8923285 |
@@ -8,6 +8,8 @@ resources:
|
|||||||
- ./telemt-daemonset.yaml
|
- ./telemt-daemonset.yaml
|
||||||
- ./external-secrets.yaml
|
- ./external-secrets.yaml
|
||||||
- ./telemt-external-secrets.yaml
|
- ./telemt-external-secrets.yaml
|
||||||
|
- ./telemt-service.yaml
|
||||||
|
- ./telemt-servicemonitor.yaml
|
||||||
- ./service.yaml
|
- ./service.yaml
|
||||||
- ./secret-reader.yaml
|
- ./secret-reader.yaml
|
||||||
# - ./storage.yaml
|
# - ./storage.yaml
|
||||||
|
|||||||
@@ -55,10 +55,9 @@ spec:
|
|||||||
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Build dd-prefixed secret for TLS mode: dd + secret + hex(tls_domain)
|
# Build ee-prefixed secret for secure mode
|
||||||
DOMAIN_HEX=$(echo -n 'ya.ru' | xxd -p | tr -d '\n')
|
EE_SECRET="ee${SECRET}"
|
||||||
DD_SECRET="dd${SECRET}${DOMAIN_HEX}"
|
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${EE_SECRET}"
|
||||||
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${DD_SECRET}"
|
|
||||||
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
||||||
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
||||||
kubectl patch secret telemt-links -n "${NAMESPACE}" \
|
kubectl patch secret telemt-links -n "${NAMESPACE}" \
|
||||||
@@ -90,6 +89,8 @@ spec:
|
|||||||
mountPath: /run/telemt/config.toml
|
mountPath: /run/telemt/config.toml
|
||||||
subPath: config.toml
|
subPath: config.toml
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: etcdir
|
||||||
|
mountPath: /etc/telemt
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
@@ -107,3 +108,7 @@ spec:
|
|||||||
emptyDir:
|
emptyDir:
|
||||||
medium: Memory
|
medium: Memory
|
||||||
sizeLimit: 1Mi
|
sizeLimit: 1Mi
|
||||||
|
- name: etcdir
|
||||||
|
emptyDir:
|
||||||
|
medium: Memory
|
||||||
|
sizeLimit: 1Mi
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ spec:
|
|||||||
|
|
||||||
[server]
|
[server]
|
||||||
port = 30444
|
port = 30444
|
||||||
|
metrics_port = 9090
|
||||||
|
metrics_whitelist = ["0.0.0.0/0"]
|
||||||
|
|
||||||
[server.api]
|
[server.api]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|||||||
17
k8s/apps/mtproxy/telemt-service.yaml
Normal file
17
k8s/apps/mtproxy/telemt-service.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: telemt-metrics
|
||||||
|
labels:
|
||||||
|
app: telemt
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: telemt
|
||||||
|
ports:
|
||||||
|
- port: 9090
|
||||||
|
targetPort: 9090
|
||||||
|
protocol: TCP
|
||||||
|
name: metrics
|
||||||
21
k8s/apps/mtproxy/telemt-servicemonitor.yaml
Normal file
21
k8s/apps/mtproxy/telemt-servicemonitor.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: telemt-metrics
|
||||||
|
labels:
|
||||||
|
app: telemt
|
||||||
|
release: prometheus
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: telemt
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
path: /metrics
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
|
honorLabels: true
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- mtproxy
|
||||||
Reference in New Issue
Block a user