You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove VPC and resource group field from VPC security group since it is causing confusion by providing an option to pass a different resource than the one used in cluster
// NetworkInterface holds the network interface information like subnet id.
@@ -254,9 +254,9 @@ type NetworkInterface struct {
254
254
Subnetstring`json:"subnet,omitempty"`
255
255
}
256
256
257
-
// PortRange represents a range of ports, minimum to maximum.
257
+
// VPCSecurityGroupPortRange represents a range of ports, minimum to maximum.
258
258
// +kubebuilder:validation:XValidation:rule="self.maximumPort >= self.minimumPort",message="maximum port must be greater than or equal to minimum port"
259
-
typePortRangestruct {
259
+
typeVPCSecurityGroupPortRangestruct {
260
260
// maximumPort is the inclusive upper range of ports.
261
261
// +kubebuilder:validation:Minimum=1
262
262
// +kubebuilder:validation:Maximum=65535
@@ -268,9 +268,9 @@ type PortRange struct {
268
268
MinimumPortint64`json:"minimumPort,omitempty"`
269
269
}
270
270
271
-
// SecurityGroup defines a VPC Security Group that should exist or be created within the specified VPC, with the specified Security Group Rules.
271
+
// VPCSecurityGroup defines a VPC Security Group that should exist or be created within the specified VPC, with the specified Security Group Rules.
272
272
// +kubebuilder:validation:XValidation:rule="has(self.id) || has(self.name)",message="either an id or name must be specified"
273
-
typeSecurityGroupstruct {
273
+
typeVPCSecurityGroupstruct {
274
274
// id of the Security Group.
275
275
// +optional
276
276
ID*string`json:"id,omitempty"`
@@ -279,107 +279,99 @@ type SecurityGroup struct {
// vpc is the IBM Cloud VPC for the Security Group.
295
-
// +optional
296
-
VPC*VPCResourceReference`json:"vpc,omitempty"`
297
289
}
298
290
299
-
// SecurityGroupRule defines a VPC Security Group Rule for a specified Security Group.
291
+
// VPCSecurityGroupRule defines a VPC Security Group Rule for a specified Security Group.
300
292
// +kubebuilder:validation:XValidation:rule="(has(self.destination) && !has(self.source)) || (!has(self.destination) && has(self.source))",message="both destination and source cannot be provided"
301
-
// +kubebuilder:validation:XValidation:rule="self.direction == 'inbound' ? has(self.source) : true",message="source must be set for SecurityGroupRuleDirectionInbound direction"
302
-
// +kubebuilder:validation:XValidation:rule="self.direction == 'inbound' ? !has(self.destination) : true",message="destination is not valid for SecurityGroupRuleDirectionInbound direction"
303
-
// +kubebuilder:validation:XValidation:rule="self.direction == 'outbound' ? has(self.destination) : true",message="destination must be set for SecurityGroupRuleDirectionOutbound direction"
304
-
// +kubebuilder:validation:XValidation:rule="self.direction == 'outbound' ? !has(self.source) : true",message="source is not valid for SecurityGroupRuleDirectionOutbound direction"
305
-
typeSecurityGroupRulestruct {
293
+
// +kubebuilder:validation:XValidation:rule="self.direction == 'inbound' ? has(self.source) : true",message="source must be set for VPCSecurityGroupRuleDirectionInbound direction"
294
+
// +kubebuilder:validation:XValidation:rule="self.direction == 'inbound' ? !has(self.destination) : true",message="destination is not valid for VPCSecurityGroupRuleDirectionInbound direction"
295
+
// +kubebuilder:validation:XValidation:rule="self.direction == 'outbound' ? has(self.destination) : true",message="destination must be set for VPCSecurityGroupRuleDirectionOutbound direction"
296
+
// +kubebuilder:validation:XValidation:rule="self.direction == 'outbound' ? !has(self.source) : true",message="source is not valid for VPCSecurityGroupRuleDirectionOutbound direction"
297
+
typeVPCSecurityGroupRulestruct {
306
298
// action defines whether to allow or deny traffic defined by the Security Group Rule.
307
299
// +required
308
-
ActionSecurityGroupRuleAction`json:"action"`
300
+
ActionVPCSecurityGroupRuleAction`json:"action"`
309
301
310
-
// destination is a SecurityGroupRulePrototype which defines the destination of outbound traffic for the Security Group Rule.
311
-
// Only used when direction is SecurityGroupRuleDirectionOutbound.
302
+
// destination is a VPCSecurityGroupRulePrototype which defines the destination of outbound traffic for the Security Group Rule.
303
+
// Only used when direction is VPCSecurityGroupRuleDirectionOutbound.
// SecurityGroupRulePrototype defines a VPC Security Group Rule's traffic specifics for a series of remotes (destinations or sources).
357
-
// +kubebuilder:validation:XValidation:rule="self.protocol != 'icmp' ? (!has(self.icmpCode) && !has(self.icmpType)) : true",message="icmpCode and icmpType are only supported for SecurityGroupRuleProtocolIcmp protocol"
358
-
// +kubebuilder:validation:XValidation:rule="self.protocol == 'all' ? !has(self.portRange) : true",message="portRange is not valid for SecurityGroupRuleProtocolAll protocol"
359
-
// +kubebuilder:validation:XValidation:rule="self.protocol == 'icmp' ? !has(self.portRange) : true",message="portRange is not valid for SecurityGroupRuleProtocolIcmp protocol"
360
-
typeSecurityGroupRulePrototypestruct {
348
+
// VPCSecurityGroupRulePrototype defines a VPC Security Group Rule's traffic specifics for a series of remotes (destinations or sources).
349
+
// +kubebuilder:validation:XValidation:rule="self.protocol != 'icmp' ? (!has(self.icmpCode) && !has(self.icmpType)) : true",message="icmpCode and icmpType are only supported for VPCSecurityGroupRuleProtocolIcmp protocol"
350
+
// +kubebuilder:validation:XValidation:rule="self.protocol == 'all' ? !has(self.portRange) : true",message="portRange is not valid for VPCSecurityGroupRuleProtocolAll protocol"
351
+
// +kubebuilder:validation:XValidation:rule="self.protocol == 'icmp' ? !has(self.portRange) : true",message="portRange is not valid for VPCSecurityGroupRuleProtocolIcmp protocol"
352
+
typeVPCSecurityGroupRulePrototypestruct {
361
353
// icmpCode is the ICMP code for the Rule.
362
-
// Only used when Protocol is SecurityGroupProtocolICMP.
354
+
// Only used when Protocol is VPCSecurityGroupRuleProtocolIcmp.
363
355
// +optional
364
356
ICMPCode*int64`json:"icmpCode,omitempty"`
365
357
366
358
// icmpType is the ICMP type for the Rule.
367
-
// Only used when Protocol is SecurityGroupProtocolICMP.
359
+
// Only used when Protocol is VPCSecurityGroupRuleProtocolIcmp.
368
360
// +optional
369
361
ICMPType*int64`json:"icmpType,omitempty"`
370
362
371
363
// portRange is a range of ports allowed for the Rule's remote.
0 commit comments