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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: log-viewer-frontend name: logmower-frontend
annotations:
keel.sh/policy: force
keel.sh/trigger: poll
spec: spec:
revisionHistoryLimit: 0
replicas: 2
selector: selector:
matchLabels: &selectorLabels matchLabels:
app.kubernetes.io/name: camtiler app: logmower-frontend
component: log-viewer-frontend
template: template:
metadata: metadata:
labels: *selectorLabels labels:
app: logmower-frontend
spec: spec:
containers: containers:
- name: log-viewer-frontend - name: logmower-frontend
image: harbor.k-space.ee/k-space/log-viewer-frontend:latest image: harbor.k-space.ee/k-space/logmower-frontend
securityContext: ports:
readOnlyRootFilesystem: true - containerPort: 8080
runAsNonRoot: true name: http
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
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: log-viewer-backend name: logmower-eventsource
annotations:
keel.sh/policy: force
keel.sh/trigger: poll
spec: spec:
revisionHistoryLimit: 0
replicas: 2
selector: selector:
matchLabels: &selectorLabels matchLabels:
app.kubernetes.io/name: camtiler app: logmower-eventsource
component: log-viewer-backend
template: template:
metadata: metadata:
labels: *selectorLabels labels:
app: logmower-eventsource
spec: spec:
containers: containers:
- name: log-backend-backend - name: logmower-eventsource
image: harbor.k-space.ee/k-space/log-viewer:latest image: harbor.k-space.ee/k-space/logmower-eventsource
securityContext: ports:
readOnlyRootFilesystem: true - containerPort: 3002
runAsNonRoot: true name: nodejs
runAsUser: 1000
env: env:
- name: MONGO_URI - name: MONGODB_HOST
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: mongodb-application-readwrite name: mongodb-application-readonly
key: connectionString.standard key: connectionString.standard
- name: MINIO_BUCKET - name: BACKEND
value: application value: 'camtiler'
- name: MINIO_HOSTNAME - name: BACKEND_BROKER_URL
value: cams-s3.k-space.ee value: 'http://camera-event-broker'
- name: MINIO_PORT ---
value: "443" apiVersion: apps/v1
- name: MINIO_SCHEME kind: Deployment
value: "https" metadata:
- name: MINIO_SECRET_KEY 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: valueFrom:
secretKeyRef: secretKeyRef:
name: minio-secrets name: minio-secrets
key: MINIO_ROOT_PASSWORD key: MINIO_ROOT_PASSWORD
- name: MINIO_ACCESS_KEY - name: AWS_ACCESS_KEY_ID
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: minio-secrets name: minio-secrets
key: MINIO_ROOT_USER 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 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: log-viewer-frontend name: logmower-frontend
spec: spec:
type: ClusterIP type: ClusterIP
selector: selector:
app.kubernetes.io/name: camtiler app: logmower-frontend
component: log-viewer-frontend
ports: ports:
- protocol: TCP - protocol: TCP
port: 3003 port: 8080
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: log-viewer-backend name: logmower-eventsource
spec: spec:
type: ClusterIP type: ClusterIP
selector: selector:
app.kubernetes.io/name: camtiler app: logmower-eventsource
component: log-viewer-backend
ports: ports:
- protocol: TCP - protocol: TCP
port: 3002 port: 3002
--- ---
apiVersion: v1 apiVersion: v1
kind: Service 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: metadata:
name: camera-tiler name: camera-tiler
labels: labels:
@ -245,16 +248,16 @@ spec:
path: "/events" path: "/events"
backend: backend:
service: service:
name: log-viewer-backend name: logmower-eventsource
port: port:
number: 3002 number: 3002
- pathType: Prefix - pathType: Prefix
path: "/" path: "/"
backend: backend:
service: service:
name: log-viewer-frontend name: logmower-frontend
port: port:
number: 3003 number: 8080
tls: tls:
- hosts: - hosts:
- "*.k-space.ee" - "*.k-space.ee"