diff --git a/deployment/configmaps.yaml b/deployment/configmaps.yaml new file mode 100644 index 0000000..0b11304 --- /dev/null +++ b/deployment/configmaps.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: ic-config +data: + CAPTURE: "True" + THRES: "0.25" + TIMEINT: "5" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: s3config + namespace: default +data: + BUCKET_HOST: s3://flotta-ic-data-bucket + BUCKET_NAME: flotta-ic-data-bucket + BUCKET_PORT: "443" + BUCKET_REGION: us-east-1 \ No newline at end of file diff --git a/deployment/edgedevice.yaml b/deployment/edgedevice.yaml new file mode 100644 index 0000000..75e79cd --- /dev/null +++ b/deployment/edgedevice.yaml @@ -0,0 +1,12 @@ +apiVersion: management.project-flotta.io/v1alpha1 +kind: EdgeDevice +metadata: + name: ic-edge-device + namespace: default + labels: + app: camera +spec: + storage: + s3: + configMapName: "s3config" + secretName: "s3secret" \ No newline at end of file diff --git a/deployment/edgeworkload.yaml b/deployment/edgeworkload.yaml new file mode 100644 index 0000000..f2f1ee1 --- /dev/null +++ b/deployment/edgeworkload.yaml @@ -0,0 +1,37 @@ +apiVersion: management.project-flotta.io/v1alpha1 +kind: EdgeWorkload +metadata: + name: edge-ic-workload + namespace: default + annotations: + podman/run.oci.keep_original_groups: "1" +spec: + deviceSelector: + matchLabels: + app: camera + data: + egress: + - source: images + target: images + type: pod + pod: + spec: + containers: + - name: edge-ic-workload + image: quay.io/dpshekhawat/img-class:latest + envFrom: + - configMapRef: + name: ic-config + optional: false + volumeMounts: + - mountPath: /dev/video0 + name: video + securityContext: + seLinuxOptions: + type: 'spc_t' + restartPolicy: Always + volumes: + - name: video + hostPath: + path: /dev/video0 + type: File \ No newline at end of file diff --git a/deployment/secrets.yaml b/deployment/secrets.yaml new file mode 100644 index 0000000..ab35069 --- /dev/null +++ b/deployment/secrets.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: s3secret + namespace: default +type: Opaque +data: + AWS_ACCESS_KEY_ID: AKIA4R4BVJOFS2SNMTSM + AWS_SECRET_ACCESS_KEY: 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