# HG changeset patch # User drewp@bigasterisk.com # Date 1632809993 25200 # Node ID 8f7f7ca65ed42a32a3c6c5d92186e7f7a494114f # Parent 5871ef3a380edacd30cbaf297a0d1c14e42d4a37 don't deploy config files; mount them in so i can edit diff -r 5871ef3a380e -r 8f7f7ca65ed4 service/mqtt_to_rdf/Dockerfile --- a/service/mqtt_to_rdf/Dockerfile Mon Sep 27 23:18:49 2021 -0700 +++ b/service/mqtt_to_rdf/Dockerfile Mon Sep 27 23:19:53 2021 -0700 @@ -15,6 +15,5 @@ RUN pnpm build COPY *.py *.html ./ -COPY conf/ ./conf -CMD [ "python3", "./mqtt_to_rdf.py", "-v" ] +CMD [ "python3", "./mqtt_to_rdf.py", "-v", "--cs=rules" ] diff -r 5871ef3a380e -r 8f7f7ca65ed4 service/mqtt_to_rdf/deploy.yaml --- a/service/mqtt_to_rdf/deploy.yaml Mon Sep 27 23:18:49 2021 -0700 +++ b/service/mqtt_to_rdf/deploy.yaml Mon Sep 27 23:19:53 2021 -0700 @@ -1,3 +1,30 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: mqtt-to-rdf-data + labels: + type: local +spec: + storageClassName: manual + hostPath: + path: "/my/proj/homeauto/service/mqtt_to_rdf/conf" + capacity: { storage: 1Mi } + accessModes: [ReadWriteOnce] + persistentVolumeReclaimPolicy: Retain + claimRef: { namespace: default, name: mqtt-to-rdf-data } +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mqtt-to-rdf-data +spec: + storageClassName: "" + volumeName: "mqtt-to-rdf-data" + accessModes: [ReadWriteOnce] + resources: + requests: + storage: 1Mi +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -17,7 +44,16 @@ image: bang5:5000/mqtt_to_rdf_image imagePullPolicy: "Always" ports: - - containerPort: 10018 + - containerPort: 10018 + volumeMounts: + - { name: data, mountPath: "/opt/conf" } + # resources: + # limits: + # cpu: "2" + # memory: 100Mi + volumes: + - { name: data, persistentVolumeClaim: { claimName: mqtt-to-rdf-data } } + affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: