1
0
forked from k-space/kube

Replace old log viewer with Logmower + camera-event-broker

This commit is contained in:
Erki Aas 2022-12-13 12:43:38 +02:00
parent ea9b63b7cc
commit 4ccfd3d21a

View File

@ -39,127 +39,130 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: log-viewer-frontend
annotations:
keel.sh/policy: force
keel.sh/trigger: poll
name: logmower-frontend
spec:
revisionHistoryLimit: 0
replicas: 2
selector:
matchLabels: &selectorLabels
app.kubernetes.io/name: camtiler
component: log-viewer-frontend
matchLabels:
app: logmower-frontend
template:
metadata:
labels: *selectorLabels
labels:
app: logmower-frontend
spec:
containers:
- name: log-viewer-frontend
image: harbor.k-space.ee/k-space/log-viewer-frontend:latest
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
memory: 50Mi
requests:
cpu: 1m
memory: 20Mi
volumeMounts:
- name : nginx-cache
mountPath: /var/cache/nginx/
- name : nginx-config
mountPath: /var/config/nginx/
- name: var-run
mountPath: /var/run/
volumes:
- emptyDir: {}
name: nginx-cache
- emptyDir: {}
name: nginx-config
- emptyDir: {}
name: var-run
- name: logmower-frontend
image: harbor.k-space.ee/k-space/logmower-frontend
ports:
- containerPort: 8080
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: log-viewer-backend
annotations:
keel.sh/policy: force
keel.sh/trigger: poll
name: logmower-eventsource
spec:
revisionHistoryLimit: 0
replicas: 2
selector:
matchLabels: &selectorLabels
app.kubernetes.io/name: camtiler
component: log-viewer-backend
matchLabels:
app: logmower-eventsource
template:
metadata:
labels: *selectorLabels
labels:
app: logmower-eventsource
spec:
containers:
- name: log-backend-backend
image: harbor.k-space.ee/k-space/log-viewer:latest
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
- name: logmower-eventsource
image: harbor.k-space.ee/k-space/logmower-eventsource
ports:
- containerPort: 3002
name: nodejs
env:
- name: MONGO_URI
- name: MONGODB_HOST
valueFrom:
secretKeyRef:
name: mongodb-application-readwrite
name: mongodb-application-readonly
key: connectionString.standard
- name: MINIO_BUCKET
value: application
- name: MINIO_HOSTNAME
value: cams-s3.k-space.ee
- name: MINIO_PORT
value: "443"
- name: MINIO_SCHEME
value: "https"
- name: MINIO_SECRET_KEY
- name: BACKEND
value: 'camtiler'
- name: BACKEND_BROKER_URL
value: 'http://camera-event-broker'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: camera-event-broker
spec:
selector:
matchLabels:
app: camera-event-broker
template:
metadata:
labels:
app: camera-event-broker
spec:
containers:
- name: camera-event-broker
image: harbor.k-space.ee/playground/camera-event-broker
ports:
- containerPort: 3000
env:
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: minio-secrets
key: MINIO_ROOT_PASSWORD
- name: MINIO_ACCESS_KEY
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: minio-secrets
key: MINIO_ROOT_USER
- name: MINIO_BUCKET
value: 'application'
- name: MINIO_HOSTNAME
value: 'cams-s3.k-space.ee'
- name: MINIO_PORT
value: '443'
- name: MINIO_SCHEMA
value: 'https'
---
apiVersion: v1
kind: Service
metadata:
name: log-viewer-frontend
name: logmower-frontend
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: camtiler
component: log-viewer-frontend
app: logmower-frontend
ports:
- protocol: TCP
port: 3003
port: 8080
---
apiVersion: v1
kind: Service
metadata:
name: log-viewer-backend
name: logmower-eventsource
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: camtiler
component: log-viewer-backend
app: logmower-eventsource
ports:
- protocol: TCP
port: 3002
---
apiVersion: v1
kind: Service
metadata:
name: camera-event-broker
spec:
type: ClusterIP
selector:
app: camera-event-broker
ports:
- protocol: TCP
port: 80
targetPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: camera-tiler
labels:
@ -245,16 +248,16 @@ spec:
path: "/events"
backend:
service:
name: log-viewer-backend
name: logmower-eventsource
port:
number: 3002
- pathType: Prefix
path: "/"
backend:
service:
name: log-viewer-frontend
name: logmower-frontend
port:
number: 3003
number: 8080
tls:
- hosts:
- "*.k-space.ee"