eks_cli 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94bf410f44d38de95506f7414f0716417cd5de42523ecc1a3e0c1eef024e4790
4
- data.tar.gz: b551d343e9fd3c4b79a9e1be6e0f0b85bf09a0fa0deb2125e8a7dacb5b875fe0
3
+ metadata.gz: 6f3f3482b85b1f958736fc15f42ca78a0758bb260f41fc2b9a82b8ac4d41290d
4
+ data.tar.gz: f8716d74941af68b46f7b969af80d5d0747f140f4eaf09d0ca5d32d32c66f4d7
5
5
  SHA512:
6
- metadata.gz: 7e3b84be234a00bc579f558b9e949d96369b212865c9e993b0df3a4d21968fb15d7e6c46116d278f3fd55247c9f3d14c0904d88a74c58bcf84cb59f39c6c16a9
7
- data.tar.gz: d45a18369055ec099b11aa0224a750f8f14b265faaf5ec35330b950a23aa8f5bd8e7330ebbb81f4e93db84db83cd2114b8c3c39d9dd80e9b4c698aee8e9f8f4e
6
+ metadata.gz: 7632811983ed89098c1be2f08cc92f612641863ce0aa90d0b6c19dfbdf3d6de75a9e06a1133f673db9f0a90205511b930de790db47a099b253b24f4c043b8bce
7
+ data.tar.gz: d4592a8ee34300d7b87b63aa32146bd5fcfbd150760ee36ea4a8a3e86332566aa6b2a93173cdbb6199cd7ab798d5739f8c8f1e1fc5e06c4c41dea147d2e3d61e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eks_cli (0.2.9)
4
+ eks_cli (0.3.1)
5
5
  activesupport (= 5.2.1.1)
6
6
  aws-sdk-autoscaling (= 1.13.0)
7
7
  aws-sdk-cloudformation (= 1.13.0)
@@ -20,20 +20,20 @@ GEM
20
20
  i18n (>= 0.7, < 2)
21
21
  minitest (~> 5.1)
22
22
  tzinfo (~> 1.1)
23
- addressable (2.5.2)
23
+ addressable (2.6.0)
24
24
  public_suffix (>= 2.0.2, < 4.0)
25
- aws-eventstream (1.0.1)
26
- aws-partitions (1.125.0)
25
+ aws-eventstream (1.0.2)
26
+ aws-partitions (1.144.0)
27
27
  aws-sdk-autoscaling (1.13.0)
28
28
  aws-sdk-core (~> 3, >= 3.39.0)
29
29
  aws-sigv4 (~> 1.0)
30
30
  aws-sdk-cloudformation (1.13.0)
31
31
  aws-sdk-core (~> 3, >= 3.39.0)
32
32
  aws-sigv4 (~> 1.0)
33
- aws-sdk-core (3.44.0)
34
- aws-eventstream (~> 1.0)
33
+ aws-sdk-core (3.48.2)
34
+ aws-eventstream (~> 1.0, >= 1.0.2)
35
35
  aws-partitions (~> 1.0)
36
- aws-sigv4 (~> 1.0)
36
+ aws-sigv4 (~> 1.1)
37
37
  jmespath (~> 1.0)
38
38
  aws-sdk-ec2 (1.62.0)
39
39
  aws-sdk-core (~> 3, >= 3.39.0)
@@ -41,8 +41,9 @@ GEM
41
41
  aws-sdk-route53 (1.16.0)
42
42
  aws-sdk-core (~> 3, >= 3.39.0)
43
43
  aws-sigv4 (~> 1.0)
44
- aws-sigv4 (1.0.3)
45
- concurrent-ruby (1.1.4)
44
+ aws-sigv4 (1.1.0)
45
+ aws-eventstream (~> 1.0, >= 1.0.2)
46
+ concurrent-ruby (1.1.5)
46
47
  domain_name (0.5.20180417)
47
48
  unf (>= 0.0.5, < 1.0.0)
48
49
  http (3.3.0)
@@ -57,7 +58,7 @@ GEM
57
58
  httparty (0.16.3)
58
59
  mime-types (~> 3.0)
59
60
  multi_xml (>= 0.5.2)
60
- i18n (1.2.0)
61
+ i18n (1.6.0)
61
62
  concurrent-ruby (~> 1.0)
62
63
  ipaddress (0.8.3)
63
64
  jmespath (1.4.0)
@@ -92,4 +93,4 @@ DEPENDENCIES
92
93
  eks_cli!
93
94
 
94
95
  BUNDLED WITH
95
- 1.17.1
96
+ 1.17.2
@@ -192,7 +192,7 @@ Resources:
192
192
  - !Ref Subnet02
193
193
  - !Ref Subnet03
194
194
  RoleArn: !GetAtt AWSServiceRoleForAmazonEKS.Arn
195
- Version: "1.10"
195
+ Version: "1.12"
196
196
 
197
197
  NodeGroupsInClusterSecurityGroup:
198
198
  Type: AWS::EC2::SecurityGroup
@@ -1,6 +1,6 @@
1
1
  ---
2
- AWSTemplateFormatVersion: '2010-09-09'
3
- Description: 'Amazon EKS - Node Group'
2
+ AWSTemplateFormatVersion: 2010-09-09
3
+ Description: Amazon EKS - Node Group
4
4
 
5
5
  Parameters:
6
6
 
@@ -16,107 +16,107 @@ Parameters:
16
16
  Description: EC2 instance type for the node instances
17
17
  Type: String
18
18
  Default: t3.medium
19
- AllowedValues:
20
- - t2.small
21
- - t2.medium
22
- - t2.large
23
- - t2.xlarge
24
- - t2.2xlarge
25
- - t3.nano
26
- - t3.micro
27
- - t3.small
28
- - t3.medium
29
- - t3.large
30
- - t3.xlarge
31
- - t3.2xlarge
32
- - m3.medium
33
- - m3.large
34
- - m3.xlarge
35
- - m3.2xlarge
36
- - m4.large
37
- - m4.xlarge
38
- - m4.2xlarge
39
- - m4.4xlarge
40
- - m4.10xlarge
41
- - m5.large
42
- - m5.xlarge
43
- - m5.2xlarge
44
- - m5.4xlarge
45
- - m5.12xlarge
46
- - m5.24xlarge
47
- - c4.large
48
- - c4.xlarge
49
- - c4.2xlarge
50
- - c4.4xlarge
51
- - c4.8xlarge
52
- - c5.large
53
- - c5.xlarge
54
- - c5.2xlarge
55
- - c5.4xlarge
56
- - c5.9xlarge
57
- - c5.18xlarge
58
- - i3.large
59
- - i3.xlarge
60
- - i3.2xlarge
61
- - i3.4xlarge
62
- - i3.8xlarge
63
- - i3.16xlarge
64
- - r3.xlarge
65
- - r3.2xlarge
66
- - r3.4xlarge
67
- - r3.8xlarge
68
- - r4.large
69
- - r4.xlarge
70
- - r4.2xlarge
71
- - r4.4xlarge
72
- - r4.8xlarge
73
- - r4.16xlarge
74
- - x1.16xlarge
75
- - x1.32xlarge
76
- - p2.xlarge
77
- - p2.8xlarge
78
- - p2.16xlarge
79
- - p3.2xlarge
80
- - p3.8xlarge
81
- - p3.16xlarge
82
- - r5.large
83
- - r5.xlarge
84
- - r5.2xlarge
85
- - r5.4xlarge
86
- - r5.12xlarge
87
- - r5.24xlarge
88
- - r5d.large
89
- - r5d.xlarge
90
- - r5d.2xlarge
91
- - r5d.4xlarge
92
- - r5d.12xlarge
93
- - r5d.24xlarge
94
- - z1d.large
95
- - z1d.xlarge
96
- - z1d.2xlarge
97
- - z1d.3xlarge
98
- - z1d.6xlarge
99
- - z1d.12xlarge
100
19
  ConstraintDescription: Must be a valid EC2 instance type
