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,6 +1,12 @@
1
- module Kuby::KubeDB::DSL::Api::V1
1
+ module Kuby::KubeDB::DSL::API::V1
2
2
  class ServicePort < ::KubeDSL::DSLObject
3
- value_fields :port, :name, :node_port
3
+ value_field :port
4
+ value_field :name
5
+ value_field :node_port
6
+
7
+ validates :port, field: { format: :integer }, presence: true
8
+ validates :name, field: { format: :string }, presence: false
9
+ validates :node_port, field: { format: :integer }, presence: true
4
10
 
5
11
  def serialize
6
12
  {}.tap do |result|
@@ -1,7 +1,22 @@
1
- module Kuby::KubeDB::DSL::Api::V1
1
+ module Kuby::KubeDB::DSL::API::V1
2
2
  class ServiceSpec < ::KubeDSL::DSLObject
3
- value_fields :load_balancer_ip, :external_i_ps, :type, :external_traffic_policy, :cluster_ip, :load_balancer_source_ranges, :health_check_node_port
4
- array_field(:port) { Kuby::KubeDB::DSL::Api::V1::ServicePort.new }
3
+ value_field :load_balancer_ip
4
+ value_field :external_i_ps
5
+ value_field :type
6
+ value_field :external_traffic_policy
7
+ value_field :cluster_ip
8
+ value_field :load_balancer_source_ranges
9
+ value_field :health_check_node_port
10
+ array_field(:port) { Kuby::KubeDB::DSL::API::V1::ServicePort.new }
11
+
12
+ validates :load_balancer_ip, field: { format: :string }, presence: false
13
+ validates :external_i_ps, field: { format: :string }, presence: false
14
+ validates :type, field: { format: :string }, presence: false
15
+ validates :external_traffic_policy, field: { format: :string }, presence: false
16
+ validates :cluster_ip, field: { format: :string }, presence: false
17
+ validates :load_balancer_source_ranges, field: { format: :string }, presence: false
18
+ validates :health_check_node_port, field: { format: :integer }, presence: true
19
+ validates :ports, array: { kind_of: Kuby::KubeDB::DSL::API::V1::ServicePort }, presence: false
5
20
 
6
21
  def serialize
7
22
  {}.tap do |result|
@@ -1,7 +1,10 @@
1
- module Kuby::KubeDB::DSL::Api::V1
1
+ module Kuby::KubeDB::DSL::API::V1
2
2
  class ServiceTemplateSpec < ::KubeDSL::DSLObject
3
- object_field(:spec) { Kuby::KubeDB::DSL::Api::V1::ServiceSpec.new }
4
- object_field(:metadata) { Kuby::KubeDB::DSL::Api::V1::ObjectMeta.new }
3
+ object_field(:spec) { Kuby::KubeDB::DSL::API::V1::ServiceSpec.new }
4
+ object_field(:metadata) { Kuby::KubeDB::DSL::API::V1::ObjectMeta.new }
5
+
6
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::API::V1::ServiceSpec }
7
+ validates :metadata, object: { kind_of: Kuby::KubeDB::DSL::API::V1::ObjectMeta }
5
8
 
6
9
  def serialize
7
10
  {}.tap do |result|
@@ -1,6 +1,10 @@
1
- module Kuby::KubeDB::DSL::Api::V1
1
+ module Kuby::KubeDB::DSL::API::V1
2
2
  class SwiftSpec < ::KubeDSL::DSLObject
3
- value_fields :prefix, :container
3
+ value_field :prefix
4
+ value_field :container
5
+
6
+ validates :prefix, field: { format: :string }, presence: false
7
+ validates :container, field: { format: :string }, presence: false
4
8
 
5
9
  def serialize
6
10
  {}.tap do |result|
@@ -1,4 +1,4 @@
1
- module Kuby::KubeDB::DSL::Api::V1
1
+ module Kuby::KubeDB::DSL::API::V1
2
2
  autoload :RestServerSpec, 'kuby/kube-db/dsl/api/v1/rest_server_spec'
3
3
  autoload :ServicePort, 'kuby/kube-db/dsl/api/v1/service_port'
4
4
  autoload :LocalSpec, 'kuby/kube-db/dsl/api/v1/local_spec'
@@ -1,3 +1,3 @@
1
- module Kuby::KubeDB::DSL::Api
1
+ module Kuby::KubeDB::DSL::API
2
2
  autoload :V1, 'kuby/kube-db/dsl/api/v1'
