forked from theonestack/hl-component-eks-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheks-cluster.cfhighlander.rb
37 lines (29 loc) · 1.2 KB
/
eks-cluster.cfhighlander.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CfhighlanderTemplate do
Name 'eks-cluster'
DependsOn 'lib-iam'
Description "eks-cluster - #{component_version}"
Parameters do
ComponentParam 'EnvironmentName', 'dev', isGlobal: true
ComponentParam 'EnvironmentType', 'development', allowedValues: ['development','production'], isGlobal: true
ComponentParam 'VPCId', isGlobal: true, type: 'AWS::EC2::VPC::Id'
ComponentParam 'SubnetIds'
ComponentParam 'BootstrapArguments'
ComponentParam 'KeyName'
ComponentParam 'ImageId', type: 'AWS::EC2::Image::Id'
ComponentParam 'InstanceType'
ComponentParam 'SpotPrice', ''
ComponentParam 'EnableScaling', 'true'
ComponentParam 'DesiredCapacity', '1'
ComponentParam 'MinSize', '1'
ComponentParam 'MaxSize', '2'
fargate_profiles.each do |profile|
name = profile['name'].gsub('-','').gsub('_','').capitalize
ComponentParam "#{name}FargateProfileName", ''
end if defined? fargate_profiles
if defined?(managed_node_group['enabled']) && managed_node_group['enabled']
ComponentParam 'ForceUpdateEnabled', false
ComponentParam 'InstanceTypes', ''
end
end
LambdaFunctions 'draining_lambda' if !defined?(managed_node_group['enabled'])
end