20
+ AllowedValues:
21
+ - t2.small
22
+ - t2.medium
23
+ - t2.large
24
+ - t2.xlarge
25
+ - t2.2xlarge
26
+ - t3.nano
27
+ - t3.micro
28
+ - t3.small
29
+ - t3.medium
30
+ - t3.large
31
+ - t3.xlarge
32
+ - t3.2xlarge
33
+ - m3.medium
34
+ - m3.large
35
+ - m3.xlarge
36
+ - m3.2xlarge
37
+ - m4.large
38
+ - m4.xlarge
39
+ - m4.2xlarge
40
+ - m4.4xlarge
41
+ - m4.10xlarge
42
+ - m5.large
43
+ - m5.xlarge
44
+ - m5.2xlarge
45
+ - m5.4xlarge
46
+ - m5.12xlarge
47
+ - m5.24xlarge
48
+ - c4.large
49
+ - c4.xlarge
50
+ - c4.2xlarge
51
+ - c4.4xlarge
52
+ - c4.8xlarge
53
+ - c5.large
54
+ - c5.xlarge
55
+ - c5.2xlarge
56
+ - c5.4xlarge
57
+ - c5.9xlarge
58
+ - c5.18xlarge
59
+ - i3.large
60
+ - i3.xlarge
61
+ - i3.2xlarge
62
+ - i3.4xlarge
63
+ - i3.8xlarge
64
+ - i3.16xlarge
65
+ - r3.xlarge
66
+ - r3.2xlarge
67
+ - r3.4xlarge
68
+ - r3.8xlarge
69
+ - r4.large
70
+ - r4.xlarge
71
+ - r4.2xlarge
72
+ - r4.4xlarge
73
+ - r4.8xlarge
74
+ - r4.16xlarge
75
+ - x1.16xlarge
76
+ - x1.32xlarge
77
+ - p2.xlarge
78
+ - p2.8xlarge
79
+ - p2.16xlarge
80
+ - p3.2xlarge
81
+ - p3.8xlarge
82
+ - p3.16xlarge
83
+ - r5.large
84
+ - r5.xlarge
85
+ - r5.2xlarge
86
+ - r5.4xlarge
87
+ - r5.12xlarge
88
+ - r5.24xlarge
89
+ - r5d.large
90
+ - r5d.xlarge
91
+ - r5d.2xlarge
92
+ - r5d.4xlarge
93
+ - r5d.12xlarge
94
+ - r5d.24xlarge
95
+ - z1d.large
96
+ - z1d.xlarge
97
+ - z1d.2xlarge
98
+ - z1d.3xlarge
99
+ - z1d.6xlarge
100
+ - z1d.12xlarge
101
101
 
102
102
  NodeAutoScalingGroupMinSize:
103
- Type: Number
104
103
  Description: Minimum size of Node Group ASG.
104
+ Type: Number
105
105
  Default: 1
106
106
 
107
107
  NodeAutoScalingGroupMaxSize:
108
- Type: Number
109
108
  Description: Maximum size of Node Group ASG. Set to at least 1 greater than NodeAutoScalingGroupDesiredCapacity.
109
+ Type: Number
110
110
  Default: 4
111
111
 
112
112
  NodeAutoScalingGroupDesiredCapacity:
113
- Type: Number
114
113
  Description: Desired capacity of Node Group ASG.
114
+ Type: Number
115
115
  Default: 3
116
116
 
117
117
  NodeVolumeSize:
118
- Type: Number
119
118
  Description: Node volume size
119
+ Type: Number
120
120
  Default: 20
121
121
 
122
122
  ClusterName:
@@ -125,8 +125,8 @@ Parameters:
125
125
 
126
126
  BootstrapArguments:
127
127
  Description: Arguments to pass to the bootstrap script. See files/bootstrap.sh in https://github.com/awslabs/amazon-eks-ami
128
- Default: ""
129
128
  Type: String
129
+ Default: ""
130
130
 
131
131
  NodeGroupName:
132
132
  Description: Unique identifier for the Node Group.
@@ -153,17 +153,16 @@ Parameters:
153
153
  Type: CommaDelimitedList
154
154
 
155
155
  Metadata:
156
+
156
157
  AWS::CloudFormation::Interface:
157
158
  ParameterGroups:
158
- -
159
- Label:
160
- default: "EKS Cluster"
159
+ - Label:
160
+ default: EKS Cluster
161
161
  Parameters:
162
162
  - ClusterName
163
163
  - ClusterControlPlaneSecurityGroup
164
- -
165
- Label:
166
- default: "Worker Node Configuration"
164
+ - Label:
165
+ default: Worker Node Configuration
167
166
  Parameters:
168
167
  - NodeGroupName
169
168
  - NodeAutoScalingGroupMinSize
@@ -176,9 +175,8 @@ Metadata:
176
175
  - BootstrapArguments
177
176
  - NodeGroupIAMPolicies
178
177
  - ClusterSecurityGroup
179
- -
180
- Label:
181
- default: "Worker Network Configuration"
178
+ - Label:
179
+ default: Worker Network Configuration
182
180
  Parameters:
183
181
  - VpcId
184
182
  - Subnets
@@ -190,20 +188,18 @@ Resources:
190
188
  Properties:
191
189
  Path: "/"
192
190
  Roles:
193
- - !Ref NodeInstanceRole
191
+ - !Ref NodeInstanceRole
194
192
 
195
193
  NodeInstanceRole:
196
194
  Type: AWS::IAM::Role
197
195
  Properties:
198
196
  AssumeRolePolicyDocument:
199
- Version: '2012-10-17'
197
+ Version: 2012-10-17
200
198
  Statement:
201
- - Effect: Allow
202
- Principal:
203
- Service:
204
- - ec2.amazonaws.com
205
- Action:
206
- - sts:AssumeRole
199
+ - Effect: Allow
200
+ Principal:
201
+ Service: ec2.amazonaws.com
202
+ Action: sts:AssumeRole
207
203
  Path: "/"
208
204
  ManagedPolicyArns:
209
205
  Ref: NodeGroupIAMPolicies
@@ -212,11 +208,10 @@ Resources:
212
208
  Type: AWS::EC2::SecurityGroup
213
209
  Properties:
214
210
  GroupDescription: Security group for all nodes in the cluster
215
- VpcId:
216
- !Ref VpcId
211
+ VpcId: !Ref VpcId
217
212
  Tags:
218
- - Key: !Sub "kubernetes.io/cluster/${ClusterName}"
219
- Value: 'owned'
213
+ - Key: !Sub kubernetes.io/cluster/${ClusterName}
214
+ Value: owned
220
215
 
221
216
  NodeSecurityGroupIngress:
222
217
  Type: AWS::EC2::SecurityGroupIngress
@@ -225,7 +220,7 @@ Resources:
225
220
  Description: Allow node to communicate with each other
226
221
  GroupId: !Ref NodeSecurityGroup
227
222
  SourceSecurityGroupId: !Ref NodeSecurityGroup
228
- IpProtocol: '-1'
223
+ IpProtocol: -1
229
224
  FromPort: 0
230
225
  ToPort: 65535
231
226
 
@@ -291,33 +286,32 @@ Resources:
291
286
  LaunchConfigurationName: !Ref NodeLaunchConfig
292
287
  MinSize: !Ref NodeAutoScalingGroupMinSize
293
288
  MaxSize: !Ref NodeAutoScalingGroupMaxSize
294
- VPCZoneIdentifier:
295
- !Ref Subnets
289
+ VPCZoneIdentifier: !Ref Subnets
296
290
  Tags:
