mirror of https://github.com/kubernetes/kops.git
Add create cluster test that includes apiserver
This commit is contained in:
parent
29a7268442
commit
fdb72f2c34
|
@ -138,6 +138,11 @@ func TestCreateClusterIPv6(t *testing.T) {
|
|||
|
||||
// TestCreateClusterDifferentAMIs runs kops create cluster with different AMI inputs
|
||||
func TestCreateClusterDifferentAMIs(t *testing.T) {
|
||||
featureflag.ParseFlags("+APIServerNodes")
|
||||
unsetFeatureFlags := func() {
|
||||
featureflag.ParseFlags("-APIServerNodes")
|
||||
}
|
||||
defer unsetFeatureFlags()
|
||||
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/different-amis", "v1alpha2")
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,30 @@ spec:
|
|||
|
||||
---
|
||||
|
||||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: InstanceGroup
|
||||
metadata:
|
||||
creationTimestamp: "2017-01-01T00:00:00Z"
|
||||
labels:
|
||||
kops.k8s.io/cluster: amis.example.com
|
||||
name: apiserver-us-test-1a
|
||||
spec:
|
||||
image: ami-image
|
||||
instanceMetadata:
|
||||
httpPutResponseHopLimit: 1
|
||||
httpTokens: required
|
||||
machineType: m3.medium
|
||||
manager: CloudGroup
|
||||
maxSize: 1
|
||||
minSize: 1
|
||||
nodeLabels:
|
||||
kops.k8s.io/instancegroup: apiserver-us-test-1a
|
||||
role: APIServer
|
||||
subnets:
|
||||
- us-test-1a
|
||||
|
||||
---
|
||||
|
||||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: InstanceGroup
|
||||
metadata:
|
||||
|
|
|
@ -8,4 +8,5 @@ Image: ami-image
|
|||
MasterImage: ami-control-plane
|
||||
NodeImage: ami-worker-image
|
||||
Bastion: true
|
||||
Topology: private
|
||||
Topology: private
|
||||
APIServerCount: 1
|
|
@ -312,7 +312,7 @@ func (c *MockAWSCloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngre
|
|||
// DefaultInstanceType determines an instance type for the specified cluster & instance group
|
||||
func (c *MockAWSCloud) DefaultInstanceType(cluster *kops.Cluster, ig *kops.InstanceGroup) (string, error) {
|
||||
switch ig.Spec.Role {
|
||||
case kops.InstanceGroupRoleMaster:
|
||||
case kops.InstanceGroupRoleMaster, kops.InstanceGroupRoleAPIServer:
|
||||
return "m3.medium", nil
|
||||
case kops.InstanceGroupRoleNode:
|
||||
return "t2.medium", nil
|
||||
|
|
Loading…
Reference in New Issue