awspec 1.23.0 → 1.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/doc/_resource_types/eks_nodegroup.md +14 -0
- data/doc/resource_types.md +18 -2
- data/lib/awspec/generator/doc/type/eks_nodegroup.rb +19 -0
- data/lib/awspec/helper/finder/eks.rb +5 -0
- data/lib/awspec/helper/type.rb +1 -1
- data/lib/awspec/stub/eks_nodegroup.rb +16 -0
- data/lib/awspec/type/eks_nodegroup.rb +30 -0
- data/lib/awspec/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653ceb92e32ac29da52acab4686ba388f0a025e10625a12bd6c3b63274d8f932
|
4
|
+
data.tar.gz: 3b683d3e692ee603417b118fc1037e45c0be0248b01094197bb0b8a22880aeb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79fc488d8e027e2aa9224c8fa53ba22ec50141c8acfdb62f1d4d403abb277a7ecbcc4cc7c81cd7b697da9ca3b1bc710abc4f3fc70a0f748a78aa1212abe13a66
|
7
|
+
data.tar.gz: feebfffdc658273716fe7d3178521a857b06f919844211fdfd03035fef093a7450bbe6cf476d1d713cd393d8a903078334325a59326453ee860e36ff3c75e4b4
|
data/.travis.yml
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
### exist
|
2
|
+
|
3
|
+
```ruby
|
4
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
5
|
+
it { should exist }
|
6
|
+
end
|
7
|
+
```
|
8
|
+
### be_active, be_creating
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
describe eks('my-eks-nodegroup'), cluster: 'my-cluster' do
|
12
|
+
it { should be_active }
|
13
|
+
end
|
14
|
+
```
|
data/doc/resource_types.md
CHANGED
@@ -34,6 +34,7 @@
|
|
34
34
|
| [efs](#efs)
|
35
35
|
| [eip](#eip)
|
36
36
|
| [eks](#eks)
|
37
|
+
| [eks_nodegroup](#eks_nodegroup)
|
37
38
|
| [elasticache](#elasticache)
|
38
39
|
| [elasticache_cache_parameter_group](#elasticache_cache_parameter_group)
|
39
40
|
| [elasticsearch](#elasticsearch)
|
@@ -1282,7 +1283,7 @@ describe ecs_task_definition('my-ecs-task-definition') do
|
|
1282
1283
|
end
|
1283
1284
|
```
|
1284
1285
|
|
1285
|
-
### its(:task_definition_arn), its(:family), its(:task_role_arn), its(:execution_role_arn), its(:network_mode), its(:revision), its(:volumes), its(:status), its(:requires_attributes), its(:placement_constraints), its(:compatibilities), its(:requires_compatibilities), its(:cpu), its(:memory), its(:inference_accelerators), its(:pid_mode), its(:ipc_mode), its(:proxy_configuration), its(:registered_at), its(:deregistered_at), its(:registered_by)
|
1286
|
+
### its(:task_definition_arn), its(:family), its(:task_role_arn), its(:execution_role_arn), its(:network_mode), its(:revision), its(:volumes), its(:status), its(:requires_attributes), its(:placement_constraints), its(:compatibilities), its(:requires_compatibilities), its(:cpu), its(:memory), its(:inference_accelerators), its(:pid_mode), its(:ipc_mode), its(:proxy_configuration), its(:registered_at), its(:deregistered_at), its(:registered_by), its(:ephemeral_storage)
|
1286
1287
|
## <a name="efs">efs</a>
|
1287
1288
|
|
1288
1289
|
EFS resource type.
|
@@ -1357,6 +1358,21 @@ end
|
|
1357
1358
|
```
|
1358
1359
|
|
1359
1360
|
### its(:name), its(:arn), its(:created_at), its(:version), its(:endpoint), its(:role_arn), its(:kubernetes_network_config), its(:logging), its(:identity), its(:status), its(:client_request_token), its(:platform_version), its(:tags), its(:encryption_config)
|
1361
|
+
## <a name="eks_nodegroup">eks_nodegroup</a>
|
1362
|
+
|
1363
|
+
EksNodegroup resource type.
|
1364
|
+
|
1365
|
+
### exist
|
1366
|
+
|
1367
|
+
```ruby
|
1368
|
+
describe eks_nodegroup('my-eks-nodegroup'), cluster: 'my-cluster' do
|
1369
|
+
it { should exist }
|
1370
|
+
end
|
1371
|
+
```
|
1372
|
+
|
1373
|
+
### be_active, be_inactive
|
1374
|
+
|
1375
|
+
### its(:nodegroup_name), its(:nodegroup_arn), its(:cluster_name), its(:version), its(:release_version), its(:created_at), its(:modified_at), its(:status), its(:capacity_type), its(:scaling_config), its(:instance_types), its(:subnets), its(:remote_access), its(:ami_type), its(:node_role), its(:labels), its(:resources), its(:disk_size), its(:health), its(:launch_template), its(:tags)
|
1360
1376
|
## <a name="elasticache">elasticache</a>
|
1361
1377
|
|
1362
1378
|
Elasticache resource type.
|
@@ -1425,7 +1441,7 @@ describe elasticache('my-rep-group-001') do
|
|
1425
1441
|
end
|
1426
1442
|
```
|
1427
1443
|
|
1428
|
-
### its(:cache_cluster_id), its(:configuration_endpoint), its(:client_download_landing_page), its(:cache_node_type), its(:engine), its(:engine_version), its(:cache_cluster_status), its(:num_cache_nodes), its(:preferred_availability_zone), its(:preferred_outpost_arn), its(:cache_cluster_create_time), its(:preferred_maintenance_window), its(:notification_configuration), its(:cache_security_groups), its(:cache_subnet_group_name), its(:cache_nodes), its(:auto_minor_version_upgrade), its(:replication_group_id), its(:snapshot_retention_limit), its(:snapshot_window), its(:auth_token_enabled), its(:auth_token_last_modified_date), its(:transit_encryption_enabled), its(:at_rest_encryption_enabled), its(:arn)
|
1444
|
+
### its(:cache_cluster_id), its(:configuration_endpoint), its(:client_download_landing_page), its(:cache_node_type), its(:engine), its(:engine_version), its(:cache_cluster_status), its(:num_cache_nodes), its(:preferred_availability_zone), its(:preferred_outpost_arn), its(:cache_cluster_create_time), its(:preferred_maintenance_window), its(:notification_configuration), its(:cache_security_groups), its(:cache_subnet_group_name), its(:cache_nodes), its(:auto_minor_version_upgrade), its(:replication_group_id), its(:snapshot_retention_limit), its(:snapshot_window), its(:auth_token_enabled), its(:auth_token_last_modified_date), its(:transit_encryption_enabled), its(:at_rest_encryption_enabled), its(:arn), its(:replication_group_log_delivery_enabled), its(:log_delivery_configurations)
|
1429
1445
|
## <a name="elasticache_cache_parameter_group">elasticache_cache_parameter_group</a>
|
1430
1446
|
|
1431
1447
|
ElasticacheCacheParameterGroup resource type.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Awspec::Generator
|
2
|
+
module Doc
|
3
|
+
module Type
|
4
|
+
class EksNodegroup < Base
|
5
|
+
def initialize
|
6
|
+
super
|
7
|
+
@type_name = 'EksNodegroup'
|
8
|
+
@type = Awspec::Type::EksNodegroup.new('my-eks-nodegroup')
|
9
|
+
@ret = @type.resource_via_client
|
10
|
+
@matchers = [
|
11
|
+
Awspec::Type::EksNodegroup::STATES.map { |state| 'be_' + state.downcase }.join(', ')
|
12
|
+
]
|
13
|
+
@ignore_matchers = Awspec::Type::EksNodegroup::STATES.map { |state| 'be_' + state.downcase }
|
14
|
+
@describes = []
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -5,6 +5,11 @@ module Awspec::Helper
|
|
5
5
|
res = eks_client.describe_cluster({ name: name })
|
6
6
|
res.cluster
|
7
7
|
end
|
8
|
+
|
9
|
+
def find_eks_nodegroup(cluster_name, group_name)
|
10
|
+
res = eks_client.describe_nodegroup({ cluster_name: cluster_name, nodegroup_name: group_name })
|
11
|
+
res.nodegroup
|
12
|
+
end
|
8
13
|
end
|
9
14
|
end
|
10
15
|
end
|
data/lib/awspec/helper/type.rb
CHANGED
@@ -12,7 +12,7 @@ module Awspec
|
|
12
12
|
batch_compute_environment batch_job_definition batch_job_queue cloudtrail
|
13
13
|
cloudwatch_alarm cloudwatch_event directconnect_virtual_interface
|
14
14
|
ebs ec2 ecr_repository ecs_cluster ecs_container_instance ecs_service ecs_task_definition
|
15
|
-
efs eks elasticache elasticache_cache_parameter_group elasticsearch elb emr firehose iam_group
|
15
|
+
efs eks eks_nodegroup elasticache elasticache_cache_parameter_group elasticsearch elb emr firehose iam_group
|
16
16
|
iam_policy iam_role iam_user kinesis kms lambda launch_configuration launch_template mq nat_gateway
|
17
17
|
network_acl network_interface nlb nlb_listener nlb_target_group
|
18
18
|
rds rds_db_cluster_parameter_group rds_db_parameter_group route53_hosted_zone
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Aws.config[:eks] = {
|
2
|
+
stub_responses: {
|
3
|
+
describe_nodegroup: {
|
4
|
+
nodegroup: {
|
5
|
+
version: '1.17',
|
6
|
+
release_version: '1.17.12-20210322',
|
7
|
+
cluster_name: 'my-cluster',
|
8
|
+
nodegroup_name: 'my-nodegroup',
|
9
|
+
nodegroup_arn: 'arn:aws:eks:us-west-2:012345678910:nodegroup/my-cluster/my-nodegroup/08bd000a',
|
10
|
+
created_at: Time.parse('2018-10-28 00:23:32 -0400'),
|
11
|
+
node_role: 'arn:aws:iam::012345678910:role/eks-nodegroup-role',
|
12
|
+
status: 'ACTIVE'
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Awspec::Type
|
2
|
+
class EksNodegroup < ResourceBase
|
3
|
+
attr_accessor :cluster
|
4
|
+
|
5
|
+
def initialize(group_name)
|
6
|
+
super
|
7
|
+
@group_name = group_name
|
8
|
+
end
|
9
|
+
|
10
|
+
def resource_via_client
|
11
|
+
@resource_via_client ||= find_eks_nodegroup(cluster, @group_name)
|
12
|
+
end
|
13
|
+
|
14
|
+
def id
|
15
|
+
@id ||= resource_via_client.nodegroup_arn if resource_via_client
|
16
|
+
end
|
17
|
+
|
18
|
+
def cluster
|
19
|
+
@cluster || 'default'
|
20
|
+
end
|
21
|
+
|
22
|
+
STATES = %w(ACTIVE INACTIVE)
|
23
|
+
|
24
|
+
STATES.each do |state|
|
25
|
+
define_method state.downcase + '?' do
|
26
|
+
resource_via_client.status == state
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- doc/_resource_types/efs.md
|
267
267
|
- doc/_resource_types/eip.md
|
268
268
|
- doc/_resource_types/eks.md
|
269
|
+
- doc/_resource_types/eks_nodegroup.md
|
269
270
|
- doc/_resource_types/elasticache.md
|
270
271
|
- doc/_resource_types/elasticache_cache_parameter_group.md
|
271
272
|
- doc/_resource_types/elasticsearch.md
|
@@ -370,6 +371,7 @@ files:
|
|
370
371
|
- lib/awspec/generator/doc/type/efs.rb
|
371
372
|
- lib/awspec/generator/doc/type/eip.rb
|
372
373
|
- lib/awspec/generator/doc/type/eks.rb
|
374
|
+
- lib/awspec/generator/doc/type/eks_nodegroup.rb
|
373
375
|
- lib/awspec/generator/doc/type/elasticache.rb
|
374
376
|
- lib/awspec/generator/doc/type/elasticache_cache_parameter_group.rb
|
375
377
|
- lib/awspec/generator/doc/type/elasticsearch.rb
|
@@ -600,6 +602,7 @@ files:
|
|
600
602
|
- lib/awspec/stub/efs.rb
|
601
603
|
- lib/awspec/stub/eip.rb
|
602
604
|
- lib/awspec/stub/eks.rb
|
605
|
+
- lib/awspec/stub/eks_nodegroup.rb
|
603
606
|
- lib/awspec/stub/elasticache.rb
|
604
607
|
- lib/awspec/stub/elasticache_cache_parameter_group.rb
|
605
608
|
- lib/awspec/stub/elasticsearch.rb
|
@@ -687,6 +690,7 @@ files:
|
|
687
690
|
- lib/awspec/type/efs.rb
|
688
691
|
- lib/awspec/type/eip.rb
|
689
692
|
- lib/awspec/type/eks.rb
|
693
|
+
- lib/awspec/type/eks_nodegroup.rb
|
690
694
|
- lib/awspec/type/elasticache.rb
|
691
695
|
- lib/awspec/type/elasticache_cache_parameter_group.rb
|
692
696
|
- lib/awspec/type/elasticsearch.rb
|