provider-config.schema.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "https://external-secrets.io/schemas/provider-config.schema.json",
  4. "title": "Provider Configuration",
  5. "description": "Configuration schema for External Secrets Operator v2 provider code generation",
  6. "type": "object",
  7. "required": ["provider"],
  8. "properties": {
  9. "provider": {
  10. "type": "object",
  11. "required": ["name", "displayName"],
  12. "properties": {
  13. "name": {
  14. "type": "string",
  15. "pattern": "^[a-z][a-z0-9-]*$",
  16. "description": "Provider name (lowercase, alphanumeric with hyphens)"
  17. },
  18. "displayName": {
  19. "type": "string",
  20. "description": "Human-readable provider name"
  21. },
  22. "v2Package": {
  23. "type": "string",
  24. "description": "Go import path for the v2alpha1 API package (optional if no stores)"
  25. }
  26. }
  27. },
  28. "stores": {
  29. "type": ["array", "null"],
  30. "description": "List of secret store implementations provided by this provider",
  31. "items": {
  32. "type": "object",
  33. "required": ["gvk", "v1Provider", "v1ProviderFunc"],
  34. "properties": {
  35. "gvk": {
  36. "type": "object",
  37. "required": ["group", "version", "kind"],
  38. "properties": {
  39. "group": {
  40. "type": "string",
  41. "description": "API group"
  42. },
  43. "version": {
  44. "type": "string",
  45. "description": "API version"
  46. },
  47. "kind": {
  48. "type": "string",
  49. "description": "Resource kind"
  50. }
  51. }
  52. },
  53. "v1Provider": {
  54. "type": "string",
  55. "description": "Go import path for the v1 provider package"
  56. },
  57. "v1ProviderFunc": {
  58. "type": "string",
  59. "description": "Function name that returns the v1 provider instance"
  60. }
  61. }
  62. }
  63. },
  64. "generators": {
  65. "type": ["array", "null"],
  66. "description": "List of generator implementations provided by this provider",
  67. "items": {
  68. "type": "object",
  69. "required": ["gvk", "v1Generator", "v1GeneratorFunc"],
  70. "properties": {
  71. "gvk": {
  72. "type": "object",
  73. "required": ["group", "version", "kind"],
  74. "properties": {
  75. "group": {
  76. "type": "string",
  77. "description": "API group"
  78. },
  79. "version": {
  80. "type": "string",
  81. "description": "API version"
  82. },
  83. "kind": {
  84. "type": "string",
  85. "description": "Generator kind"
  86. }
  87. }
  88. },
  89. "v1Generator": {
  90. "type": "string",
  91. "description": "Go import path for the v1 generator package"
  92. },
  93. "v1GeneratorFunc": {
  94. "type": "string",
  95. "description": "Function name that returns the v1 generator instance"
  96. }
  97. }
  98. }
  99. },
  100. "configPackage": {
  101. "type": "string",
  102. "description": "Relative import path for the config.go file containing GetSpecMapper function",
  103. "default": "./config"
  104. }
  105. },
  106. "anyOf": [
  107. {
  108. "required": ["stores"]
  109. },
  110. {
  111. "required": ["generators"]
  112. }
  113. ]
  114. }