Skip to content

Commit dd9791d

Browse files
isPvEncryptionInTransitEnabled not being set properly in OCIMachine (#247)
* Fix issue where pv encryption flag is reset
1 parent 8e9a249 commit dd9791d

16 files changed

+18
-39
lines changed

api/v1beta1/conversion.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,9 @@ func Convert_v1beta1_OCIMachineSpec_To_v1beta2_OCIMachineSpec(in *OCIMachineSpec
120120
}
121121
return nil
122122
}
123+
124+
// Convert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer converts v1beta2 LoadBalancer to v1beta1 LoadBalancer
125+
126+
func Convert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in *v1beta2.LoadBalancer, out *LoadBalancer, s conversion.Scope) error {
127+
return autoConvert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in, out, s)
128+
}

api/v1beta1/ocimachine_conversion.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ func (src *OCIMachine) ConvertTo(dstRaw conversion.Hub) error {
4141
// ConvertFrom converts the v1beta2 OCIMachine to a v1beta1 OCIMachine.
4242
func (dst *OCIMachine) ConvertFrom(srcRaw conversion.Hub) error {
4343
src := srcRaw.(*v1beta2.OCIMachine)
44-
4544
if err := Convert_v1beta2_OCIMachine_To_v1beta1_OCIMachine(src, dst, nil); err != nil {
4645
return err
4746
}
48-
4947
// Preserve Hub data on down-conversion except for metadata.
5048
return utilconversion.MarshalData(src, dst)
5149
}

api/v1beta1/ocimachine_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ type OCIMachineSpec struct {
9696
ProviderID *string `json:"providerID,omitempty"`
9797

9898
// Is in transit encryption of volumes required.
99-
// +kubebuilder:default=true
10099
// +optional
101100
IsPvEncryptionInTransitEnabled bool `json:"isPvEncryptionInTransitEnabled,omitempty"`
102101

api/v1beta1/zz_generated.conversion.go

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

api/v1beta2/ocimachine_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ type OCIMachineSpec struct {
9696
ProviderID *string `json:"providerID,omitempty"`
9797

9898
// Is in transit encryption of volumes required.
99-
// +kubebuilder:default=true
10099
// +optional
101100
IsPvEncryptionInTransitEnabled bool `json:"isPvEncryptionInTransitEnabled,omitempty"`
102101

cloud/scope/mocks/cluster_client_mock.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ spec:
115115
loadBalancerId:
116116
description: ID of Load Balancer.
117117
type: string
118-
loadBalancerType:
119-
description: 'Type of Load Balancer: NLB (default) or LBaaS.'
120-
type: string
121118
name:
122119
description: LoadBalancer Name.
123120
type: string

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ spec:
127127
loadBalancerId:
128128
description: ID of Load Balancer.
129129
type: string
130-
loadBalancerType:
131-
description: 'Type of Load Balancer: NLB (default)
132-
or LBaaS.'
133-
type: string
134130
name:
135131
description: LoadBalancer Name.
136132
type: string

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,6 @@ spec:
936936
type: string
937937
type: object
938938
isPvEncryptionInTransitEnabled:
939-
default: true
940939
description: Is in transit encryption of volumes required.
941940
type: boolean
942941
launchOptions:

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ spec:
196196
ipxeScript:
197197
type: string
198198
isPvEncryptionInTransitEnabled:
199-
default: true
200199
description: Is in transit encryption of volumes required.
201200
type: boolean
202201
launchOptions:
@@ -700,8 +699,8 @@ spec:
700699
description: The machine address.
701700
type: string
702701
type:
703-
description: Machine address type, one of Hostname, ExternalIP
704-
or InternalIP.
702+
description: Machine address type, one of Hostname, ExternalIP,
703+
InternalIP, ExternalDNS or InternalDNS.
705704
type: string
706705
required:
707706
- address
@@ -958,7 +957,6 @@ spec:
958957
ipxeScript:
959958
type: string
960959
isPvEncryptionInTransitEnabled:
961-
default: true
962960
description: Is in transit encryption of volumes required.
963961
type: boolean
964962
launchOptions:
@@ -1448,8 +1446,8 @@ spec:
14481446
description: The machine address.
14491447
type: string
14501448
type:
1451-
description: Machine address type, one of Hostname, ExternalIP
1452-
or InternalIP.
1449+
description: Machine address type, one of Hostname, ExternalIP,
1450+
InternalIP, ExternalDNS or InternalDNS.
14531451
type: string
14541452
required:
14551453
- address

0 commit comments

Comments
 (0)