297
- - Key: Name
298
- Value: !Sub "${ClusterName}-${NodeGroupName}-Node"
299
- PropagateAtLaunch: 'true'
300
- - Key: !Sub 'kubernetes.io/cluster/${ClusterName}'
301
- Value: 'owned'
302
- PropagateAtLaunch: 'true'
291
+ - Key: Name
292
+ Value: !Sub ${ClusterName}-${NodeGroupName}-Node
293
+ PropagateAtLaunch: true
294
+ - Key: !Sub kubernetes.io/cluster/${ClusterName}
295
+ Value: owned
296
+ PropagateAtLaunch: true
303
297
  UpdatePolicy:
304
298
  AutoScalingRollingUpdate:
305
- MaxBatchSize: '1'
299
+ MaxBatchSize: 1
306
300
  MinInstancesInService: !Ref NodeAutoScalingGroupDesiredCapacity
307
- PauseTime: 'PT5M'
301
+ PauseTime: PT5M
308
302
 
309
303
  NodeLaunchConfig:
310
304
  Type: AWS::AutoScaling::LaunchConfiguration
311
305
  Properties:
312
- AssociatePublicIpAddress: 'true'
306
+ AssociatePublicIpAddress: true
313
307
  IamInstanceProfile: !Ref NodeInstanceProfile
314
308
  ImageId: !Ref NodeImageId
315
309
  InstanceType: !Ref NodeInstanceType
316
310
  KeyName: !Ref KeyName
317
311
  InstanceMonitoring: false
318
312
  SecurityGroups:
319
- - !Ref NodeSecurityGroup
320
- - !Ref ClusterSecurityGroup
313
+ - !Ref NodeSecurityGroup
314
+ - !Ref ClusterSecurityGroup
321
315
  BlockDeviceMappings:
322
316
  - DeviceName: /dev/xvda
323
317
  Ebs:
@@ -330,15 +324,13 @@ Resources:
330
324
  #!/bin/bash
331
325
  set -o xtrace
332
326
  /etc/eks/bootstrap.sh ${ClusterName} ${BootstrapArguments}
333
- /opt/aws/bin/cfn-signal --exit-code $? \
334
- --stack ${AWS::StackName} \
335
- --resource NodeGroup \
336
- --region ${AWS::Region}
337
327
 
338
328
  Outputs:
329
+
339
330
  NodeInstanceRole:
340
331
  Description: The node instance role
341
332
  Value: !GetAtt NodeInstanceRole.Arn
333
+
342
334
  NodeSecurityGroup:
343
335
  Description: The security group for the node group
344
336
  Value: !Ref NodeSecurityGroup
@@ -1,5 +1,7 @@
1
+ ---
1
2
  kind: DaemonSet
2
3
  apiVersion: apps/v1
4
+ # kubernetes versions before 1.9.0 should use extensions/v1beta1
3
5
  metadata:
4
6
  name: aws-node
5
7
  namespace: kube-system
@@ -23,7 +25,7 @@ spec:
23
25
  tolerations:
24
26
  - operator: Exists
25
27
  containers:
26
- - image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:1.2.1
28
+ - image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.4.1
27
29
  imagePullPolicy: Always
28
30
  ports:
29
31
  - containerPort: 61678
