Last active
July 17, 2018 02:03
-
-
Save veyalla/2de3e39f4bd811af8f07b2ed81d9032d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: fruity-ai | |
spec: | |
selector: | |
matchLabels: | |
app: fruity-ai | |
replicas: 1 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 0% | |
maxUnavailable: 100% | |
template: | |
metadata: | |
labels: | |
app: fruity-ai | |
# Used by the IoT Edge connector to translate to IoT Edge deployment | |
annotations: | |
isEdgeDeployment: "true" | |
# Device selector query | |
targetCondition: "tags.location='b43'" | |
priority: "15" | |
loggingOptions: "" | |
spec: | |
affinity: | |
podAntiAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
- labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- fruity-ai | |
topologyKey: "kubernetes.io/hostname" | |
# IoT Edge modules expressed as Kubernetes pod containers | |
containers: | |
- name: cameracapture | |
image: "veyalla/cameracapture:latest" | |
- name: fruity-ai | |
image: "veyalla/fruity_ai:latest" | |
# Schedule deployment only on virtual nodes (i.e. IoT Edge Connector) | |
nodeSelector: | |
type: virtual-kubelet | |
tolerations: | |
- key: azure.com/iotedge | |
effect: NoSchedule | |
--- | |
# Config maps are used to provide module desiredProperties and create options. | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: edgehub | |
data: | |
desiredProperties: | | |
{ | |
"routes": {}, | |
"storeAndForwardConfiguration": { | |
"timeToLiveSecs": 7200 | |
} | |
} | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: cameracapture | |
data: | |
status: running | |
restartPolicy: on-unhealthy | |
version: "1.0" | |
createOptions: | | |
{ | |
"Env": [ | |
"VIDEO_PATH=/app/AppleAndBanana.mp4", | |
"IMAGE_PROCESSING_ENDPOINT=http://fruity-ai:80/image", | |
"VERBOSE=FALSE", | |
"RESIZE_WIDTH=256", | |
"RESIZE_HEIGHT=256" | |
], | |
"HostConfig": { | |
"Privileged": true | |
} | |
} | |
desiredProperties: | | |
{ | |
"boo": "bah" | |
} | |
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: fruity-ai | |
data: | |
status: running | |
restartPolicy: on-unhealthy | |
version: "1.0" | |
createOptions: "" | |
desiredProperties: | | |
{ | |
"boo": "bah" | |
} | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment