Skip to content

Commit

Permalink
Merge pull request #13 from base2Services/feature/eks-add-ons
Browse files Browse the repository at this point in the history
EKS add-ons
  • Loading branch information
Samseppiol authored Aug 12, 2021
2 parents 3d70d5a + 105b680 commit f50236a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eks-cluster.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@
LaunchTemplateData(template_data)
}

add_ons = external_parameters.fetch(:add_ons, {})
add_ons.each do | add_on, config |
safe_addon_name = add_on.dup.gsub!('-','') || add_on
EKS_Addon("#{safe_addon_name.capitalize}Addon") {
AddonName add_on
AddonVersion config['version']
ResolveConflicts config['resolve_conflicts'] if config.has_key?('resolve_conflicts')
ClusterName Ref(:EksCluster)
Tags tags
}
end unless add_ons.empty?

asg_tags = [
{ Key: FnSub("k8s.io/cluster/${EksCluster}"), Value: 'owned' },
Expand Down
9 changes: 9 additions & 0 deletions tests/add_ons.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test_metadata:
type: config
name: add_ons
description: test with some basic configuration and an add on

add_ons:
kube-proxy:
version: v1.21.2-eksbuild.2
resolve_conflicts: OVERWRITE

0 comments on commit f50236a

Please sign in to comment.