mirror of https://github.com/kubernetes/kops.git
parent
604f73d7cb
commit
2028841338
|
@ -58,13 +58,13 @@ func (m *MockAutoscaling) CreateAutoScalingGroup(input *autoscaling.CreateAutoSc
|
|||
DefaultCooldown: input.DefaultCooldown,
|
||||
DesiredCapacity: input.DesiredCapacity,
|
||||
// EnabledMetrics: input.EnabledMetrics,
|
||||
HealthCheckGracePeriod: input.HealthCheckGracePeriod,
|
||||
HealthCheckType: input.HealthCheckType,
|
||||
Instances: []*autoscaling.Instance{},
|
||||
LaunchConfigurationName: input.LaunchConfigurationName,
|
||||
LoadBalancerNames: input.LoadBalancerNames,
|
||||
MaxSize: input.MaxSize,
|
||||
MinSize: input.MinSize,
|
||||
HealthCheckGracePeriod: input.HealthCheckGracePeriod,
|
||||
HealthCheckType: input.HealthCheckType,
|
||||
Instances: []*autoscaling.Instance{},
|
||||
LaunchConfigurationName: input.LaunchConfigurationName,
|
||||
LoadBalancerNames: input.LoadBalancerNames,
|
||||
MaxSize: input.MaxSize,
|
||||
MinSize: input.MinSize,
|
||||
NewInstancesProtectedFromScaleIn: input.NewInstancesProtectedFromScaleIn,
|
||||
PlacementGroup: input.PlacementGroup,
|
||||
// Status: input.Status,
|
||||
|
|
|
@ -143,7 +143,7 @@ func TestPrivateKopeio(t *testing.T) {
|
|||
|
||||
// TestUnmanaged is a test where all the subnets opt-out of route management
|
||||
func TestUnmanaged(t *testing.T) {
|
||||
runTestAWS(t, "unmanaged.example.com", "unmanaged", "v1alpha2", true, 1)
|
||||
runTestAWS(t, "unmanaged.example.com", "unmanaged", "v1alpha2", true, 1, true, nil)
|
||||
}
|
||||
|
||||
// TestPrivateSharedSubnet runs the test on a configuration with private topology & shared subnets
|
||||
|
|
|
@ -98,7 +98,7 @@ func makeKubeconfig(ctx context.Context, config *Config, token string) ([]byte,
|
|||
{
|
||||
Name: clusterName,
|
||||
Cluster: v1.Cluster{
|
||||
Server: config.KubeAPI,
|
||||
Server: config.KubeAPI,
|
||||
CertificateAuthorityData: content,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -581,7 +581,7 @@ func (b *KubeletBuilder) buildMasterKubeletKubeconfig() (*nodetasks.File, error)
|
|||
|
||||
template := &x509.Certificate{
|
||||
BasicConstraintsValid: true,
|
||||
IsCA: false,
|
||||
IsCA: false,
|
||||
}
|
||||
|
||||
template.Subject = pkix.Name{
|
||||
|
|
|
@ -64,7 +64,7 @@ func Test_SharedGroups(t *testing.T) {
|
|||
func makeTestInstanceGroupSec(role kops.InstanceGroupRole, secGroup *string) *kops.InstanceGroup {
|
||||
return &kops.InstanceGroup{
|
||||
Spec: kops.InstanceGroupSpec{
|
||||
Role: role,
|
||||
Role: role,
|
||||
SecurityGroupOverride: secGroup,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ func TestGenerateCertificate(t *testing.T) {
|
|||
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
|
||||
ExtKeyUsage: []x509.ExtKeyUsage{},
|
||||
BasicConstraintsValid: true,
|
||||
IsCA: true,
|
||||
IsCA: true,
|
||||
}
|
||||
|
||||
cert, err := SignNewCertificate(key, template, nil, nil)
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
locals = {
|
||||
bastion_autoscaling_group_ids = ["${aws_autoscaling_group.bastion-unmanaged-example-com.id}"]
|
||||
bastion_security_group_ids = ["${aws_security_group.bastion-unmanaged-example-com.id}"]
|
||||
bastions_role_arn = "${aws_iam_role.bastions-unmanaged-example-com.arn}"
|
||||
bastions_role_name = "${aws_iam_role.bastions-unmanaged-example-com.name}"
|
||||
cluster_name = "unmanaged.example.com"
|
||||
master_autoscaling_group_ids = ["${aws_autoscaling_group.master-us-test-1a-masters-unmanaged-example-com.id}"]
|
||||
master_security_group_ids = ["${aws_security_group.masters-unmanaged-example-com.id}"]
|
||||
masters_role_arn = "${aws_iam_role.masters-unmanaged-example-com.arn}"
|
||||
masters_role_name = "${aws_iam_role.masters-unmanaged-example-com.name}"
|
||||
node_autoscaling_group_ids = ["${aws_autoscaling_group.nodes-unmanaged-example-com.id}"]
|
||||
node_security_group_ids = ["${aws_security_group.nodes-unmanaged-example-com.id}"]
|
||||
node_subnet_ids = ["${aws_subnet.us-test-1a-unmanaged-example-com.id}", "${aws_subnet.us-test-1b-unmanaged-example-com.id}"]
|
||||
nodes_role_arn = "${aws_iam_role.nodes-unmanaged-example-com.arn}"
|
||||
nodes_role_name = "${aws_iam_role.nodes-unmanaged-example-com.name}"
|
||||
region = "us-test-1"
|
||||
subnet_us-test-1a_id = "${aws_subnet.us-test-1a-unmanaged-example-com.id}"
|
||||
subnet_us-test-1b_id = "${aws_subnet.us-test-1b-unmanaged-example-com.id}"
|
||||
subnet_utility-us-test-1a_id = "${aws_subnet.utility-us-test-1a-unmanaged-example-com.id}"
|
||||
subnet_utility-us-test-1b_id = "${aws_subnet.utility-us-test-1b-unmanaged-example-com.id}"
|
||||
vpc_id = "vpc-12345678"
|
||||
}
|
||||
|
||||
output "bastion_autoscaling_group_ids" {
|
||||
value = ["${aws_autoscaling_group.bastion-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
||||
output "bastion_security_group_ids" {
|
||||
value = ["${aws_security_group.bastion-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
@ -14,6 +41,10 @@ output "cluster_name" {
|
|||
value = "unmanaged.example.com"
|
||||
}
|
||||
|
||||
output "master_autoscaling_group_ids" {
|
||||
value = ["${aws_autoscaling_group.master-us-test-1a-masters-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
||||
output "master_security_group_ids" {
|
||||
value = ["${aws_security_group.masters-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
@ -26,6 +57,10 @@ output "masters_role_name" {
|
|||
value = "${aws_iam_role.masters-unmanaged-example-com.name}"
|
||||
}
|
||||
|
||||
output "node_autoscaling_group_ids" {
|
||||
value = ["${aws_autoscaling_group.nodes-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
||||
output "node_security_group_ids" {
|
||||
value = ["${aws_security_group.nodes-unmanaged-example-com.id}"]
|
||||
}
|
||||
|
@ -46,6 +81,22 @@ output "region" {
|
|||
value = "us-test-1"
|
||||
}
|
||||
|
||||
output "subnet_us-test-1a_id" {
|
||||
value = "${aws_subnet.us-test-1a-unmanaged-example-com.id}"
|
||||
}
|
||||
|
||||
output "subnet_us-test-1b_id" {
|
||||
value = "${aws_subnet.us-test-1b-unmanaged-example-com.id}"
|
||||
}
|
||||
|
||||
output "subnet_utility-us-test-1a_id" {
|
||||
value = "${aws_subnet.utility-us-test-1a-unmanaged-example-com.id}"
|
||||
}
|
||||
|
||||
output "subnet_utility-us-test-1b_id" {
|
||||
value = "${aws_subnet.utility-us-test-1b-unmanaged-example-com.id}"
|
||||
}
|
||||
|
||||
output "vpc_id" {
|
||||
value = "vpc-12345678"
|
||||
}
|
||||
|
|
|
@ -416,16 +416,16 @@ func (c *ApplyClusterCmd) Run() error {
|
|||
"iamRolePolicy": &awstasks.IAMRolePolicy{},
|
||||
|
||||
// VPC / Networking
|
||||
"dhcpOptions": &awstasks.DHCPOptions{},
|
||||
"internetGateway": &awstasks.InternetGateway{},
|
||||
"route": &awstasks.Route{},
|
||||
"routeTable": &awstasks.RouteTable{},
|
||||
"routeTableAssociation": &awstasks.RouteTableAssociation{},
|
||||
"securityGroup": &awstasks.SecurityGroup{},
|
||||
"securityGroupRule": &awstasks.SecurityGroupRule{},
|
||||
"subnet": &awstasks.Subnet{},
|
||||
"vpc": &awstasks.VPC{},
|
||||
"ngw": &awstasks.NatGateway{},
|
||||
"dhcpOptions": &awstasks.DHCPOptions{},
|
||||
"internetGateway": &awstasks.InternetGateway{},
|
||||
"route": &awstasks.Route{},
|
||||
"routeTable": &awstasks.RouteTable{},
|
||||
"routeTableAssociation": &awstasks.RouteTableAssociation{},
|
||||
"securityGroup": &awstasks.SecurityGroup{},
|
||||
"securityGroupRule": &awstasks.SecurityGroupRule{},
|
||||
"subnet": &awstasks.Subnet{},
|
||||
"vpc": &awstasks.VPC{},
|
||||
"ngw": &awstasks.NatGateway{},
|
||||
"vpcDHDCPOptionsAssociation": &awstasks.VPCDHCPOptionsAssociation{},
|
||||
|
||||
// ELB
|
||||
|
|
|
@ -293,7 +293,7 @@ func buildCertificateTemplateForType(certificateType string) (*x509.Certificate,
|
|||
|
||||
template := &x509.Certificate{
|
||||
BasicConstraintsValid: true,
|
||||
IsCA: false,
|
||||
IsCA: false,
|
||||
}
|
||||
|
||||
tokens := strings.Split(certificateType, ",")
|
||||
|
|
|
@ -144,7 +144,7 @@ func BuildCAX509Template() *x509.Certificate {
|
|||
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
|
||||
ExtKeyUsage: []x509.ExtKeyUsage{},
|
||||
BasicConstraintsValid: true,
|
||||
IsCA: true,
|
||||
IsCA: true,
|
||||
}
|
||||
return template
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue