Skip to content

Commit d6b1fc2

Browse files
committed
rename PrivateDNSNameOptions -> PrivateDNSName
1 parent af2a59e commit d6b1fc2

20 files changed

+68
-74
lines changed

api/v1beta1/awscluster_conversion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
4848
if restored.Status.Bastion != nil {
4949
dst.Status.Bastion.InstanceMetadataOptions = restored.Status.Bastion.InstanceMetadataOptions
5050
dst.Status.Bastion.PlacementGroupName = restored.Status.Bastion.PlacementGroupName
51-
dst.Status.Bastion.PrivateDNSNameOptions = restored.Status.Bastion.PrivateDNSNameOptions
51+
dst.Status.Bastion.PrivateDNSName = restored.Status.Bastion.PrivateDNSName
5252
}
5353
dst.Spec.Partition = restored.Spec.Partition
5454

api/v1beta1/awsmachine_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (src *AWSMachine) ConvertTo(dstRaw conversion.Hub) error {
3838
dst.Spec.Ignition = restored.Spec.Ignition
3939
dst.Spec.InstanceMetadataOptions = restored.Spec.InstanceMetadataOptions
4040
dst.Spec.PlacementGroupName = restored.Spec.PlacementGroupName
41-
dst.Spec.PrivateDNSNameOptions = restored.Spec.PrivateDNSNameOptions
41+
dst.Spec.PrivateDNSName = restored.Spec.PrivateDNSName
4242

4343
return nil
4444
}
@@ -86,7 +86,7 @@ func (r *AWSMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
8686
dst.Spec.Template.Spec.Ignition = restored.Spec.Template.Spec.Ignition
8787
dst.Spec.Template.Spec.InstanceMetadataOptions = restored.Spec.Template.Spec.InstanceMetadataOptions
8888
dst.Spec.Template.Spec.PlacementGroupName = restored.Spec.Template.Spec.PlacementGroupName
89-
dst.Spec.Template.Spec.PrivateDNSNameOptions = restored.Spec.Template.Spec.PrivateDNSNameOptions
89+
dst.Spec.Template.Spec.PrivateDNSName = restored.Spec.Template.Spec.PrivateDNSName
9090

9191
return nil
9292
}

api/v1beta1/zz_generated.conversion.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/awsmachine_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ type AWSMachineSpec struct {
161161
// +kubebuilder:validation:Enum:=default;dedicated;host
162162
Tenancy string `json:"tenancy,omitempty"`
163163

164-
// PrivateDNSNameOptions is the options for the instance hostname.
164+
// PrivateDNSName is the options for the instance hostname.
165165
// +optional
166-
PrivateDNSNameOptions *PrivateDNSNameOptions `json:"privateDnsNameOptions,omitempty"`
166+
PrivateDNSName *PrivateDNSName `json:"privateDnsName,omitempty"`
167167
}
168168

169169
// CloudInit defines options related to the bootstrapping systems where

api/v1beta2/awsmachine_webhook.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ func (r *AWSMachine) ValidateUpdate(old runtime.Object) (admission.Warnings, err
115115
}
116116

117117
// allow changes to enableResourceNameDNSAAAARecord and enableResourceNameDNSARecord
118-
if privateDNSNameOptions, ok := oldAWSMachineSpec["privateDnsNameOptions"].(map[string]interface{}); ok {
119-
delete(privateDNSNameOptions, "enableResourceNameDnsAAAARecord")
120-
delete(privateDNSNameOptions, "enableResourceNameDnsARecord")
118+
if privateDNSName, ok := oldAWSMachineSpec["privateDnsName"].(map[string]interface{}); ok {
119+
delete(privateDNSName, "enableResourceNameDnsAAAARecord")
120+
delete(privateDNSName, "enableResourceNameDnsARecord")
121121
}
122122

123-
if privateDNSNameOptions, ok := newAWSMachineSpec["privateDnsNameOptions"].(map[string]interface{}); ok {
124-
delete(privateDNSNameOptions, "enableResourceNameDnsAAAARecord")
125-
delete(privateDNSNameOptions, "enableResourceNameDnsARecord")
123+
if privateDNSName, ok := newAWSMachineSpec["privateDnsName"].(map[string]interface{}); ok {
124+
delete(privateDNSName, "enableResourceNameDnsAAAARecord")
125+
delete(privateDNSName, "enableResourceNameDnsARecord")
126126
}
127127

128128
if !cmp.Equal(oldAWSMachineSpec, newAWSMachineSpec) {

api/v1beta2/awsmachine_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func TestAWSMachineUpdate(t *testing.T) {
325325
ID: pointer.String("ID"),
326326
},
327327
},
328-
PrivateDNSNameOptions: &PrivateDNSNameOptions{
328+
PrivateDNSName: &PrivateDNSName{
329329
EnableResourceNameDNSAAAARecord: aws.Bool(true),
330330
EnableResourceNameDNSARecord: aws.Bool(true),
331331
},

api/v1beta2/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ type Instance struct {
233233
// +optional
234234
InstanceMetadataOptions *InstanceMetadataOptions `json:"instanceMetadataOptions,omitempty"`
235235

236-
// PrivateDNSNameOptions is the options for the instance hostname.
236+
// PrivateDNSName is the options for the instance hostname.
237237
// +optional
238-
PrivateDNSNameOptions *PrivateDNSNameOptions `json:"privateDnsNameOptions,omitempty"`
238+
PrivateDNSName *PrivateDNSName `json:"privateDnsName,omitempty"`
239239
}
240240

241241
// InstanceMetadataState describes the state of InstanceMetadataOptions.HttpEndpoint and InstanceMetadataOptions.InstanceMetadataTags
@@ -412,8 +412,8 @@ const (
412412
AmazonLinuxGPU EKSAMILookupType = "AmazonLinuxGPU"
413413
)
414414

415-
// PrivateDNSNameOptions is the options for the instance hostname.
416-
type PrivateDNSNameOptions struct {
415+
// PrivateDNSName is the options for the instance hostname.
416+
type PrivateDNSName struct {
417417
// EnableResourceNameDNSAAAARecord indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
418418
// +optional
419419
EnableResourceNameDNSAAAARecord *bool `json:"enableResourceNameDnsAAAARecord,omitempty"`

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,9 +1108,8 @@ spec:
11081108
description: PlacementGroupName specifies the name of the placement
11091109
group in which to launch the instance.
11101110
type: string
1111-
privateDnsNameOptions:
1112-
description: PrivateDNSNameOptions is the options for the instance
1113-
hostname.
1111+
privateDnsName:
1112+
description: PrivateDNSName is the options for the instance hostname.
11141113
properties:
11151114
enableResourceNameDnsAAAARecord:
11161115
description: EnableResourceNameDNSAAAARecord indicates whether
@@ -2751,9 +2750,8 @@ spec:
27512750
description: PlacementGroupName specifies the name of the placement
27522751
group in which to launch the instance.
27532752
type: string
2754-
privateDnsNameOptions:
2755-
description: PrivateDNSNameOptions is the options for the instance
2756-
hostname.
2753+
privateDnsName:
2754+
description: PrivateDNSName is the options for the instance hostname.
27572755
properties:
27582756
enableResourceNameDnsAAAARecord:
27592757
description: EnableResourceNameDNSAAAARecord indicates whether

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,9 +1699,8 @@ spec:
16991699
description: PlacementGroupName specifies the name of the placement
17001700
group in which to launch the instance.
17011701
type: string
1702-
privateDnsNameOptions:
1703-
description: PrivateDNSNameOptions is the options for the instance
1704-
hostname.
1702+
privateDnsName:
1703+
description: PrivateDNSName is the options for the instance hostname.
17051704
properties:
17061705
enableResourceNameDnsAAAARecord:
17071706
description: EnableResourceNameDNSAAAARecord indicates whether

0 commit comments

Comments
 (0)