kuby-kube-db 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/Rakefile +30 -27
  4. data/kuby-kube-db.gemspec +1 -1
  5. data/lib/kuby/kube-db/dsl/api/v1/agent_spec.rb +14 -6
  6. data/lib/kuby/kube-db/dsl/api/v1/azure_spec.rb +8 -2
  7. data/lib/kuby/kube-db/dsl/api/v1/b2_spec.rb +8 -2
  8. data/lib/kuby/kube-db/dsl/api/v1/backend.rb +18 -9
  9. data/lib/kuby/kube-db/dsl/api/v1/gcs_spec.rb +8 -2
  10. data/lib/kuby/kube-db/dsl/api/v1/local_spec.rb +35 -4
  11. data/lib/kuby/kube-db/dsl/api/v1/object_meta.rb +3 -1
  12. data/lib/kuby/kube-db/dsl/api/v1/pod_spec.rb +34 -13
  13. data/lib/kuby/kube-db/dsl/api/v1/pod_template_spec.rb +8 -4
  14. data/lib/kuby/kube-db/dsl/api/v1/prometheus_spec.rb +10 -3
  15. data/lib/kuby/kube-db/dsl/api/v1/rest_server_spec.rb +4 -2
  16. data/lib/kuby/kube-db/dsl/api/v1/s3_spec.rb +8 -2
  17. data/lib/kuby/kube-db/dsl/api/v1/service_port.rb +8 -2
  18. data/lib/kuby/kube-db/dsl/api/v1/service_spec.rb +18 -3
  19. data/lib/kuby/kube-db/dsl/api/v1/service_template_spec.rb +6 -3
  20. data/lib/kuby/kube-db/dsl/api/v1/swift_spec.rb +6 -2
  21. data/lib/kuby/kube-db/dsl/api/v1.rb +1 -1
  22. data/lib/kuby/kube-db/dsl/api.rb +1 -1
  23. data/lib/kuby/kube-db/dsl/appcatalog/v1alpha1/app_reference.rb +7 -1
  24. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request.rb +8 -3
  25. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_condition.rb +9 -1
  26. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_list.rb +6 -2
  27. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_spec.rb +8 -4
  28. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_status.rb +6 -2
  29. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/lease.rb +7 -1
  30. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role.rb +8 -3
  31. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_condition.rb +9 -1
  32. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_list.rb +6 -2
  33. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_spec.rb +13 -3
  34. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_status.rb +6 -1
  35. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role.rb +8 -3
  36. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_condition.rb +9 -1
  37. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_list.rb +6 -2
  38. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_spec.rb +13 -3
  39. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_status.rb +6 -1
  40. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role.rb +8 -3
  41. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_condition.rb +9 -1
  42. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_list.rb +6 -2
  43. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_spec.rb +17 -3
  44. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_status.rb +6 -1
  45. data/lib/kuby/kube-db/dsl/authorization/v1alpha1/role_reference.rb +7 -1
  46. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version.rb +6 -2
  47. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_database.rb +3 -1
  48. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_exporter.rb +3 -1
  49. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_init_container.rb +3 -1
  50. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_list.rb +6 -2
  51. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_pod_security_policy.rb +5 -1
  52. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_spec.rb +12 -3
  53. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_tools.rb +3 -1
  54. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version.rb +6 -2
  55. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_database.rb +3 -1
  56. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_exporter.rb +3 -1
  57. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_list.rb +6 -2
  58. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_spec.rb +9 -2
  59. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_tools.rb +3 -1
  60. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version.rb +6 -2
  61. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_database.rb +3 -1
  62. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_exporter.rb +3 -1
  63. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_list.rb +6 -2
  64. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_pod_security_policy.rb +3 -1
  65. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_spec.rb +9 -2
  66. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version.rb +6 -2
  67. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_database.rb +3 -1
  68. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_exporter.rb +3 -1
  69. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_init_container.rb +3 -1
  70. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_list.rb +6 -2
  71. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_pod_security_policy.rb +5 -1
  72. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_spec.rb +12 -3
  73. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_tools.rb +3 -1
  74. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version.rb +6 -2
  75. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_database.rb +3 -1
  76. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_exporter.rb +3 -1
  77. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_init_container.rb +3 -1
  78. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_list.rb +6 -2
  79. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_pod_security_policy.rb +5 -1
  80. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_spec.rb +12 -3
  81. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_tools.rb +3 -1
  82. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version.rb +6 -2
  83. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_database.rb +3 -1
  84. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_exporter.rb +3 -1
  85. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_list.rb +6 -2
  86. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_pod_security_policy.rb +5 -1
  87. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_spec.rb +11 -3
  88. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_tools.rb +3 -1
  89. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version.rb +6 -2
  90. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_database.rb +3 -1
  91. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_exporter.rb +3 -1
  92. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_list.rb +6 -2
  93. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_pod_security_policy.rb +3 -1
  94. data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_spec.rb +9 -2
  95. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/backup_schedule_spec.rb +25 -10
  96. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database.rb +8 -3
  97. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_list.rb +6 -2
  98. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_spec.rb +5 -2
  99. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_status.rb +11 -1
  100. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch.rb +8 -3
  101. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_cluster_topology.rb +4 -0
  102. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_list.rb +6 -2
  103. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_node.rb +8 -2
  104. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_spec.rb +32 -9
  105. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_status.rb +7 -1
  106. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd.rb +8 -3
  107. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_list.rb +6 -2
  108. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_spec.rb +25 -8
  109. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_status.rb +7 -1
  110. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/init_spec.rb +4 -0
  111. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/leader_election_config.rb +7 -1
  112. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/member_secret.rb +5 -1
  113. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached.rb +8 -3
  114. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_list.rb +6 -2
  115. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_spec.rb +18 -7
  116. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_status.rb +7 -1
  117. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db.rb +8 -3
  118. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_config_node.rb +11 -4
  119. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_list.rb +6 -2
  120. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_mongos_node.rb +11 -4
  121. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_replica_set.rb +5 -2
  122. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_shard_node.rb +13 -4
  123. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_sharding_topology.rb +4 -0
  124. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_spec.rb +28 -8
  125. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_status.rb +7 -1
  126. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql.rb +8 -3
  127. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_cluster_topology.rb +5 -2
  128. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_group_spec.rb +7 -1
  129. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_list.rb +6 -2
  130. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_spec.rb +26 -8
  131. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_status.rb +7 -1
  132. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/origin.rb +3 -0
  133. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/origin_spec.rb +8 -0
  134. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres.rb +8 -3
  135. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_archiver_spec.rb +3 -1
  136. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_list.rb +6 -2
  137. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_spec.rb +34 -10
  138. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_status.rb +7 -1
  139. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_wal_source_spec.rb +20 -8
  140. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/recovery_target.rb +9 -1
  141. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis.rb +8 -3
  142. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_cluster_spec.rb +5 -1
  143. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_list.rb +6 -2
  144. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_spec.rb +26 -9
  145. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_status.rb +7 -1
  146. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/script_source_spec.rb +31 -2
  147. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot.rb +8 -3
  148. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_list.rb +6 -2
  149. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_source_spec.rb +7 -1
  150. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_spec.rb +26 -11
  151. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_status.rb +11 -1
  152. data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/tls_policy.rb +5 -2
  153. data/lib/kuby/kube-db/dsl/meta/v1/initializer.rb +3 -1
  154. data/lib/kuby/kube-db/dsl/meta/v1/initializers.rb +5 -2
  155. data/lib/kuby/kube-db/dsl/v1/volume_source.rb +28 -0
  156. data/lib/kuby/kube-db/dsl.rb +1 -1
  157. data/lib/kuby/kube-db/version.rb +1 -1
  158. metadata +13 -7