@@ -0,0 +1,60 @@
1
+ ---
2
+ apiVersion: rbac.authorization.k8s.io/v1
3
+ # kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1
4
+ kind: ClusterRole
5
+ metadata:
6
+ name: aws-node
7
+ rules:
8
+ - apiGroups:
9
+ - crd.k8s.amazonaws.com
10
+ resources:
11
+ - "*"
12
+ - namespaces
13
+ verbs:
14
+ - "*"
15
+ - apiGroups: [""]
16
+ resources:
17
+ - pods
18
+ - nodes
19
+ - namespaces
20
+ verbs: ["list", "watch", "get"]
21
+ - apiGroups: ["extensions"]
22
+ resources:
23
+ - daemonsets
24
+ verbs: ["list", "watch"]
25
+ ---
26
+ apiVersion: v1
27
+ kind: ServiceAccount
28
+ metadata:
29
+ name: aws-node
30
+ namespace: kube-system
31
+ ---
32
+ apiVersion: rbac.authorization.k8s.io/v1
33
+ # kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1
34
+ kind: ClusterRoleBinding
35
+ metadata:
36
+ name: aws-node
37
+ roleRef:
38
+ apiGroup: rbac.authorization.k8s.io
39
+ kind: ClusterRole
40
+ name: aws-node
41
+ subjects:
42
+ - kind: ServiceAccount
43
+ name: aws-node
44
+ namespace: kube-system
45
+ ---
46
+ apiVersion: apiextensions.k8s.io/v1beta1
47
+ kind: CustomResourceDefinition
48
+ metadata:
49
+ name: eniconfigs.crd.k8s.amazonaws.com
50
+ spec:
51
+ scope: Cluster
52
+ group: crd.k8s.amazonaws.com
53
+ versions:
54
+ - name: v1alpha1
55
+ served: true
56
+ storage: true
57
+ names:
58
+ plural: eniconfigs
59
+ singular: eniconfig
60
+ kind: ENIConfig
@@ -8,7 +8,7 @@ metadata:
8
8
  spec:
9
9
  selector:
10
10
  matchLabels:
11
- k8s-app: dns-autoscaler
11
+ k8s-app: dns-autoscaler
12
12
  template:
13
13
  metadata:
14
14
  labels:
@@ -18,14 +18,14 @@ spec:
18
18
  - name: autoscaler
19
19
  image: k8s.gcr.io/cluster-proportional-autoscaler-amd64:1.1.1
20
20
  resources:
21
- requests:
22
- cpu: "20m"
23
- memory: "10Mi"
21
+ requests:
22
+ cpu: 20m
23
+ memory: 10Mi
24
24
  command:
25
- - /cluster-proportional-autoscaler
26
- - --namespace=kube-system
27
- - --configmap=dns-autoscaler
28
- - --target=Deployment/kube-dns
29
- - --default-params={"linear":{"coresPerReplica":64,"nodesPerReplica":4,"min":3}}
30
- - --logtostderr=true
31
- - --v=2
25
+ - /cluster-proportional-autoscaler
26
+ - --namespace=kube-system
27
+ - --configmap=dns-autoscaler
28
+ - --target=Deployment/coredns
29
+ - --default-params={"linear":{"coresPerReplica":64,"nodesPerReplica":4,"min":3}}
30
+ - --logtostderr=true
31
+ - --v=2
@@ -1,7 +1,7 @@
1
- apiVersion: apps/v1
1
+ apiVersion: extensions/v1beta1
2
2
  kind: DaemonSet
3
3
  metadata:
4
- name: nvidia-device-plugin-daemonset
4
+ name: nvidia-device-plugin-daemonset-1.12
5
5
  namespace: kube-system
6
6
  spec:
7
7
  selector:
@@ -20,10 +20,9 @@ spec:
20
20
  tolerations:
21
21
  # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
22
22
  # This, along with the annotation above marks this pod as a critical add-on.
23
- - key: CriticalAddonsOnly
24
- operator: Exists
23
+ - operator: Exists
25
24
  containers:
26
- - image: nvidia/k8s-device-plugin:1.10
25
+ - image: nvidia/k8s-device-plugin:1.11
27
26
  name: nvidia-device-plugin-ctr
28
27
  securityContext:
29
28
  allowPrivilegeEscalation: false
data/lib/eks_cli/cli.rb CHANGED
@@ -37,7 +37,7 @@ module EksCli
37
37
  option :subnet3_az, type: :string, desc: "availability zone for subnet 03"
38
38
  option :open_ports, type: :array, default: [], desc: "open ports on cluster nodes (eg 22 for SSH access)"
39
39
  option :enable_gpu, type: :boolean, default: false, desc: "installs nvidia device plugin daemon set"
