deploy-tmp.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ---
  2. apiVersion: apps/v1
  3. kind: $JNLP_CONTROL
  4. metadata:
  5. name: $DRONE_REPO_NAME
  6. namespace: $JNLP_ENV
  7. labels:
  8. app: $DRONE_REPO_NAME
  9. spec:
  10. serviceName: $DRONE_REPO_NAME
  11. replicas: $JNLP_REPLICAS
  12. selector:
  13. matchLabels:
  14. app: $DRONE_REPO_NAME
  15. template:
  16. metadata:
  17. labels:
  18. app: $DRONE_REPO_NAME
  19. spec:
  20. terminationGracePeriodSeconds: 180
  21. initContainers:
  22. - name: init
  23. image: $JNLP_REPO/dev/busybox
  24. command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
  25. volumeMounts:
  26. - name: volume
  27. mountPath: $JNLP_MOUNT_PATH
  28. - name: mkdir
  29. image: $JNLP_REPO/dev/busybox
  30. command: ["mkdir","-p","/data/ecom/asp/logs"]
  31. volumeMounts:
  32. - name: volume
  33. mountPath: $JNLP_MOUNT_PATH
  34. containers:
  35. - name: $DRONE_REPO_NAME
  36. image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
  37. imagePullPolicy: Always
  38. ports:
  39. - containerPort: $JNLP_CONTAINER_PORT
  40. name: port
  41. volumeMounts:
  42. - name: volume
  43. mountPath: $JNLP_MOUNT_PATH
  44. livenessProbe:
  45. tcpSocket:
  46. port: $JNLP_CONTAINER_PORT
  47. initialDelaySeconds: $JNLP_LIVENESS_INIT
  48. periodSeconds: $JNLP_LIVENESS_PER
  49. readinessProbe:
  50. tcpSocket:
  51. port: $JNLP_CONTAINER_PORT
  52. initialDelaySeconds: $JNLP_READINESS_INIT
  53. periodSeconds: $JNLP_READINESS_PER
  54. volumeClaimTemplates:
  55. - metadata:
  56. name: volume
  57. spec:
  58. accessModes: ["ReadWriteOnce"]
  59. storageClassName: rbd
  60. resources:
  61. requests:
  62. storage: $JNLP_STORAGE_CAPACITY
  63. ---
  64. apiVersion: v1
  65. kind: Service
  66. metadata:
  67. name: $DRONE_REPO_NAME-svc
  68. namespace: $JNLP_ENV
  69. labels:
  70. app: $DRONE_REPO_NAME-svc
  71. spec:
  72. type: NodePort
  73. ports:
  74. - port: $JNLP_CONTAINER_PORT
  75. targetPort: $JNLP_CONTAINER_PORT
  76. selector:
  77. app: $DRONE_REPO_NAME