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.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Rakefile +30 -27
- data/kuby-kube-db.gemspec +1 -1
- data/lib/kuby/kube-db/dsl/api/v1/agent_spec.rb +14 -6
- data/lib/kuby/kube-db/dsl/api/v1/azure_spec.rb +8 -2
- data/lib/kuby/kube-db/dsl/api/v1/b2_spec.rb +8 -2
- data/lib/kuby/kube-db/dsl/api/v1/backend.rb +18 -9
- data/lib/kuby/kube-db/dsl/api/v1/gcs_spec.rb +8 -2
- data/lib/kuby/kube-db/dsl/api/v1/local_spec.rb +35 -4
- data/lib/kuby/kube-db/dsl/api/v1/object_meta.rb +3 -1
- data/lib/kuby/kube-db/dsl/api/v1/pod_spec.rb +34 -13
- data/lib/kuby/kube-db/dsl/api/v1/pod_template_spec.rb +8 -4
- data/lib/kuby/kube-db/dsl/api/v1/prometheus_spec.rb +10 -3
- data/lib/kuby/kube-db/dsl/api/v1/rest_server_spec.rb +4 -2
- data/lib/kuby/kube-db/dsl/api/v1/s3_spec.rb +8 -2
- data/lib/kuby/kube-db/dsl/api/v1/service_port.rb +8 -2
- data/lib/kuby/kube-db/dsl/api/v1/service_spec.rb +18 -3
- data/lib/kuby/kube-db/dsl/api/v1/service_template_spec.rb +6 -3
- data/lib/kuby/kube-db/dsl/api/v1/swift_spec.rb +6 -2
- data/lib/kuby/kube-db/dsl/api/v1.rb +1 -1
- data/lib/kuby/kube-db/dsl/api.rb +1 -1
- data/lib/kuby/kube-db/dsl/appcatalog/v1alpha1/app_reference.rb +7 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request.rb +8 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_condition.rb +9 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_spec.rb +8 -4
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/database_access_request_status.rb +6 -2
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/lease.rb +7 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role.rb +8 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_condition.rb +9 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_spec.rb +13 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/mongo_db_role_status.rb +6 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role.rb +8 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_condition.rb +9 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_spec.rb +13 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/my_sql_role_status.rb +6 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role.rb +8 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_condition.rb +9 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_spec.rb +17 -3
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/postgres_role_status.rb +6 -1
- data/lib/kuby/kube-db/dsl/authorization/v1alpha1/role_reference.rb +7 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_init_container.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_pod_security_policy.rb +5 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_spec.rb +12 -3
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/elasticsearch_version_tools.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_spec.rb +9 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/etcd_version_tools.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_pod_security_policy.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/memcached_version_spec.rb +9 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_init_container.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_pod_security_policy.rb +5 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_spec.rb +12 -3
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/mongo_db_version_tools.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_init_container.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_pod_security_policy.rb +5 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_spec.rb +12 -3
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/my_sql_version_tools.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_pod_security_policy.rb +5 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_spec.rb +11 -3
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/postgres_version_tools.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_database.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_exporter.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_pod_security_policy.rb +3 -1
- data/lib/kuby/kube-db/dsl/catalog/v1alpha1/redis_version_spec.rb +9 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/backup_schedule_spec.rb +25 -10
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_spec.rb +5 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/dormant_database_status.rb +11 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_cluster_topology.rb +4 -0
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_node.rb +8 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_spec.rb +32 -9
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/elasticsearch_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_spec.rb +25 -8
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/etcd_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/init_spec.rb +4 -0
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/leader_election_config.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/member_secret.rb +5 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_spec.rb +18 -7
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/memcached_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_config_node.rb +11 -4
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_mongos_node.rb +11 -4
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_replica_set.rb +5 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_shard_node.rb +13 -4
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_sharding_topology.rb +4 -0
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_spec.rb +28 -8
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/mongo_db_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_cluster_topology.rb +5 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_group_spec.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_spec.rb +26 -8
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/my_sql_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/origin.rb +3 -0
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/origin_spec.rb +8 -0
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_archiver_spec.rb +3 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_spec.rb +34 -10
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/postgres_wal_source_spec.rb +20 -8
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/recovery_target.rb +9 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_cluster_spec.rb +5 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_spec.rb +26 -9
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/redis_status.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/script_source_spec.rb +31 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot.rb +8 -3
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_list.rb +6 -2
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_source_spec.rb +7 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_spec.rb +26 -11
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/snapshot_status.rb +11 -1
- data/lib/kuby/kube-db/dsl/kubedb/v1alpha1/tls_policy.rb +5 -2
- data/lib/kuby/kube-db/dsl/meta/v1/initializer.rb +3 -1
- data/lib/kuby/kube-db/dsl/meta/v1/initializers.rb +5 -2
- data/lib/kuby/kube-db/dsl/v1/volume_source.rb +28 -0
- data/lib/kuby/kube-db/dsl.rb +1 -1
- data/lib/kuby/kube-db/version.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88f4064bfcf1ceadddb775ea1a034d41b040a2f5c4d4d9dd3518a0b57415f57
|
4
|
+
data.tar.gz: 1e70d0336d2633a990106f9d5ad2bf1d6e06f9848a53fdc733bc7ce43a679884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42eca32665fbec97156fcb5a0202d890b6eb0ece57200537162c6e0166543773088d92856a79a25defb8fa79fc139efe323f7d3442654c6a99889dbaacbbe49c
|
7
|
+
data.tar.gz: b656f1fe9cd386b91ae8f87e913917bf9c903a8123dc26ef126d86d39b5bc9747797c94afc9aabff305fb4b681a1c0bf4a78a52fa34a1437812710842ff6f2a8
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -40,35 +40,38 @@ task :generate do
|
|
40
40
|
END
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
generator = KubeDSL::Generator.new(
|
44
|
+
schema_dir: local_json_schema_path,
|
45
|
+
output_dir: File.join('lib'),
|
46
|
+
autoload_prefix: File.join('kuby', 'kube-db', 'dsl'),
|
47
|
+
dsl_namespace: ['Kuby', 'KubeDB', 'DSL'],
|
48
|
+
entrypoint_namespace: ['Kuby', 'KubeDB'],
|
49
|
+
inflector: Dry::Inflector.new do |inflections|
|
50
|
+
inflections.acronym('DSL')
|
51
|
+
inflections.acronym('DB')
|
52
|
+
end
|
53
|
+
)
|
52
54
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
# WTF even is xyz.kmodules??
|
56
|
+
generator.builder.register_resolver('io.k8s', 'xyz.kmodules') do |ref_str, builder|
|
57
|
+
external_ref = ::KubeDSL::ExternalRef.new(
|
58
|
+
ref_str,
|
59
|
+
['KubeDSL', 'DSL'],
|
60
|
+
builder.inflector,
|
61
|
+
builder.schema_dir,
|
62
|
+
builder.autoload_prefix
|
63
|
+
)
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
65
|
+
ns = external_ref.ruby_namespace + [external_ref.kind]
|
66
|
+
exists = ns.inject(Object) { |mod, n| mod.const_get(n, false) } rescue false
|
67
|
+
exists ? external_ref : builder.parse_ref(ref_str)
|
68
|
+
end
|
67
69
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
end
|
70
|
+
generator.generate_resource_files
|
71
|
+
generator.generate_autoload_files
|
72
|
+
generator.generate_entrypoint_file do |resource, ns|
|
73
|
+
ns =~ /Kuby::KubeDB::DSL::Kubedb::V1alpha1/
|
73
74
|
end
|
75
|
+
|
76
|
+
FileUtils.rm_rf(File.join('lib', 'kuby.rb'))
|
74
77
|
end
|
data/kuby-kube-db.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_dependency 'helm-cli', '~> 0.3'
|
16
16
|
s.add_dependency 'helm-rb', '~> 0.2'
|
17
|
-
s.add_dependency 'kube-dsl', '
|
17
|
+
s.add_dependency 'kube-dsl', '>= 0.6.1', '< 1.0'
|
18
18
|
|
19
19
|
s.require_path = 'lib'
|
20
20
|
s.files = Dir['{lib,spec}/**/*', 'Gemfile', 'LICENSE', 'CHANGELOG.md', 'README.md', 'Rakefile', 'kuby-kube-db.gemspec']
|
@@ -1,18 +1,26 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class AgentSpec < ::KubeDSL::DSLObject
|
3
|
-
value_fields :args, :agent
|
4
|
-
array_field(:env) { KubeDSL::DSL::V1::EnvVar.new }
|
5
3
|
object_field(:security_context) { KubeDSL::DSL::V1::SecurityContext.new }
|
6
|
-
|
4
|
+
value_field :args
|
5
|
+
value_field :agent
|
6
|
+
object_field(:prometheus) { Kuby::KubeDB::DSL::API::V1::PrometheusSpec.new }
|
7
|
+
array_field(:env) { KubeDSL::DSL::V1::EnvVar.new }
|
7
8
|
object_field(:resources) { KubeDSL::DSL::V1::ResourceRequirements.new }
|
8
9
|
|
10
|
+
validates :security_context, object: { kind_of: KubeDSL::DSL::V1::SecurityContext }
|
11
|
+
validates :args, field: { format: :string }, presence: false
|
12
|
+
validates :agent, field: { format: :string }, presence: false
|
13
|
+
validates :prometheus, object: { kind_of: Kuby::KubeDB::DSL::API::V1::PrometheusSpec }
|
14
|
+
validates :envs, array: { kind_of: KubeDSL::DSL::V1::EnvVar }, presence: false
|
15
|
+
validates :resources, object: { kind_of: KubeDSL::DSL::V1::ResourceRequirements }
|
16
|
+
|
9
17
|
def serialize
|
10
18
|
{}.tap do |result|
|
19
|
+
result[:securityContext] = security_context.serialize
|
11
20
|
result[:args] = args
|
12
21
|
result[:agent] = agent
|
13
|
-
result[:env] = envs.map(&:serialize)
|
14
|
-
result[:securityContext] = security_context.serialize
|
15
22
|
result[:prometheus] = prometheus.serialize
|
23
|
+
result[:env] = envs.map(&:serialize)
|
16
24
|
result[:resources] = resources.serialize
|
17
25
|
end
|
18
26
|
end
|
@@ -1,6 +1,12 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class AzureSpec < ::KubeDSL::DSLObject
|
3
|
-
|
3
|
+
value_field :prefix
|
4
|
+
value_field :container
|
5
|
+
value_field :max_connections
|
6
|
+
|
7
|
+
validates :prefix, field: { format: :string }, presence: false
|
8
|
+
validates :container, field: { format: :string }, presence: false
|
9
|
+
validates :max_connections, field: { format: :integer }, presence: true
|
4
10
|
|
5
11
|
def serialize
|
6
12
|
{}.tap do |result|
|
@@ -1,6 +1,12 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class B2Spec < ::KubeDSL::DSLObject
|
3
|
-
|
3
|
+
value_field :prefix
|
4
|
+
value_field :bucket
|
5
|
+
value_field :max_connections
|
6
|
+
|
7
|
+
validates :prefix, field: { format: :string }, presence: false
|
8
|
+
validates :bucket, field: { format: :string }, presence: false
|
9
|
+
validates :max_connections, field: { format: :integer }, presence: true
|
4
10
|
|
5
11
|
def serialize
|
6
12
|
{}.tap do |result|
|
@@ -1,13 +1,22 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class Backend < ::KubeDSL::DSLObject
|
3
|
-
|
4
|
-
object_field(:s3) { Kuby::KubeDB::DSL::
|
5
|
-
object_field(:swift) { Kuby::KubeDB::DSL::
|
6
|
-
object_field(:rest) { Kuby::KubeDB::DSL::
|
7
|
-
object_field(:gcs) { Kuby::KubeDB::DSL::
|
8
|
-
object_field(:b2) { Kuby::KubeDB::DSL::
|
9
|
-
object_field(:azure) { Kuby::KubeDB::DSL::
|
10
|
-
object_field(:local) { Kuby::KubeDB::DSL::
|
3
|
+
value_field :storage_secret_name
|
4
|
+
object_field(:s3) { Kuby::KubeDB::DSL::API::V1::S3Spec.new }
|
5
|
+
object_field(:swift) { Kuby::KubeDB::DSL::API::V1::SwiftSpec.new }
|
6
|
+
object_field(:rest) { Kuby::KubeDB::DSL::API::V1::RestServerSpec.new }
|
7
|
+
object_field(:gcs) { Kuby::KubeDB::DSL::API::V1::GCSSpec.new }
|
8
|
+
object_field(:b2) { Kuby::KubeDB::DSL::API::V1::B2Spec.new }
|
9
|
+
object_field(:azure) { Kuby::KubeDB::DSL::API::V1::AzureSpec.new }
|
10
|
+
object_field(:local) { Kuby::KubeDB::DSL::API::V1::LocalSpec.new }
|
11
|
+
|
12
|
+
validates :storage_secret_name, field: { format: :string }, presence: false
|
13
|
+
validates :s3, object: { kind_of: Kuby::KubeDB::DSL::API::V1::S3Spec }
|
14
|
+
validates :swift, object: { kind_of: Kuby::KubeDB::DSL::API::V1::SwiftSpec }
|
15
|
+
validates :rest, object: { kind_of: Kuby::KubeDB::DSL::API::V1::RestServerSpec }
|
16
|
+
validates :gcs, object: { kind_of: Kuby::KubeDB::DSL::API::V1::GCSSpec }
|
17
|
+
validates :b2, object: { kind_of: Kuby::KubeDB::DSL::API::V1::B2Spec }
|
18
|
+
validates :azure, object: { kind_of: Kuby::KubeDB::DSL::API::V1::AzureSpec }
|
19
|
+
validates :local, object: { kind_of: Kuby::KubeDB::DSL::API::V1::LocalSpec }
|
11
20
|
|
12
21
|
def serialize
|
13
22
|
{}.tap do |result|
|
@@ -1,6 +1,12 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class GCSSpec < ::KubeDSL::DSLObject
|
3
|
-
|
3
|
+
value_field :prefix
|
4
|
+
value_field :bucket
|
5
|
+
value_field :max_connections
|
6
|
+
|
7
|
+
validates :prefix, field: { format: :string }, presence: false
|
8
|
+
validates :bucket, field: { format: :string }, presence: false
|
9
|
+
validates :max_connections, field: { format: :integer }, presence: true
|
4
10
|
|
5
11
|
def serialize
|
6
12
|
{}.tap do |result|
|
@@ -1,6 +1,5 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class LocalSpec < ::KubeDSL::DSLObject
|
3
|
-
value_fields :sub_path, :mount_path
|
4
3
|
object_field(:portworx_volume) { KubeDSL::DSL::V1::PortworxVolumeSource.new }
|
5
4
|
object_field(:glusterfs) { KubeDSL::DSL::V1::GlusterfsVolumeSource.new }
|
6
5
|
object_field(:git_repo) { KubeDSL::DSL::V1::GitRepoVolumeSource.new }
|
@@ -12,12 +11,14 @@ module Kuby::KubeDB::DSL::Api::V1
|
|
12
11
|
object_field(:scale_io) { KubeDSL::DSL::V1::ScaleIOVolumeSource.new }
|
13
12
|
object_field(:photon_persistent_disk) { KubeDSL::DSL::V1::PhotonPersistentDiskVolumeSource.new }
|
14
13
|
object_field(:azure_disk) { KubeDSL::DSL::V1::AzureDiskVolumeSource.new }
|
14
|
+
value_field :sub_path
|
15
15
|
object_field(:fc) { KubeDSL::DSL::V1::FCVolumeSource.new }
|
16
16
|
object_field(:flex_volume) { KubeDSL::DSL::V1::FlexVolumeSource.new }
|
17
17
|
object_field(:empty_dir) { KubeDSL::DSL::V1::EmptyDirVolumeSource.new }
|
18
18
|
object_field(:rbd) { KubeDSL::DSL::V1::RBDVolumeSource.new }
|
19
19
|
object_field(:persistent_volume_claim) { KubeDSL::DSL::V1::PersistentVolumeClaimVolumeSource.new }
|
20
20
|
object_field(:config_map) { KubeDSL::DSL::V1::ConfigMapVolumeSource.new }
|
21
|
+
value_field :mount_path
|
21
22
|
object_field(:azure_file) { KubeDSL::DSL::V1::AzureFileVolumeSource.new }
|
22
23
|
object_field(:quobyte) { KubeDSL::DSL::V1::QuobyteVolumeSource.new }
|
23
24
|
object_field(:host_path) { KubeDSL::DSL::V1::HostPathVolumeSource.new }
|
@@ -29,10 +30,38 @@ module Kuby::KubeDB::DSL::Api::V1
|
|
29
30
|
object_field(:downward_api) { KubeDSL::DSL::V1::DownwardAPIVolumeSource.new }
|
30
31
|
object_field(:gce_persistent_disk) { KubeDSL::DSL::V1::GCEPersistentDiskVolumeSource.new }
|
31
32
|
|
33
|
+
validates :portworx_volume, object: { kind_of: KubeDSL::DSL::V1::PortworxVolumeSource }
|
34
|
+
validates :glusterfs, object: { kind_of: KubeDSL::DSL::V1::GlusterfsVolumeSource }
|
35
|
+
validates :git_repo, object: { kind_of: KubeDSL::DSL::V1::GitRepoVolumeSource }
|
36
|
+
validates :flocker, object: { kind_of: KubeDSL::DSL::V1::FlockerVolumeSource }
|
37
|
+
validates :storageos, object: { kind_of: KubeDSL::DSL::V1::StorageOSVolumeSource }
|
38
|
+
validates :iscsi, object: { kind_of: KubeDSL::DSL::V1::ISCSIVolumeSource }
|
39
|
+
validates :projected, object: { kind_of: KubeDSL::DSL::V1::ProjectedVolumeSource }
|
40
|
+
validates :secret, object: { kind_of: KubeDSL::DSL::V1::SecretVolumeSource }
|
41
|
+
validates :scale_io, object: { kind_of: KubeDSL::DSL::V1::ScaleIOVolumeSource }
|
42
|
+
validates :photon_persistent_disk, object: { kind_of: KubeDSL::DSL::V1::PhotonPersistentDiskVolumeSource }
|
43
|
+
validates :azure_disk, object: { kind_of: KubeDSL::DSL::V1::AzureDiskVolumeSource }
|
44
|
+
validates :sub_path, field: { format: :string }, presence: false
|
45
|
+
validates :fc, object: { kind_of: KubeDSL::DSL::V1::FCVolumeSource }
|
46
|
+
validates :flex_volume, object: { kind_of: KubeDSL::DSL::V1::FlexVolumeSource }
|
47
|
+
validates :empty_dir, object: { kind_of: KubeDSL::DSL::V1::EmptyDirVolumeSource }
|
48
|
+
validates :rbd, object: { kind_of: KubeDSL::DSL::V1::RBDVolumeSource }
|
49
|
+
validates :persistent_volume_claim, object: { kind_of: KubeDSL::DSL::V1::PersistentVolumeClaimVolumeSource }
|
50
|
+
validates :config_map, object: { kind_of: KubeDSL::DSL::V1::ConfigMapVolumeSource }
|
51
|
+
validates :mount_path, field: { format: :string }, presence: false
|
52
|
+
validates :azure_file, object: { kind_of: KubeDSL::DSL::V1::AzureFileVolumeSource }
|
53
|
+
validates :quobyte, object: { kind_of: KubeDSL::DSL::V1::QuobyteVolumeSource }
|
54
|
+
validates :host_path, object: { kind_of: KubeDSL::DSL::V1::HostPathVolumeSource }
|
55
|
+
validates :nfs, object: { kind_of: KubeDSL::DSL::V1::NFSVolumeSource }
|
56
|
+
validates :vsphere_volume, object: { kind_of: KubeDSL::DSL::V1::VsphereVirtualDiskVolumeSource }
|
57
|
+
validates :cinder, object: { kind_of: KubeDSL::DSL::V1::CinderVolumeSource }
|
58
|
+
validates :aws_elastic_block_store, object: { kind_of: KubeDSL::DSL::V1::AWSElasticBlockStoreVolumeSource }
|
59
|
+
validates :cephfs, object: { kind_of: KubeDSL::DSL::V1::CephFSVolumeSource }
|
60
|
+
validates :downward_api, object: { kind_of: KubeDSL::DSL::V1::DownwardAPIVolumeSource }
|
61
|
+
validates :gce_persistent_disk, object: { kind_of: KubeDSL::DSL::V1::GCEPersistentDiskVolumeSource }
|
62
|
+
|
32
63
|
def serialize
|
33
64
|
{}.tap do |result|
|
34
|
-
result[:subPath] = sub_path
|
35
|
-
result[:mountPath] = mount_path
|
36
65
|
result[:portworxVolume] = portworx_volume.serialize
|
37
66
|
result[:glusterfs] = glusterfs.serialize
|
38
67
|
result[:gitRepo] = git_repo.serialize
|
@@ -44,12 +73,14 @@ module Kuby::KubeDB::DSL::Api::V1
|
|
44
73
|
result[:scaleIO] = scale_io.serialize
|
45
74
|
result[:photonPersistentDisk] = photon_persistent_disk.serialize
|
46
75
|
result[:azureDisk] = azure_disk.serialize
|
76
|
+
result[:subPath] = sub_path
|
47
77
|
result[:fc] = fc.serialize
|
48
78
|
result[:flexVolume] = flex_volume.serialize
|
49
79
|
result[:emptyDir] = empty_dir.serialize
|
50
80
|
result[:rbd] = rbd.serialize
|
51
81
|
result[:persistentVolumeClaim] = persistent_volume_claim.serialize
|
52
82
|
result[:configMap] = config_map.serialize
|
83
|
+
result[:mountPath] = mount_path
|
53
84
|
result[:azureFile] = azure_file.serialize
|
54
85
|
result[:quobyte] = quobyte.serialize
|
55
86
|
result[:hostPath] = host_path.serialize
|
@@ -1,7 +1,9 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class ObjectMeta < ::KubeDSL::DSLObject
|
3
3
|
key_value_field(:annotations, format: :string)
|
4
4
|
|
5
|
+
validates :annotations, kv: { value_format: :string }, presence: true
|
6
|
+
|
5
7
|
def serialize
|
6
8
|
{}.tap do |result|
|
7
9
|
result[:annotations] = annotations.serialize
|
@@ -1,36 +1,57 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class PodSpec < ::KubeDSL::DSLObject
|
3
|
-
|
4
|
-
array_field(:env) { KubeDSL::DSL::V1::EnvVar.new }
|
5
|
-
array_field(:toleration) { KubeDSL::DSL::V1::Toleration.new }
|
6
|
-
array_field(:init_container) { KubeDSL::DSL::V1::Container.new }
|
7
|
-
array_field(:image_pull_secret) { KubeDSL::DSL::V1::LocalObjectReference.new }
|
3
|
+
value_field :priority_class_name
|
8
4
|
object_field(:liveness_probe) { KubeDSL::DSL::V1::Probe.new }
|
9
5
|
object_field(:security_context) { KubeDSL::DSL::V1::PodSecurityContext.new }
|
6
|
+
value_field :service_account_name
|
7
|
+
value_field :scheduler_name
|
8
|
+
value_field :args
|
9
|
+
key_value_field(:node_selector, format: :string)
|
10
|
+
value_field :priority
|
10
11
|
object_field(:affinity) { KubeDSL::DSL::V1::Affinity.new }
|
12
|
+
array_field(:env) { KubeDSL::DSL::V1::EnvVar.new }
|
11
13
|
object_field(:readiness_probe) { KubeDSL::DSL::V1::Probe.new }
|
14
|
+
array_field(:toleration) { KubeDSL::DSL::V1::Toleration.new }
|
15
|
+
array_field(:init_container) { KubeDSL::DSL::V1::Container.new }
|
12
16
|
object_field(:lifecycle) { KubeDSL::DSL::V1::Lifecycle.new }
|
13
17
|
object_field(:resources) { KubeDSL::DSL::V1::ResourceRequirements.new }
|
14
|
-
|
18
|
+
array_field(:image_pull_secret) { KubeDSL::DSL::V1::LocalObjectReference.new }
|
19
|
+
|
20
|
+
validates :priority_class_name, field: { format: :string }, presence: false
|
21
|
+
validates :liveness_probe, object: { kind_of: KubeDSL::DSL::V1::Probe }
|
22
|
+
validates :security_context, object: { kind_of: KubeDSL::DSL::V1::PodSecurityContext }
|
23
|
+
validates :service_account_name, field: { format: :string }, presence: false
|
24
|
+
validates :scheduler_name, field: { format: :string }, presence: false
|
25
|
+
validates :args, field: { format: :string }, presence: false
|
26
|
+
validates :node_selector, kv: { value_format: :string }, presence: true
|
27
|
+
validates :priority, field: { format: :integer }, presence: true
|
28
|
+
validates :affinity, object: { kind_of: KubeDSL::DSL::V1::Affinity }
|
29
|
+
validates :envs, array: { kind_of: KubeDSL::DSL::V1::EnvVar }, presence: false
|
30
|
+
validates :readiness_probe, object: { kind_of: KubeDSL::DSL::V1::Probe }
|
31
|
+
validates :tolerations, array: { kind_of: KubeDSL::DSL::V1::Toleration }, presence: false
|
32
|
+
validates :init_containers, array: { kind_of: KubeDSL::DSL::V1::Container }, presence: false
|
33
|
+
validates :lifecycle, object: { kind_of: KubeDSL::DSL::V1::Lifecycle }
|
34
|
+
validates :resources, object: { kind_of: KubeDSL::DSL::V1::ResourceRequirements }
|
35
|
+
validates :image_pull_secrets, array: { kind_of: KubeDSL::DSL::V1::LocalObjectReference }, presence: false
|
15
36
|
|
16
37
|
def serialize
|
17
38
|
{}.tap do |result|
|
18
39
|
result[:priorityClassName] = priority_class_name
|
40
|
+
result[:livenessProbe] = liveness_probe.serialize
|
41
|
+
result[:securityContext] = security_context.serialize
|
19
42
|
result[:serviceAccountName] = service_account_name
|
20
43
|
result[:schedulerName] = scheduler_name
|
21
44
|
result[:args] = args
|
45
|
+
result[:nodeSelector] = node_selector.serialize
|
22
46
|
result[:priority] = priority
|
47
|
+
result[:affinity] = affinity.serialize
|
23
48
|
result[:env] = envs.map(&:serialize)
|
49
|
+
result[:readinessProbe] = readiness_probe.serialize
|
24
50
|
result[:tolerations] = tolerations.map(&:serialize)
|
25
51
|
result[:initContainers] = init_containers.map(&:serialize)
|
26
|
-
result[:imagePullSecrets] = image_pull_secrets.map(&:serialize)
|
27
|
-
result[:livenessProbe] = liveness_probe.serialize
|
28
|
-
result[:securityContext] = security_context.serialize
|
29
|
-
result[:affinity] = affinity.serialize
|
30
|
-
result[:readinessProbe] = readiness_probe.serialize
|
31
52
|
result[:lifecycle] = lifecycle.serialize
|
32
53
|
result[:resources] = resources.serialize
|
33
|
-
result[:
|
54
|
+
result[:imagePullSecrets] = image_pull_secrets.map(&:serialize)
|
34
55
|
end
|
35
56
|
end
|
36
57
|
|
@@ -1,8 +1,12 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class PodTemplateSpec < ::KubeDSL::DSLObject
|
3
|
-
object_field(:controller) { Kuby::KubeDB::DSL::
|
4
|
-
object_field(:spec) { Kuby::KubeDB::DSL::
|
5
|
-
object_field(:metadata) { Kuby::KubeDB::DSL::
|
3
|
+
object_field(:controller) { Kuby::KubeDB::DSL::API::V1::ObjectMeta.new }
|
4
|
+
object_field(:spec) { Kuby::KubeDB::DSL::API::V1::PodSpec.new }
|
5
|
+
object_field(:metadata) { Kuby::KubeDB::DSL::API::V1::ObjectMeta.new }
|
6
|
+
|
7
|
+
validates :controller, object: { kind_of: Kuby::KubeDB::DSL::API::V1::ObjectMeta }
|
8
|
+
validates :spec, object: { kind_of: Kuby::KubeDB::DSL::API::V1::PodSpec }
|
9
|
+
validates :metadata, object: { kind_of: Kuby::KubeDB::DSL::API::V1::ObjectMeta }
|
6
10
|
|
7
11
|
def serialize
|
8
12
|
{}.tap do |result|
|
@@ -1,14 +1,21 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class PrometheusSpec < ::KubeDSL::DSLObject
|
3
|
-
value_fields :namespace, :port, :interval
|
4
3
|
key_value_field(:labels, format: :string)
|
4
|
+
value_field :namespace
|
5
|
+
value_field :port
|
6
|
+
value_field :interval
|
7
|
+
|
8
|
+
validates :labels, kv: { value_format: :string }, presence: true
|
9
|
+
validates :namespace, field: { format: :string }, presence: false
|
10
|
+
validates :port, field: { format: :integer }, presence: true
|
11
|
+
validates :interval, field: { format: :string }, presence: false
|
5
12
|
|
6
13
|
def serialize
|
7
14
|
{}.tap do |result|
|
15
|
+
result[:labels] = labels.serialize
|
8
16
|
result[:namespace] = namespace
|
9
17
|
result[:port] = port
|
10
18
|
result[:interval] = interval
|
11
|
-
result[:labels] = labels.serialize
|
12
19
|
end
|
13
20
|
end
|
14
21
|
|
@@ -1,6 +1,12 @@
|
|
1
|
-
module Kuby::KubeDB::DSL::
|
1
|
+
module Kuby::KubeDB::DSL::API::V1
|
2
2
|
class S3Spec < ::KubeDSL::DSLObject
|
3
|
-
|
3
|
+
value_field :prefix
|
4
|
+
value_field :endpoint
|
5
|
+
value_field :bucket
|
6
|
+
|
7
|
+
validates :prefix, field: { format: :string }, presence: false
|
8
|
+
validates :endpoint, field: { format: :string }, presence: false
|
9
|
+
validates :bucket, field: { format: :string }, presence: false
|
4
10
|
|
5
11
|
def serialize
|
6
12
|
{}.tap do |result|
|