From 689a22441e8e2e19cfea834db40b9c6337bf4540 Mon Sep 17 00:00:00 2001 From: Gaurav Gahlot Date: Thu, 25 Jun 2026 22:08:32 +0200 Subject: [PATCH] add k8s deployment manifests for samples Signed-off-by: Gaurav Gahlot --- apps/anomaly-detection-app/deployment.yaml | 44 ++++++++++++ apps/video-streaming-app/deployment.yaml | 84 ++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 apps/anomaly-detection-app/deployment.yaml create mode 100644 apps/video-streaming-app/deployment.yaml diff --git a/apps/anomaly-detection-app/deployment.yaml b/apps/anomaly-detection-app/deployment.yaml new file mode 100644 index 0000000..59626fc --- /dev/null +++ b/apps/anomaly-detection-app/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: akri-anomaly-detection-app +spec: + replicas: 1 + selector: + matchLabels: + app: akri-anomaly-detection-app + template: + metadata: + labels: + app: akri-anomaly-detection-app + spec: + containers: + - name: akri-anomaly-detection-app + image: ghcr.io/project-akri/examples/anomaly-detection-app:v0.13.21-dev + imagePullPolicy: Always + securityContext: + runAsUser: 1000 + allowPrivilegeEscalation: false + runAsNonRoot: true + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + env: + - name: CONFIGURATION_NAME + value: akri-opcua-monitoring +--- +apiVersion: v1 +kind: Service +metadata: + name: akri-anomaly-detection-app + namespace: default + labels: + app: akri-anomaly-detection-app +spec: + selector: + app: akri-anomaly-detection-app + ports: + - name: http + port: 80 + targetPort: 5000 + type: NodePort diff --git a/apps/video-streaming-app/deployment.yaml b/apps/video-streaming-app/deployment.yaml new file mode 100644 index 0000000..918b882 --- /dev/null +++ b/apps/video-streaming-app/deployment.yaml @@ -0,0 +1,84 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: akri-video-streaming-app +spec: + replicas: 1 + selector: + matchLabels: + app: akri-video-streaming-app + template: + metadata: + labels: + app: akri-video-streaming-app + spec: + serviceAccountName: akri-video-streaming-app-sa + containers: + - name: akri-video-streaming-app + image: ghcr.io/project-akri/examples/video-streaming-app:v0.13.21-dev + imagePullPolicy: Always + securityContext: + runAsUser: 1000 + allowPrivilegeEscalation: false + runAsNonRoot: true + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + env: + # Streamer works in two modes; either specify the following commented + # block of env vars to explicitly target cameras (update the s for + # your specific cameras) or + # specify a Akri configuration name to pick up cameras automatically + # - name: CAMERAS_SOURCE_SVC + # value: "akri-udev-video-svc" + # - name: CAMERA_COUNT + # value: "2" + # - name: CAMERA1_SOURCE_SVC + # value: "akri-udev-video--svc" + # - name: CAMERA2_SOURCE_SVC + # value: "akri-udev-video--svc" + - name: CONFIGURATION_NAME + value: akri-udev-video +--- +apiVersion: v1 +kind: Service +metadata: + name: akri-video-streaming-app + namespace: default + labels: + app: akri-video-streaming-app +spec: + selector: + app: akri-video-streaming-app + ports: + - name: http + port: 80 + targetPort: 5000 + type: NodePort +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: akri-video-streaming-app-sa +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: akri-video-streaming-app-role +rules: +- apiGroups: [""] + resources: ["services"] + verbs: ["list"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: akri-video-streaming-app-binding +roleRef: + apiGroup: "" + kind: ClusterRole + name: akri-video-streaming-app-role +subjects: + - kind: ServiceAccount + name: akri-video-streaming-app-sa + namespace: default