resources.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. kind: Namespace
  2. spec:
  3. name: ns-sdk-demo
  4. ---
  5. kind: DataSource
  6. spec:
  7. type: database
  8. namespace: ns-sdk-demo
  9. name: ds-sdk-demo
  10. spec:
  11. type: postgres
  12. user_name: test
  13. password: "123456"
  14. address: "10.0.0.84"
  15. port: "30432"
  16. database: test
  17. max_connections: 40
  18. max_idle_connections: 10
  19. ---
  20. kind: DataContainer
  21. spec:
  22. namespace: ns-sdk-demo
  23. data_source: ds-sdk-demo
  24. name: dc-sdk-demo
  25. spec:
  26. table_name: test.classes
  27. columns:
  28. - name: id
  29. type: varchar(32)
  30. comment: id
  31. primary_key: true
  32. - name: name
  33. type: varchar(128)
  34. comment: 班名
  35. not_null: true
  36. - name: student_num
  37. type: integer
  38. comment: 学生数量
  39. default: 60
  40. - name: student_ids
  41. type: text
  42. comment: 学生ID
  43. not_null: true
  44. - name: graduated_time
  45. type: "timestamp with time zone"
  46. comment: 毕业时间
  47. - name: created_time
  48. type: "timestamp with time zone"
  49. comment: 创建时间
  50. not_null: true
  51. - name: last_updated_time
  52. type: "timestamp with time zone"
  53. comment: 最近更新时间
  54. not_null: true