power-monitoring.deployment.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. annotations:
  5. deployment.kubernetes.io/revision: '5'
  6. labels:
  7. app: power-monitoring
  8. name: power-monitoring
  9. namespace: power-monitoring
  10. spec:
  11. progressDeadlineSeconds: 600
  12. replicas: 1
  13. revisionHistoryLimit: 10
  14. selector:
  15. matchLabels:
  16. app: power-monitoring
  17. strategy:
  18. rollingUpdate:
  19. maxSurge: 0
  20. maxUnavailable: 1
  21. type: RollingUpdate
  22. template:
  23. metadata:
  24. creationTimestamp: null
  25. labels:
  26. app: power-monitoring
  27. name: power-monitoring
  28. spec:
  29. containers:
  30. - command:
  31. - sh
  32. - -c
  33. - pip install requests influxdb && python /code/logger.py
  34. image: python:3
  35. imagePullPolicy: IfNotPresent
  36. name: data-logger
  37. resources: {}
  38. terminationMessagePath: /dev/termination-log
  39. terminationMessagePolicy: File
  40. volumeMounts:
  41. - mountPath: /data
  42. name: data
  43. - mountPath: /code
  44. name: code
  45. - image: nginx
  46. imagePullPolicy: Always
  47. name: webserver
  48. ports:
  49. - containerPort: 80
  50. protocol: TCP
  51. resources: {}
  52. terminationMessagePath: /dev/termination-log
  53. terminationMessagePolicy: File
  54. volumeMounts:
  55. - mountPath: /usr/share/nginx/html
  56. name: data
  57. dnsPolicy: ClusterFirst
  58. restartPolicy: Always
  59. schedulerName: default-scheduler
  60. securityContext: {}
  61. terminationGracePeriodSeconds: 30
  62. volumes:
  63. - name: data
  64. persistentVolumeClaim:
  65. claimName: power-monitoring-data
  66. - configMap:
  67. defaultMode: 420
  68. name: logger.py
  69. name: code