From 4ccfd3d21a78e270a24c346cf09a4612ea460371 Mon Sep 17 00:00:00 2001 From: Erki Aas Date: Tue, 13 Dec 2022 12:43:38 +0200 Subject: [PATCH] Replace old log viewer with Logmower + camera-event-broker --- camtiler/application.yml | 161 ++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 79 deletions(-) diff --git a/camtiler/application.yml b/camtiler/application.yml index aab6e34..7eaf186 100644 --- a/camtiler/application.yml +++ b/camtiler/application.yml @@ -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: 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: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: minio-secrets + key: MINIO_ROOT_USER - name: MINIO_BUCKET - value: application + value: 'application' - name: MINIO_HOSTNAME - value: cams-s3.k-space.ee + value: 'cams-s3.k-space.ee' - name: MINIO_PORT - value: "443" - - name: MINIO_SCHEME - value: "https" - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio-secrets - key: MINIO_ROOT_PASSWORD - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio-secrets - key: MINIO_ROOT_USER + 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" -- 2.45.2