3
3
  end
@@ -1,6 +1,12 @@
1
1
  module Kuby::KubeDB::DSL::Appcatalog::V1alpha1
2
2
  class AppReference < ::KubeDSL::DSLObject
3
- value_fields :namespace, :name, :parameters
3
+ value_field :namespace
4
+ value_field :name
5
+ value_field :parameters
6
+
7
+ validates :namespace, field: { format: :string }, presence: false
8
+ validates :name, field: { format: :string }, presence: false
9
+ validates :parameters, field: { format: :string }, presence: false
4
10
 
5
11
  def serialize
6
12
  {}.tap do |result|
@@ -1,16 +1,21 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class DatabaseAccessRequest < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:status) { Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestStatus.new }
5
4
  object_field(:spec) { Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestSpec.new }
5
+ value_field :api_version
6
6
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
7
7
 
8
+ validates :status, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestStatus }
9
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestSpec }
10
+ validates :api_version, field: { format: :string }, presence: false
11
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
12
+
8
13
  def serialize
9
14
  {}.tap do |result|
10
- result[:kind] = "DatabaseAccessRequest"
11
- result[:apiVersion] = api_version
12
15
  result[:status] = status.serialize
16
+ result[:kind] = "DatabaseAccessRequest"
13
17
  result[:spec] = spec.serialize
18
+ result[:apiVersion] = api_version
14
19
  result[:metadata] = metadata.serialize
15
20
  end
16
21
  end
@@ -1,6 +1,14 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class DatabaseAccessRequestCondition < ::KubeDSL::DSLObject
3
- value_fields :message, :type, :reason, :last_update_time
3
+ value_field :message
4
+ value_field :type
5
+ value_field :reason
6
+ value_field :last_update_time
7
+
8
+ validates :message, field: { format: :string }, presence: false
9
+ validates :type, field: { format: :string }, presence: false
10
+ validates :reason, field: { format: :string }, presence: false
11
+ validates :last_update_time, field: { format: :string }, presence: false
4
12
 
5
13
  def serialize
6
14
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class DatabaseAccessRequestList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequest.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::Authorization::V1alpha1::DatabaseAccessRequest }, 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] = "DatabaseAccessRequestList"
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,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class DatabaseAccessRequestSpec < ::KubeDSL::DSLObject
3
- value_fields :ttl
4
- array_field(:subject) { KubeDSL::DSL::Rbac::V1::Subject.new }
5
3
  object_field(:role_ref) { Kuby::KubeDB::DSL::Authorization::V1alpha1::RoleReference.new }
4
+ array_field(:subject) { KubeDSL::DSL::Rbac::V1::Subject.new }
5
+ value_field :ttl
6
+
7
+ validates :role_ref, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::RoleReference }
8
+ validates :subjects, array: { kind_of: KubeDSL::DSL::Rbac::V1::Subject }, presence: false
9
+ validates :ttl, field: { format: :string }, presence: false
6
10
 
7
11
  def serialize
8
12
  {}.tap do |result|
9
- result[:ttl] = ttl
10
- result[:subjects] = subjects.map(&:serialize)
11
13
  result[:roleRef] = role_ref.serialize
14
+ result[:subjects] = subjects.map(&:serialize)
15
+ result[:ttl] = ttl
12
16
  end
13
17
  end
14
18
 
@@ -1,13 +1,17 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class DatabaseAccessRequestStatus < ::KubeDSL::DSLObject
3
- array_field(:condition) { Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestCondition.new }
4
3
  object_field(:secret) { KubeDSL::DSL::V1::LocalObjectReference.new }
4
+ array_field(:condition) { Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestCondition.new }
5
5
  object_field(:lease) { Kuby::KubeDB::DSL::Authorization::V1alpha1::Lease.new }
6
6
 
7
+ validates :secret, object: { kind_of: KubeDSL::DSL::V1::LocalObjectReference }
8
+ validates :conditions, array: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::DatabaseAccessRequestCondition }, presence: false
9
+ validates :lease, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::Lease }
10
+
7
11
  def serialize
8
12
  {}.tap do |result|
9
- result[:conditions] = conditions.map(&:serialize)
10
13
  result[:secret] = secret.serialize
14
+ result[:conditions] = conditions.map(&:serialize)
11
15
  result[:lease] = lease.serialize
