555
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  5. namespace: $K8S_DEPLOY_PARAM_CURR_K8S_NAMESPACE
  6. spec:
  7. selector:
  8. app: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  9. ports:
  10. - name: http
  11. port: 80
  12. protocol: TCP
  13. targetPort: 80
  14. - name: https
  15. port: 443
  16. protocol: TCP
  17. targetPort: 443
  18. - name: tcp
  19. port: 81
  20. protocol: TCP
  21. targetPort: 81
  22. ---
  23. apiVersion: apps/v1
  24. kind: Deployment
  25. metadata:
  26. name: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  27. namespace: $K8S_DEPLOY_PARAM_CURR_K8S_NAMESPACE
  28. spec:
  29. selector:
  30. matchLabels:
  31. app: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  32. replicas: 1
  33. template:
  34. metadata:
  35. namespace: $K8S_DEPLOY_PARAM_CURR_K8S_NAMESPACE
  36. labels:
  37. app: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  38. spec:
  39. imagePullSecrets:
  40. - name: aliyun-acr-secret
  41. containers:
  42. - env:
  43. - name: aliyun_logs_log-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  44. value: stdout
  45. name: $K8S_DEPLOY_PARAM_CURR_MODEL_NAME-$K8S_DEPLOY_PARAM_RESOURCE_SUFFIX
  46. image: $K8S_DEPLOY_PARAM_ARC_PREFIX/$K8S_DEPLOY_PARAM_CURR_MODEL_NAME:$K8S_DEPLOY_PARAM_IMAGE_TAG
  47. imagePullPolicy: Always
  48. ports:
  49. - containerPort: 80
  50. name: http
  51. protocol: TCP
  52. - containerPort: 443
  53. name: https
  54. protocol: TCP
  55. - containerPort: 81
  56. name: rpc
  57. protocol: TCP
  58. volumeMounts:
  59. - mountPath: /etc/localtime
  60. name: tz-config
  61. volumes:
  62. - hostPath:
  63. path: /etc/localtime
  64. type: ""
  65. name: tz-config