Compare commits
6 Commits
auto-updat
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60445df52e | ||
|
|
b1b0042e80 | ||
|
|
e1230f29b3 | ||
|
|
40d908d1ba | ||
|
|
1e6a9affad | ||
|
|
f2e8923285 |
@@ -8,6 +8,8 @@ resources:
|
||||
- ./telemt-daemonset.yaml
|
||||
- ./external-secrets.yaml
|
||||
- ./telemt-external-secrets.yaml
|
||||
- ./telemt-service.yaml
|
||||
- ./telemt-servicemonitor.yaml
|
||||
- ./service.yaml
|
||||
- ./secret-reader.yaml
|
||||
# - ./storage.yaml
|
||||
|
||||
@@ -55,10 +55,10 @@ spec:
|
||||
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
||||
exit 1
|
||||
fi
|
||||
# Build dd-prefixed secret for TLS mode: dd + secret + hex(tls_domain)
|
||||
DOMAIN_HEX=$(echo -n 'ya.ru' | xxd -p | tr -d '\n')
|
||||
DD_SECRET="dd${SECRET}${DOMAIN_HEX}"
|
||||
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${DD_SECRET}"
|
||||
# Build ee-prefixed secret: ee + secret + hex(tls_domain)
|
||||
# "ya.ru" = 79612e7275
|
||||
EE_SECRET="ee${SECRET}79612e7275"
|
||||
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${EE_SECRET}"
|
||||
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
||||
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
||||
kubectl patch secret telemt-links -n "${NAMESPACE}" \
|
||||
@@ -90,6 +90,8 @@ spec:
|
||||
mountPath: /run/telemt/config.toml
|
||||
subPath: config.toml
|
||||
readOnly: true
|
||||
- name: etcdir
|
||||
mountPath: /etc/telemt
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -107,3 +109,7 @@ spec:
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
sizeLimit: 1Mi
|
||||
- name: etcdir
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
sizeLimit: 1Mi
|
||||
|
||||
@@ -29,6 +29,8 @@ spec:
|
||||
|
||||
[server]
|
||||
port = 30444
|
||||
metrics_port = 9090
|
||||
metrics_whitelist = ["0.0.0.0/0"]
|
||||
|
||||
[server.api]
|
||||
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