mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #5985 from lyda/aws-fixes
Template doesn't work with VPCs
This commit is contained in:
		@@ -130,7 +130,16 @@
 | 
			
		||||
        "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI"]},
 | 
			
		||||
        "InstanceType": {"Ref": "InstanceType"},
 | 
			
		||||
        "KeyName": {"Ref": "KeyPair"},
 | 
			
		||||
        "SecurityGroups": [{"Ref": "KubernetesSecurityGroup"}],
 | 
			
		||||
        "SecurityGroups": [{"Fn::If": [
 | 
			
		||||
          "UseEC2Classic",
 | 
			
		||||
          {"Ref": "KubernetesSecurityGroup"},
 | 
			
		||||
          {"Ref": "AWS::NoValue"}]
 | 
			
		||||
        }],
 | 
			
		||||
        "SecurityGroupIds": [{"Fn::If": [
 | 
			
		||||
          "UseEC2Classic",
 | 
			
		||||
          {"Ref": "AWS::NoValue"},
 | 
			
		||||
          {"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}]
 | 
			
		||||
        }],
 | 
			
		||||
        "UserData": { "Fn::Base64": {"Fn::Join" : ["", [
 | 
			
		||||
          "#cloud-config\n\n",
 | 
			
		||||
          "---\n",
 | 
			
		||||
@@ -296,11 +305,14 @@
 | 
			
		||||
    "KubernetesNodeLaunchConfig": {
 | 
			
		||||
      "Type": "AWS::AutoScaling::LaunchConfiguration",
 | 
			
		||||
      "Properties": {
 | 
			
		||||
        "SubnetId": {"Fn::If": ["UseEC2Classic", {"Ref": "AWS::NoValue"}, {"Ref": "SubnetId"}]},
 | 
			
		||||
        "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI" ]},
 | 
			
		||||
        "InstanceType": {"Ref": "InstanceType"},
 | 
			
		||||
        "KeyName": {"Ref": "KeyPair"},
 | 
			
		||||
        "SecurityGroups": [{"Ref": "KubernetesSecurityGroup"}],
 | 
			
		||||
        "SecurityGroups": [{"Fn::If": [
 | 
			
		||||
          "UseEC2Classic",
 | 
			
		||||
          {"Ref": "KubernetesSecurityGroup"},
 | 
			
		||||
          {"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}]
 | 
			
		||||
        }],
 | 
			
		||||
        "UserData": { "Fn::Base64": {"Fn::Join" : ["", [
 | 
			
		||||
          "#cloud-config\n\n",
 | 
			
		||||
          "coreos:\n",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user