40
- option :create_default_storage_class, type: :boolean, default: true, desc: "creates a default gp2 storage class"
40
+ option :create_default_storage_class, type: :boolean, default: false, desc: "creates a default gp2 storage class"
41
41
  option :create_dns_autoscaler, type: :boolean, default: true, desc: "creates dns autoscaler on the cluster"
42
42
  option :warm_ip_target, type: :numeric, desc: "set a default custom warm ip target for CNI"
43
43
  def create
@@ -103,6 +103,7 @@ module EksCli
103
103
  option :min, type: :numeric, default: 1, desc: "minimum number of nodes on the nodegroup"
104
104
  option :max, type: :numeric, default: 1, desc: "maximum number of nodes on the nodegroup"
105
105
  option :desired, type: :numeric, default: 1, desc: "desired number of nodes on the nodegroup"
106
+ option :enable_docker_bridge, type: :boolean, default: false, desc: "pass --enable-docker-bridge true on bootstrap.sh (https://github.com/kubernetes/kubernetes/issues/40182))"
106
107
  option :yes, type: :boolean, default: false, desc: "perform nodegroup creation"
107
108
  def create_nodegroup
108
109
  opts = options.dup
@@ -126,7 +127,7 @@ module EksCli
126
127
 
127
128
  desc "delete-nodegroup", "deletes cloudformation stack for nodegroup"
128
129
  option :all, type: :boolean, default: false, desc: "delete all nodegroups. can't be used with --name"
129
- option :name, type: :string, desc: "delete a specific nodegroup. can't be used with --all"
130
+ option :group_name, type: :string, desc: "delete a specific nodegroup. can't be used with --all"
130
131
  def delete_nodegroup
131
132
  nodegroups.each(&:delete)
132
133
  end
@@ -62,7 +62,7 @@ module EksCli
62
62
  end
63
63
 
64
64
  def update_nodegroup(options)
65
- options = options.slice("ami", "group_name", "instance_type", "subnets", "ssh_key_name", "volume_size", "taints", "min", "max", "desired")
65
+ options = options.slice("ami", "group_name", "instance_type", "subnets", "ssh_key_name", "volume_size", "taints", "min", "max", "enable_docker_bridge", "desired")
66
66
  raise "bad nodegroup name #{options["group_name"]}" if options["group_name"] == nil || options["group_name"].empty?
67
67
  write({groups: { options["group_name"] => options }}, :groups)
68
68
  end
@@ -44,7 +44,8 @@ module EksCli
44
44
 
45
45
  def update_cni
46
46
  Log.info "updating cni"
47
- Log.info self.update_daemon_set(resource_from_erb("k8s/cni_1_2_1.yaml.erb", {custom_warm_ip_target: config["warm_ip_target"]}))
47
+ Log.info self.update_daemon_set(resource_from_erb("k8s/cni/ds.yaml.erb", {custom_warm_ip_target: config["warm_ip_target"]}))
48
+ Log.info `kubectl config use-context #{config["cluster_arn"]} && kubectl apply -f #{file_path("/k8s/cni/rest.yaml")}`
48
49
  end
49
50
 
50
51
  def wait_for_cluster
@@ -25,14 +25,14 @@ module EksCli
25
25
  iam_policies: "NodeGroupIAMPolicies",
26
26
  bootstrap_args: "BootstrapArguments"}
27
27
 
