client.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: grpc-example-client
  5. namespace: prd
  6. spec:
  7. backoffLimit: 4
  8. completions: 1
  9. parallelism: 1
  10. template:
  11. spec:
  12. containers:
  13. - env:
  14. - name: PATH
  15. value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/sbin:/opt/go-example
  16. - name: LANG
  17. value: zh_CN.UTF-8
  18. image: ccr.ccs.tencentyun.com/wanpinghui/go-example-client:1582972748
  19. name: grpc-example-client
  20. workingDir: /opt/go-example
  21. imagePullSecrets:
  22. - name: qcloudregistrykey
  23. - name: tencenthubkey
  24. restartPolicy: Never
  25. # 改变pod hosts文件,与containers同级,对ingress-nginx代理gRPC无效
  26. # hostAliases:
  27. # - ip: "10.7.255.164"
  28. # hostnames:
  29. # - "example.wanpinghui.com"
  30. # - "gw.wanpinghui.com"
  31. # 挂载证书,与containers同级
  32. # volumeMounts:
  33. # - mountPath: /opt/go-example/ex_tls.crt
  34. # name: ex-wph-secret
  35. # readOnly: true
  36. # subPath: ex_tls.crt
  37. # - mountPath: /opt/go-example/gw_tls.crt
  38. # name: gw-wph-secret
  39. # readOnly: true
  40. # subPath: gw_tls.crt
  41. # volumes:
  42. # - name: ex-wph-secret
  43. # secret:
  44. # defaultMode: 420
  45. # items:
  46. # - key: tls.crt
  47. # mode: 420
  48. # path: ex_tls.crt
  49. # secretName: ex-wph-secret
  50. # - name: gw-wph-secret
  51. # secret:
  52. # defaultMode: 420
  53. # items:
  54. # - key: tls.crt
  55. # mode: 420
  56. # path: gw_tls.crt
  57. # secretName: gw-wph-secret