Skip to content

Commit 6bc75df

Browse files
Merge pull request #8570 from r4f4/aws-proxy-bootstrap-only
OCPBUGS-35197: capi/aws: do not set proxy for masters
2 parents 5b44d26 + c88423c commit 6bc75df

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

pkg/asset/machines/aws/awsmachines.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ func GenerateMachines(clusterID string, in *MachineInput) ([]*asset.RuntimeFile,
112112
if in.Role == "bootstrap" {
113113
awsMachine.Name = capiutils.GenerateBoostrapMachineName(clusterID)
114114
awsMachine.Labels["install.openshift.io/bootstrap"] = ""
115-
awsMachine.Spec.Ignition.StorageType = capa.IgnitionStorageTypeOptionClusterObjectStore
116-
} else {
117-
// master machines should get ignition from the MCS on the bootstrap node
118-
awsMachine.Spec.Ignition.StorageType = capa.IgnitionStorageTypeOptionUnencryptedUserData
119115
}
120116

121117
// Handle additional security groups.

pkg/asset/machines/clusterapi.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/vmware/govmomi/vim25/soap"
1414
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1515
"k8s.io/utils/ptr"
16+
"sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
1617
"sigs.k8s.io/controller-runtime/pkg/client"
1718
"sigs.k8s.io/yaml"
1819

@@ -166,25 +167,30 @@ func (c *ClusterAPI) Generate(dependencies asset.Parents) error {
166167
return fmt.Errorf("failed to create CAPA tags from UserTags: %w", err)
167168
}
168169

169-
ignition, err := aws.CapaIgnitionWithCertBundleAndProxy(installConfig.Config.AdditionalTrustBundle, installConfig.Config.Proxy)
170-
if err != nil {
171-
return fmt.Errorf("failed to generation CAPA ignition: %w", err)
172-
}
173-
174170
pool.Platform.AWS = &mpool
175171
awsMachines, err := aws.GenerateMachines(clusterID.InfraID, &aws.MachineInput{
176172
Role: "master",
177173
Pool: &pool,
178174
Subnets: subnets,
179175
Tags: tags,
180176
PublicIP: false,
181-
Ignition: ignition,
177+
Ignition: &v1beta2.Ignition{
178+
Version: "3.2",
179+
// master machines should get ignition from the MCS on the bootstrap node
180+
StorageType: v1beta2.IgnitionStorageTypeOptionUnencryptedUserData,
181+
},
182182
})
183183
if err != nil {
184184
return errors.Wrap(err, "failed to create master machine objects")
185185
}
186186
c.FileList = append(c.FileList, awsMachines...)
187187

188+
ignition, err := aws.CapaIgnitionWithCertBundleAndProxy(installConfig.Config.AdditionalTrustBundle, installConfig.Config.Proxy)
189+
if err != nil {
190+
return fmt.Errorf("failed to generation CAPA ignition: %w", err)
191+
}
192+
ignition.StorageType = v1beta2.IgnitionStorageTypeOptionClusterObjectStore
193+
188194
pool := *ic.ControlPlane
189195
pool.Name = "bootstrap"
190196
pool.Replicas = ptr.To[int64](1)

0 commit comments

Comments
 (0)