@@ -1,16 +1,23 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MemcachedVersionSpec < ::KubeDSL::DSLObject
3
- value_fields :deprecated, :version
3
+ value_field :deprecated
4
4
  object_field(:exporter) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionExporter.new }
5
5
  object_field(:db) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionDatabase.new }
6
+ value_field :version
6
7
  object_field(:pod_security_policies) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionPodSecurityPolicy.new }
7
8
 
9
+ validates :deprecated, field: { format: :boolean }, presence: true
10
+ validates :exporter, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionExporter }
11
+ validates :db, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionDatabase }
12
+ validates :version, field: { format: :string }, presence: false
13
+ validates :pod_security_policies, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MemcachedVersionPodSecurityPolicy }
14
+
8
15
  def serialize
9
16
  {}.tap do |result|
10
17
  result[:deprecated] = deprecated
11
- result[:version] = version
12
18
  result[:exporter] = exporter.serialize
13
19
  result[:db] = db.serialize
20
+ result[:version] = version
14
21
  result[:podSecurityPolicies] = pod_security_policies.serialize
15
22
  end
16
23
  end
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersion < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:spec) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionSpec.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
6
6
 
7
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionSpec }
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
9
13
  result[:kind] = "MongoDBVersion"
10
- result[:apiVersion] = api_version
11
14
  result[:spec] = spec.serialize
15
+ result[:apiVersion] = api_version
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionDatabase < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionExporter < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionInitContainer < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersion.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ListMeta.new }
6
6
 
7
+ validates :items, array: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersion }, presence: false
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ListMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
13
+ result[:items] = items.map(&:serialize)
9
14
  result[:kind] = "MongoDBVersionList"
10
15
  result[:apiVersion] = api_version
11
- result[:items] = items.map(&:serialize)
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,10 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionPodSecurityPolicy < ::KubeDSL::DSLObject
3
- value_fields :snapshotter_policy_name, :database_policy_name
3
+ value_field :snapshotter_policy_name
4
+ value_field :database_policy_name
5
+
6
+ validates :snapshotter_policy_name, field: { format: :string }, presence: false
7
+ validates :database_policy_name, field: { format: :string }, presence: false
4
8
 
5
9
  def serialize
6
10
  {}.tap do |result|
@@ -1,20 +1,29 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionSpec < ::KubeDSL::DSLObject
3
- value_fields :deprecated, :version
4
3
  object_field(:exporter) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionExporter.new }
5
4
  object_field(:pod_security_policies) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionPodSecurityPolicy.new }
6
5
  object_field(:init_container) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionInitContainer.new }
6
+ value_field :deprecated
7
7
  object_field(:db) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionDatabase.new }
8
+ value_field :version
8
9
  object_field(:tools) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionTools.new }
9
10
 
11
+ validates :exporter, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionExporter }
12
+ validates :pod_security_policies, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionPodSecurityPolicy }
13
+ validates :init_container, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionInitContainer }
14
+ validates :deprecated, field: { format: :boolean }, presence: true
15
+ validates :db, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionDatabase }
16
+ validates :version, field: { format: :string }, presence: false
17
+ validates :tools, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MongoDBVersionTools }
18
+
10
19
  def serialize
11
20
  {}.tap do |result|
12
- result[:deprecated] = deprecated
13
- result[:version] = version
14
21
  result[:exporter] = exporter.serialize
15
22
  result[:podSecurityPolicies] = pod_security_policies.serialize
16
23
  result[:initContainer] = init_container.serialize
24
+ result[:deprecated] = deprecated
17
25
  result[:db] = db.serialize
26
+ result[:version] = version
18
27
  result[:tools] = tools.serialize
19
28
  end
20
29
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MongoDBVersionTools < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersion < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:spec) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionSpec.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
6
6
 
7
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionSpec }
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
9
13
  result[:kind] = "MySQLVersion"
10
- result[:apiVersion] = api_version
11
14
  result[:spec] = spec.serialize
15
+ result[:apiVersion] = api_version
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionDatabase < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionExporter < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionInitContainer < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersion.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ListMeta.new }
6
6
 
7
+ validates :items, array: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersion }, presence: false
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ListMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
13
+ result[:items] = items.map(&:serialize)
9
14
  result[:kind] = "MySQLVersionList"
10
15
  result[:apiVersion] = api_version
11
- result[:items] = items.map(&:serialize)
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,10 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionPodSecurityPolicy < ::KubeDSL::DSLObject
3
- value_fields :snapshotter_policy_name, :database_policy_name
3
+ value_field :snapshotter_policy_name
4
+ value_field :database_policy_name
5
+
6
+ validates :snapshotter_policy_name, field: { format: :string }, presence: false
7
+ validates :database_policy_name, field: { format: :string }, presence: false
4
8
 
5
9
  def serialize
6
10
  {}.tap do |result|
@@ -1,20 +1,29 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionSpec < ::KubeDSL::DSLObject
3
- value_fields :deprecated, :version
4
3
  object_field(:exporter) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionExporter.new }
5
4
  object_field(:pod_security_policies) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionPodSecurityPolicy.new }
6
5
  object_field(:init_container) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionInitContainer.new }
6
+ value_field :deprecated
7
7
  object_field(:db) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionDatabase.new }
8
+ value_field :version
8
9
  object_field(:tools) { Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionTools.new }
9
10
 
11
+ validates :exporter, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionExporter }
12
+ validates :pod_security_policies, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionPodSecurityPolicy }
13
+ validates :init_container, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionInitContainer }
14
+ validates :deprecated, field: { format: :boolean }, presence: true
15
+ validates :db, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionDatabase }
16
+ validates :version, field: { format: :string }, presence: false
17
+ validates :tools, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::MySQLVersionTools }
18
+
10
19
  def serialize
11
20
  {}.tap do |result|
12
- result[:deprecated] = deprecated
13
- result[:version] = version
14
21
  result[:exporter] = exporter.serialize
15
22
  result[:podSecurityPolicies] = pod_security_policies.serialize
16
23
  result[:initContainer] = init_container.serialize
24
+ result[:deprecated] = deprecated
17
25
  result[:db] = db.serialize
26
+ result[:version] = version
18
27
  result[:tools] = tools.serialize
19
28
  end
20
29
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class MySQLVersionTools < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersion < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:spec) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionSpec.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
6
6
 
7
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionSpec }
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
9
13
  result[:kind] = "PostgresVersion"
10
- result[:apiVersion] = api_version
11
14
  result[:spec] = spec.serialize
15
+ result[:apiVersion] = api_version
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionDatabase < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionExporter < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersion.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ListMeta.new }
6
6
 
7
+ validates :items, array: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersion }, presence: false
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ListMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
13
+ result[:items] = items.map(&:serialize)
9
14
  result[:kind] = "PostgresVersionList"
10
15
  result[:apiVersion] = api_version
11
- result[:items] = items.map(&:serialize)
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,10 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionPodSecurityPolicy < ::KubeDSL::DSLObject
3
- value_fields :snapshotter_policy_name, :database_policy_name
3
+ value_field :snapshotter_policy_name
4
+ value_field :database_policy_name
5
+
6
+ validates :snapshotter_policy_name, field: { format: :string }, presence: false
7
+ validates :database_policy_name, field: { format: :string }, presence: false
4
8
 
5
9
  def serialize
6
10
  {}.tap do |result|
@@ -1,18 +1,26 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionSpec < ::KubeDSL::DSLObject
3
- value_fields :deprecated, :version
4
3
  object_field(:exporter) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionExporter.new }
5
4
  object_field(:pod_security_policies) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionPodSecurityPolicy.new }
5
+ value_field :deprecated
6
6
  object_field(:db) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionDatabase.new }
7
+ value_field :version
7
8
  object_field(:tools) { Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionTools.new }
8
9
 
10
+ validates :exporter, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionExporter }
11
+ validates :pod_security_policies, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionPodSecurityPolicy }
12
+ validates :deprecated, field: { format: :boolean }, presence: true
13
+ validates :db, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionDatabase }
14
+ validates :version, field: { format: :string }, presence: false
15
+ validates :tools, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::PostgresVersionTools }
16
+
9
17
  def serialize
10
18
  {}.tap do |result|
11
- result[:deprecated] = deprecated
12
- result[:version] = version
13
19
  result[:exporter] = exporter.serialize
14
20
  result[:podSecurityPolicies] = pod_security_policies.serialize
21
+ result[:deprecated] = deprecated
15
22
  result[:db] = db.serialize
23
+ result[:version] = version
16
24
  result[:tools] = tools.serialize
17
25
  end
18
26
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class PostgresVersionTools < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class RedisVersion < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:spec) { Kuby::KubeDB::DSL::Catalog::V1alpha1::RedisVersionSpec.new }
4
+ value_field :api_version
5
5
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
6
6
 
7
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Catalog::V1alpha1::RedisVersionSpec }
8
+ validates :api_version, field: { format: :string }, presence: false
9
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
9
13
  result[:kind] = "RedisVersion"
10
- result[:apiVersion] = api_version
11
14
  result[:spec] = spec.serialize
15
+ result[:apiVersion] = api_version
12
16
  result[:metadata] = metadata.serialize
13
17
  end
14
18
  end
@@ -1,6 +1,8 @@
1
1
  module Kuby::KubeDB::DSL::Catalog::V1alpha1
2
2
  class RedisVersionDatabase < ::KubeDSL::DSLObject
3
- value_fields :image
3
+ value_field :image
4
+
5
+ validates :image, field: { format: :string }, presence: false
4
6
 
5
7
  def serialize
6
8
  {}.tap do |result|