deploy-tmp.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. imagePullPolicy: Always
  26. volumeMounts:
  27. - name: volume
  28. mountPath: $JNLP_MOUNT_PATH
  29. nodeSelector:
  30. app.touchrs: touchrs
  31. containers:
  32. - name: $DRONE_REPO_NAME
  33. image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
  34. imagePullPolicy: Always
  35. ports:
  36. - containerPort: $JNLP_CONTAINER_PORT
  37. name: port
  38. volumeMounts:
  39. - name: volume
  40. mountPath: $JNLP_MOUNT_PATH
  41. livenessProbe:
  42. tcpSocket:
  43. port: $JNLP_CONTAINER_PORT
  44. initialDelaySeconds: $JNLP_LIVENESS_INIT
  45. periodSeconds: $JNLP_LIVENESS_PER
  46. readinessProbe:
  47. tcpSocket:
  48. port: $JNLP_CONTAINER_PORT
  49. initialDelaySeconds: $JNLP_READINESS_INIT
  50. periodSeconds: $JNLP_READINESS_PER
  51. volumeClaimTemplates:
  52. - metadata:
  53. name: volume
  54. spec:
  55. accessModes: ["ReadWriteOnce"]
  56. storageClassName: rbd
  57. resources:
  58. requests:
  59. storage: $JNLP_STORAGE_CAPACITY
  60. ---
  61. apiVersion: v1
  62. kind: Service
  63. metadata:
  64. name: $DRONE_REPO_NAME-svc
  65. namespace: $JNLP_ENV
  66. labels:
  67. app: $DRONE_REPO_NAME-svc
  68. spec:
  69. type: NodePort
  70. ports:
  71. - port: $JNLP_CONTAINER_PORT
  72. targetPort: $JNLP_CONTAINER_PORT
  73. selector:
  74. app: $DRONE_REPO_NAME