deployment.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. kind: Deployment
  2. apiVersion: apps/v1
  3. metadata:
  4. name: znc
  5. namespace: znc
  6. labels:
  7. app.kubernetes.io/name: znc
  8. spec:
  9. strategy:
  10. type: Recreate
  11. selector:
  12. matchLabels:
  13. app.kubernetes.io/name: znc
  14. template:
  15. metadata:
  16. labels:
  17. app.kubernetes.io/name: znc
  18. spec:
  19. initContainers:
  20. - name: configure
  21. image: znc:1.8.2-slim
  22. command:
  23. - /bin/sh
  24. args:
  25. - /usr/local/bin/script.sh
  26. resources:
  27. limits:
  28. cpu: 10m
  29. memory: 10Mi
  30. requests:
  31. cpu: 10m
  32. memory: 10Mi
  33. securityContext:
  34. capabilities:
  35. drop:
  36. - ALL
  37. readOnlyRootFilesystem: true
  38. allowPrivilegeEscalation: false
  39. runAsNonRoot: true
  40. runAsUser: 100
  41. runAsGroup: 101
  42. volumeMounts:
  43. - mountPath: /usr/local/bin
  44. name: script
  45. - mountPath: /znc-data
  46. name: data
  47. containers:
  48. - name: znc
  49. image: znc:1.8.2-slim
  50. ports:
  51. - containerPort: 6697
  52. hostPort: 6697
  53. livenessProbe:
  54. tcpSocket:
  55. port: 6697
  56. readinessProbe:
  57. tcpSocket:
  58. port: 6697
  59. startupProbe:
  60. tcpSocket:
  61. port: 6697
  62. failureThreshold: 30
  63. periodSeconds: 10
  64. securityContext:
  65. capabilities:
  66. drop:
  67. - ALL
  68. readOnlyRootFilesystem: true
  69. allowPrivilegeEscalation: false
  70. runAsNonRoot: true
  71. runAsUser: 100
  72. runAsGroup: 101
  73. resources:
  74. limits:
  75. cpu: "1"
  76. memory: 32Mi
  77. requests:
  78. cpu: 20m
  79. memory: 4Mi
  80. volumeMounts:
  81. - mountPath: /znc-data
  82. name: data
  83. volumes:
  84. - name: script
  85. configMap:
  86. name: script
  87. - name: data
  88. hostPath:
  89. path: /var/lib/znc
  90. type: Directory