deploy-tmp.yaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. replicas: $JNLP_REPLICAS
  11. selector:
  12. matchLabels:
  13. app: $DRONE_REPO_NAME
  14. template:
  15. metadata:
  16. labels:
  17. app: $DRONE_REPO_NAME
  18. spec:
  19. containers:
  20. - name: $DRONE_REPO_NAME
  21. image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
  22. imagePullPolicy: Always
  23. ports:
  24. - containerPort: $JNLP_CONTAINER_PORT
  25. name: port
  26. livenessProbe:
  27. tcpSocket:
  28. port: $JNLP_CONTAINER_PORT
  29. initialDelaySeconds: $JNLP_LIVENESS_INIT
  30. periodSeconds: $JNLP_LIVENESS_PER
  31. readinessProbe:
  32. tcpSocket:
  33. port: $JNLP_CONTAINER_PORT
  34. initialDelaySeconds: $JNLP_READINESS_INIT
  35. periodSeconds: $JNLP_READINESS_PER
  36. -------------
  37. apiVersion: v1
  38. kind: Service
  39. metadata:
  40. name: $DRONE_REPO_NAME-svc
  41. namespace: $JNLP_ENV
  42. labels:
  43. app: $DRONE_REPO_NAME-svc
  44. spec:
  45. type: NodePort
  46. ports:
  47. - port: $JNLP_CONTAINER_PORT
  48. targetPort: $JNLP_CONTAINER_PORT
  49. selector:
  50. app: $DRONE_REPO_NAME
  51. -------------
  52. apiVersion: networking.k8s.io/v1
  53. kind: Ingress
  54. metadata:
  55. name: $DRONE_REPO_NAME-ingress
  56. namespace: $JNLP_ENV
  57. spec:
  58. ingressClassName: nginx
  59. rules:
  60. - host: $JNLP_ENV-$DRONE_REPO_NAME$JNLP_DOMAIN
  61. http:
  62. paths:
  63. - path: /
  64. pathType: ImplementationSpecific
  65. backend:
  66. service:
  67. name: $DRONE_REPO_NAME-svc
  68. port:
  69. number: $JNLP_CONTAINER_PORT
  70. - host: svadv.easou.com
  71. http:
  72. paths:
  73. - path: /
  74. pathType: ImplementationSpecific
  75. backend:
  76. service:
  77. name: $DRONE_REPO_NAME-svc
  78. port:
  79. number: $JNLP_CONTAINER_PORT