fixed deployment.
This commit is contained in:
parent
343109a727
commit
640172d8ac
@ -7,7 +7,7 @@ spec:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: telegram-listener
|
app: telegram-listener
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -27,22 +27,22 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: host
|
key: host
|
||||||
- name: ASPNETCORE_rmqc_username
|
- name: ASPNETCORE_rmqc_username
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: username
|
key: username
|
||||||
- name: ASPNETCORE_rmqc_password
|
- name: ASPNETCORE_rmqc_password
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: password
|
key: password
|
||||||
- name: ASPNETCORE_rmqc_port
|
- name: ASPNETCORE_rmqc_port
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: port
|
key: port
|
||||||
- name: RebusRabbitMqOptions__ConnectionString
|
- name: RebusRabbitMqOptions__ConnectionString
|
||||||
value: "amqp://$(ASPNETCORE_rmqc_username):$(ASPNETCORE_rmqc_password)@$(ASPNETCORE_rmqc_host):$(ASPNETCORE_rmqc_port)/"
|
value: "amqp://$(ASPNETCORE_rmqc_username):$(ASPNETCORE_rmqc_password)@$(ASPNETCORE_rmqc_host):$(ASPNETCORE_rmqc_port)/"
|
||||||
- name: WTelegramClientOptions__ApiId
|
- name: WTelegramClientOptions__ApiId
|
||||||
@ -65,42 +65,38 @@ spec:
|
|||||||
mountPath: /app/.secrets
|
mountPath: /app/.secrets
|
||||||
- name: rw-files
|
- name: rw-files
|
||||||
mountPath: /tmp/rw-files
|
mountPath: /tmp/rw-files
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: "update-mysql-init"
|
- name: "update-mysql-init"
|
||||||
image: "busybox:latest"
|
image: "busybox:latest"
|
||||||
command: [
|
command:
|
||||||
"sh",
|
- "sh"
|
||||||
"-ce",
|
- "-ce"
|
||||||
"cp /app/.secrets/WTelegram.session /tmp/rw-files/WTelegram.session &&
|
- "cp /app/.secrets/WTelegram.session /tmp/rw-files/WTelegram.session && chmod a+w /tmp/rw-files/WTelegram.session && echo The TL Container is Running ; sleep 5"
|
||||||
chmod a+w /tmp/rw-files/WTelegram.session &&
|
|
||||||
echo The TL Container is Running ; sleep 5 " ]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: secrets
|
- name: secrets
|
||||||
mountPath: /app/.secrets
|
mountPath: /app/.secrets
|
||||||
- name: rw-files
|
- name: rw-files
|
||||||
mountPath: /tmp/rw-files
|
mountPath: /tmp/rw-files
|
||||||
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: 8080
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 30
|
|
||||||
timeoutSeconds: 5
|
|
||||||
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: 8080
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: secrets
|
- name: secrets
|
||||||
secret:
|
secret:
|
||||||
secretName: secretfiles
|
secretName: secretfiles
|
||||||
- name: rw-files
|
- name: rw-files
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -148,22 +144,22 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: host
|
key: host
|
||||||
- name: rmqc_username
|
- name: rmqc_username
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: username
|
key: username
|
||||||
- name: rmqc_password
|
- name: rmqc_password
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: password
|
key: password
|
||||||
- name: rmqc_port
|
- name: rmqc_port
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: port
|
key: port
|
||||||
- name: RebusRabbitMqOptions__ConnectionString
|
- name: RebusRabbitMqOptions__ConnectionString
|
||||||
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
||||||
- name: mariadb_host
|
- name: mariadb_host
|
||||||
@ -179,6 +175,7 @@ spec:
|
|||||||
key: mariadb-root-password
|
key: mariadb-root-password
|
||||||
- name: ConnectionStrings__TextMatcherContext
|
- name: ConnectionStrings__TextMatcherContext
|
||||||
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
|
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -192,12 +189,13 @@ spec:
|
|||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
type: NodePort # Change the service type to NodePort
|
type: NodePort
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: users
|
name: users
|
||||||
namespace: nocr
|
namespace: nocr
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
@ -249,6 +247,7 @@ spec:
|
|||||||
key: mariadb-root-password
|
key: mariadb-root-password
|
||||||
- name: ConnectionStrings__UsersContext
|
- name: ConnectionStrings__UsersContext
|
||||||
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
|
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -262,13 +261,13 @@ spec:
|
|||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
type: NodePort # Change the service type to NodePort
|
type: NodePort
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: telegram-client
|
name: telegram-client
|
||||||
namespace: nocr
|
namespace: nocr
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
@ -292,22 +291,22 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: host
|
key: host
|
||||||
- name: rmqc_username
|
- name: rmqc_username
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: username
|
key: username
|
||||||
- name: rmqc_password
|
- name: rmqc_password
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: password
|
key: password
|
||||||
- name: rmqc_port
|
- name: rmqc_port
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: rmqc-default-user
|
name: rmqc-default-user
|
||||||
key: port
|
key: port
|
||||||
- name: RebusRabbitMqOptions__ConnectionString
|
- name: RebusRabbitMqOptions__ConnectionString
|
||||||
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
value: "amqp://$(rmqc_username):$(rmqc_password)@$(rmqc_host):$(rmqc_port)/"
|
||||||
- name: mariadb_host
|
- name: mariadb_host
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user