28
- AMIS = {"us-west-2" => "ami-07af9511082779ae7",
29
- "us-east-1" => "ami-027792c3cc6de7b5b",
30
- "us-east-2" => "ami-036130f4127a367f7",
28
+ AMIS = {"us-west-2" => "ami-0923e4b35a30a5f53",
29
+ "us-east-1" => "ami-0abcb9f9190e867ab",
30
+ "us-east-2" => "ami-04ea7cb66af82ae4a",
31
31
  "us-west-1" => "ami-03612357ac9da2c7d"}
32
32
 
33
- GPU_AMIS = {"us-west-2" => "ami-08754f7ac73185331",
34
- "us-east-1" => "ami-03c499c67bc65c089",
35
- "us-east-2" => "ami-081210a2fd7f3c487",
33
+ GPU_AMIS = {"us-west-2" => "ami-0bebf2322fd52a42e",
34
+ "us-east-1" => "ami-0cb7959f92429410a",
35
+ "us-east-2" => "ami-0118b61dc2312dee2",
36
36
  "us-west-1" => "ami-047637529a86c7237"}
37
37
 
38
38
  EKS_IAM_POLICIES = %w{AmazonEKSWorkerNodePolicy
@@ -130,8 +130,12 @@ module EksCli
130
130
  @group["bootstrap_args"] = bootstrap_args
131
131
  @group["ami"] ||= default_ami
132
132
  @group["iam_policies"] = iam_policies
133
- @group.except("taints").inject([]) do |params, (k, v)|
134
- params << build_param(k, v)
133
+ @group.inject([]) do |params, (k, v)|
134
+ if param = build_param(k, v)
135
+ params << param
136
+ else
137
+ params
138
+ end
135
139
  end
136
140
  end
137
141
 
@@ -140,11 +144,13 @@ module EksCli
140
144
  end
141
145
 
142
146
  def bootstrap_args
143
- flags = "--node-labels=kubernetes.io/role=node,eks/node-group=#{@group["group_name"].downcase}"
147
+ kubelet_flags = "--node-labels=kubernetes.io/role=node,eks/node-group=#{@group["group_name"].downcase}"
144
148
  if taints = @group["taints"]
145
- flags = "#{flags} --register-with-taints=#{taints}"
149
+ kubelet_flags = "#{kubelet_flags} --register-with-taints=#{taints}"
146
150
  end
147
- "--kubelet-extra-args \"#{flags}\""
151
+ flags = "--kubelet-extra-args \"#{kubelet_flags}\""
152
+ flags = "#{flags} --enable-docker-bridge true" if @group["enable_docker_bridge"]
153
+ flags
148
154
  end
149
155
 
150
156
  def add_bootstrap_args(group)
@@ -153,8 +159,10 @@ module EksCli
153
159
  end
154
160
 
155
161
  def build_param(k, v)
156
- {parameter_key: T[k.to_sym],
157
- parameter_value: v.to_s}
162
+ if key = T[k.to_sym]
163
+ {parameter_key: key,
164
+ parameter_value: v.to_s}
165
+ end
158
166
  end
159
167
 
160
168
  def default_ami
@@ -1,3 +1,3 @@
1
1
  module EksCli
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -53,7 +53,7 @@ module EksCli
53
53
  to_port: "-1",
54
54
  user_id_group_pairs: [
55
55
  {
56
- description: "Accept all traffic from new EKS cluster VPC",
56
+ description: "Accept all traffic from nodes on EKS cluster #{@cluster_name}",
57
57
  group_id: config["nodes_sg_id"],
58
58
  vpc_id: new_vpc.id,
59
59
  vpc_peering_connection_id: peering_connection_id,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eks_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erez Rabih
@@ -152,7 +152,8 @@ files:
152
152
  - eks_cli.gemspec
153
153
  - lib/assets/cf/eks_cluster.yaml.erb
154
154
  - lib/assets/cf/nodegroup.yaml
155
- - lib/assets/k8s/cni_1_2_1.yaml.erb
155
+ - lib/assets/k8s/cni/ds.yaml.erb
156
+ - lib/assets/k8s/cni/rest.yaml
156
157
  - lib/assets/k8s/default_storage_class.yaml
157
158
  - lib/assets/k8s/dns_autoscaler.dep.yaml
158
159
  - lib/assets/k8s/nvidia_device_plugin.yaml
@@ -192,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
193
  - !ruby/object:Gem::Version
193
194
  version: '0'
194
195
  requirements: []
195
- rubygems_version: 3.0.1
196
+ rubygems_version: 3.0.3
196
197
  signing_key:
197
198
  specification_version: 4
198
199
  summary: Make EKS great again!