12
16
  end
13
17
  end
@@ -1,6 +1,12 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class Lease < ::KubeDSL::DSLObject
3
- value_fields :duration, :id, :renewable
3
+ value_field :duration
4
+ value_field :id
5
+ value_field :renewable
6
+
7
+ validates :duration, field: { format: :string }, presence: false
8
+ validates :id, field: { format: :string }, presence: false
9
+ validates :renewable, field: { format: :boolean }, presence: true
4
10
 
5
11
  def serialize
6
12
  {}.tap do |result|
@@ -1,16 +1,21 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MongoDBRole < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:status) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleStatus.new }
5
4
  object_field(:spec) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleSpec.new }
5
+ value_field :api_version
6
6
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
7
7
 
8
+ validates :status, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleStatus }
9
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleSpec }
10
+ validates :api_version, field: { format: :string }, presence: false
11
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
12
+
8
13
  def serialize
9
14
  {}.tap do |result|
10
- result[:kind] = "MongoDBRole"
11
- result[:apiVersion] = api_version
12
15
  result[:status] = status.serialize
16
+ result[:kind] = "MongoDBRole"
13
17
  result[:spec] = spec.serialize
18
+ result[:apiVersion] = api_version
14
19
  result[:metadata] = metadata.serialize
15
20
  end
16
21
  end
@@ -1,6 +1,14 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MongoDBRoleCondition < ::KubeDSL::DSLObject
3
- value_fields :status, :message, :type, :reason
3
+ value_field :status
4
+ value_field :message
5
+ value_field :type
6
+ value_field :reason
7
+
8
+ validates :status, field: { format: :string }, presence: false
9
+ validates :message, field: { format: :string }, presence: false
10
+ validates :type, field: { format: :string }, presence: false
11
+ validates :reason, field: { format: :string }, presence: false
4
12
 
5
13
  def serialize
6
14
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MongoDBRoleList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRole.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::Authorization::V1alpha1::MongoDBRole }, 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] = "MongoDBRoleList"
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,17 +1,27 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MongoDBRoleSpec < ::KubeDSL::DSLObject
3
- value_fields :revocation_statements, :creation_statements, :max_ttl, :default_ttl
4
3
  object_field(:auth_manager_ref) { Kuby::KubeDB::DSL::Appcatalog::V1alpha1::AppReference.new }
5
4
  object_field(:database_ref) { KubeDSL::DSL::V1::LocalObjectReference.new }
5
+ value_field :revocation_statements
6
+ value_field :creation_statements
7
+ value_field :max_ttl
8
+ value_field :default_ttl
9
+
10
+ validates :auth_manager_ref, object: { kind_of: Kuby::KubeDB::DSL::Appcatalog::V1alpha1::AppReference }
11
+ validates :database_ref, object: { kind_of: KubeDSL::DSL::V1::LocalObjectReference }
12
+ validates :revocation_statements, field: { format: :string }, presence: false
13
+ validates :creation_statements, field: { format: :string }, presence: false
14
+ validates :max_ttl, field: { format: :string }, presence: false
15
+ validates :default_ttl, field: { format: :string }, presence: false
6
16
 
7
17
  def serialize
8
18
  {}.tap do |result|
19
+ result[:authManagerRef] = auth_manager_ref.serialize
20
+ result[:databaseRef] = database_ref.serialize
9
21
  result[:revocationStatements] = revocation_statements
10
22
  result[:creationStatements] = creation_statements
11
23
  result[:maxTTL] = max_ttl
12
24
  result[:defaultTTL] = default_ttl
13
- result[:authManagerRef] = auth_manager_ref.serialize
14
- result[:databaseRef] = database_ref.serialize
15
25
  end
16
26
  end
17
27
 
@@ -1,8 +1,13 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MongoDBRoleStatus < ::KubeDSL::DSLObject
3
- value_fields :observed_generation, :phase
3
+ value_field :observed_generation
4
+ value_field :phase
4
5
  array_field(:condition) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleCondition.new }
5
6
 
7
+ validates :observed_generation, field: { format: :string }, presence: false
8
+ validates :phase, field: { format: :string }, presence: false
9
+ validates :conditions, array: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MongoDBRoleCondition }, presence: false
10
+
6
11
  def serialize
7
12
  {}.tap do |result|
8
13
  result[:observedGeneration] = observed_generation
@@ -1,16 +1,21 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MySQLRole < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  object_field(:status) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleStatus.new }
5
4
  object_field(:spec) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleSpec.new }
5
+ value_field :api_version
6
6
  object_field(:metadata) { KubeDSL::DSL::Meta::V1::ObjectMeta.new }
7
7
 
8
+ validates :status, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleStatus }
9
+ validates :spec, object: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleSpec }
10
+ validates :api_version, field: { format: :string }, presence: false
11
+ validates :metadata, object: { kind_of: KubeDSL::DSL::Meta::V1::ObjectMeta }
12
+
8
13
  def serialize
9
14
  {}.tap do |result|
10
- result[:kind] = "MySQLRole"
11
- result[:apiVersion] = api_version
12
15
  result[:status] = status.serialize
16
+ result[:kind] = "MySQLRole"
13
17
  result[:spec] = spec.serialize
18
+ result[:apiVersion] = api_version
14
19
  result[:metadata] = metadata.serialize
15
20
  end
16
21
  end
@@ -1,6 +1,14 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MySQLRoleCondition < ::KubeDSL::DSLObject
3
- value_fields :status, :message, :type, :reason
3
+ value_field :status
4
+ value_field :message
5
+ value_field :type
6
+ value_field :reason
7
+
8
+ validates :status, field: { format: :string }, presence: false
9
+ validates :message, field: { format: :string }, presence: false
10
+ validates :type, field: { format: :string }, presence: false
11
+ validates :reason, field: { format: :string }, presence: false
4
12
 
5
13
  def serialize
6
14
  {}.tap do |result|
@@ -1,14 +1,18 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MySQLRoleList < ::KubeDSL::DSLObject
3
- value_fields :api_version
4
3
  array_field(:item) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRole.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::Authorization::V1alpha1::MySQLRole }, 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] = "MySQLRoleList"
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,17 +1,27 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MySQLRoleSpec < ::KubeDSL::DSLObject
3
- value_fields :revocation_statements, :creation_statements, :max_ttl, :default_ttl
4
3
  object_field(:auth_manager_ref) { Kuby::KubeDB::DSL::Appcatalog::V1alpha1::AppReference.new }
5
4
  object_field(:database_ref) { KubeDSL::DSL::V1::LocalObjectReference.new }
5
+ value_field :revocation_statements
6
+ value_field :creation_statements
7
+ value_field :max_ttl
8
+ value_field :default_ttl
9
+
10
+ validates :auth_manager_ref, object: { kind_of: Kuby::KubeDB::DSL::Appcatalog::V1alpha1::AppReference }
11
+ validates :database_ref, object: { kind_of: KubeDSL::DSL::V1::LocalObjectReference }
12
+ validates :revocation_statements, field: { format: :string }, presence: false
13
+ validates :creation_statements, field: { format: :string }, presence: false
14
+ validates :max_ttl, field: { format: :string }, presence: false
15
+ validates :default_ttl, field: { format: :string }, presence: false
6
16
 
7
17
  def serialize
8
18
  {}.tap do |result|
19
+ result[:authManagerRef] = auth_manager_ref.serialize
20
+ result[:databaseRef] = database_ref.serialize
9
21
  result[:revocationStatements] = revocation_statements
10
22
  result[:creationStatements] = creation_statements
11
23
  result[:maxTTL] = max_ttl
12
24
  result[:defaultTTL] = default_ttl
13
- result[:authManagerRef] = auth_manager_ref.serialize
14
- result[:databaseRef] = database_ref.serialize
15
25
  end
16
26
  end
17
27
 
@@ -1,8 +1,13 @@
1
1
  module Kuby::KubeDB::DSL::Authorization::V1alpha1
2
2
  class MySQLRoleStatus < ::KubeDSL::DSLObject
3
- value_fields :observed_generation, :phase
3
+ value_field :observed_generation
4
+ value_field :phase
4
5
  array_field(:condition) { Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleCondition.new }
5
6
 
7
+ validates :observed_generation, field: { format: :string }, presence: false
8
+ validates :phase, field: { format: :string }, presence: false
9
+ validates :conditions, array: { kind_of: Kuby::KubeDB::DSL::Authorization::V1alpha1::MySQLRoleCondition }, presence: false
10
+
6
11
  def serialize
7
12
  {}.tap do |result|
8
13
  result[:observedGeneration] = observed_generation