mirror of https://github.com/kubernetes/kops.git
Merge pull request #15526 from justinsb/remove_duplicate_cluster
Remove duplicate Cluster field in BootstrapScriptBuilder
This commit is contained in:
commit
dcdbec93e1
|
@ -72,13 +72,17 @@ func TestRootVolumeOptimizationFlag(t *testing.T) {
|
|||
},
|
||||
BootstrapScriptBuilder: &model.BootstrapScriptBuilder{
|
||||
Lifecycle: fi.LifecycleSync,
|
||||
Cluster: &kops.Cluster{
|
||||
Spec: kops.ClusterSpec{
|
||||
CloudProvider: kops.CloudProviderSpec{
|
||||
AWS: &kops.AWSSpec{},
|
||||
KopsModelContext: &model.KopsModelContext{
|
||||
IAMModelContext: iam.IAMModelContext{
|
||||
Cluster: &kops.Cluster{
|
||||
Spec: kops.ClusterSpec{
|
||||
CloudProvider: kops.CloudProviderSpec{
|
||||
AWS: &kops.AWSSpec{},
|
||||
},
|
||||
Networking: kops.NetworkingSpec{},
|
||||
KubernetesVersion: "1.20.0",
|
||||
},
|
||||
},
|
||||
Networking: kops.NetworkingSpec{},
|
||||
KubernetesVersion: "1.20.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -184,7 +188,6 @@ func TestAPIServerAdditionalSecurityGroupsWithNLB(t *testing.T) {
|
|||
InstanceGroups: igs,
|
||||
},
|
||||
Lifecycle: fi.LifecycleSync,
|
||||
Cluster: cluster,
|
||||
},
|
||||
Cluster: cluster,
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import (
|
|||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/model"
|
||||
"k8s.io/kops/pkg/model/defaults"
|
||||
"k8s.io/kops/pkg/model/iam"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/fitasks"
|
||||
)
|
||||
|
@ -35,9 +36,13 @@ func TestVMScaleSetModelBuilder_Build(t *testing.T) {
|
|||
AzureModelContext: newTestAzureModelContext(),
|
||||
BootstrapScriptBuilder: &model.BootstrapScriptBuilder{
|
||||
Lifecycle: fi.LifecycleSync,
|
||||
Cluster: &kops.Cluster{
|
||||
Spec: kops.ClusterSpec{
|
||||
Networking: kops.NetworkingSpec{},
|
||||
KopsModelContext: &model.KopsModelContext{
|
||||
IAMModelContext: iam.IAMModelContext{
|
||||
Cluster: &kops.Cluster{
|
||||
Spec: kops.ClusterSpec{
|
||||
Networking: kops.NetworkingSpec{},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -52,7 +52,6 @@ type BootstrapScriptBuilder struct {
|
|||
Lifecycle fi.Lifecycle
|
||||
NodeUpAssets map[architectures.Architecture]*mirrors.MirroredAsset
|
||||
NodeUpConfigBuilder NodeUpConfigBuilder
|
||||
Cluster *kops.Cluster
|
||||
}
|
||||
|
||||
type BootstrapScript struct {
|
||||
|
|
|
@ -180,7 +180,6 @@ func TestBootstrapUserData(t *testing.T) {
|
|||
Hash: hashing.MustFromString("e525c28a65ff0ce4f95f9e730195b4e67fdcb15ceb1f36b5ad6921a8a4490c71"),
|
||||
},
|
||||
},
|
||||
Cluster: cluster,
|
||||
}
|
||||
|
||||
res, err := bs.ResourceNodeUp(c, group)
|
||||
|
|
|
@ -43,6 +43,7 @@ type IAMModelContext struct {
|
|||
// AWSPartition defines the partition of the AWS account, typically "aws", "aws-cn", or "aws-us-gov"
|
||||
AWSPartition string
|
||||
|
||||
// Cluster holds the cluster we are working with.
|
||||
Cluster *kops.Cluster
|
||||
}
|
||||
|
||||
|
|
|
@ -1465,7 +1465,6 @@ func RunGoldenTest(t *testing.T, basedir string, testCase serverGroupModelBuilde
|
|||
Hash: hashing.MustFromString("e525c28a65ff0ce4f95f9e730195b4e67fdcb15ceb1f36b5ad6921a8a4490c71"),
|
||||
},
|
||||
},
|
||||
Cluster: testCase.cluster,
|
||||
}
|
||||
|
||||
builder := createBuilderForCluster(testCase.cluster, testCase.instanceGroups, clusterLifecycle, bootstrapScriptBuilder)
|
||||
|
|
|
@ -522,7 +522,6 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error {
|
|||
Lifecycle: clusterLifecycle,
|
||||
NodeUpConfigBuilder: configBuilder,
|
||||
NodeUpAssets: c.NodeUpAssets,
|
||||
Cluster: cluster,
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue