Skip to content

Commit bc9cb90

Browse files
committed
Added IngressNLBSecurityGroup FG and API
1 parent 7152b1b commit bc9cb90

19 files changed

+12832
-4
lines changed

features.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
| ClusterVersionOperatorConfiguration| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | | |
99
| DualReplica| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | | |
1010
| Example2| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | | |
11+
| IngressNLBSecurityGroup| | | | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
1112
| NewOLMCatalogdAPIV1Metas| | | | <span style="background-color: #519450">Enabled</span> | | <span style="background-color: #519450">Enabled</span> |
1213
| NewOLMOwnSingleNamespace| | | | <span style="background-color: #519450">Enabled</span> | | <span style="background-color: #519450">Enabled</span> |
1314
| NewOLMPreflightPermissionChecks| | | | <span style="background-color: #519450">Enabled</span> | | <span style="background-color: #519450">Enabled</span> |

features/features.go

+8
Original file line numberDiff line numberDiff line change
@@ -835,4 +835,12 @@ var (
835835
enhancementPR("https://github.com/openshift/enhancements/pull/1748").
836836
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
837837
mustRegister()
838+
839+
FeatureGateIngressNLBSecurityGroup = newFeatureGate("IngressNLBSecurityGroup").
840+
reportProblemsToJiraComponent("Networking/router").
841+
contactPerson("miciah").
842+
productScope(kubernetes).
843+
enhancementPR("https://github.com/kubernetes/enhancements/issues/TBD").
844+
enableIn(configv1.TechPreviewNoUpgrade).
845+
mustRegister()
838846
)

openapi/generated_openapi/zz_generated.openapi.go

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

+12
Original file line numberDiff line numberDiff line change
@@ -26468,6 +26468,18 @@
2646826468
},
2646926469
"x-kubernetes-list-type": "atomic"
2647026470
},
26471+
"managedSecurityGroup": {
26472+
"description": "managedSecurityGroup specifies whether the service load balancer should create and manage security groups for the Network Load Balancer.",
26473+
"type": "boolean"
26474+
},
26475+
"securityGroups": {
26476+
"description": "securityGroups is a list of IDs or Names of Security Groups (SG) instances that are assigned to the Network Load Balancer. The following restrictions apply:\n\nOnly a single Security Group can be added (??). An SG can be allocated to only a single IngressController.\n\nSecurityGroups *AWSSecurityGroups `json:\"securityGroups\"`",
26477+
"type": "array",
26478+
"items": {
26479+
"type": "string",
26480+
"default": ""
26481+
}
26482+
},
2647126483
"subnets": {
2647226484
"description": "subnets specifies the subnets to which the load balancer will attach. The subnets may be specified by either their ID or name. The total number of subnets is limited to 10.\n\nIn order for the load balancer to be provisioned with subnets, each subnet must exist, each subnet must be from a different availability zone, and the load balancer service must be recreated to pick up new values.\n\nWhen omitted from the spec, the subnets will be auto-discovered for each availability zone. Auto-discovered subnets are not reported in the status of the IngressController object.",
2647326485
"$ref": "#/definitions/com.github.openshift.api.operator.v1.AWSSubnets"

operator/v1/types_ingress.go

+27-1
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,13 @@ type AWSSubnetID string
682682
// +kubebuilder:validation:XValidation:rule=`!self.startsWith('subnet-')`,message="subnet name cannot start with 'subnet-'"
683683
type AWSSubnetName string
684684

685+
// AWSSecurityGroup is a reference to an AWS security group name or ID.
686+
// +kubebuilder:validation:MinLength=1
687+
// +kubebuilder:validation:MaxLength=256
688+
// +kubebuilder:validation:XValidation:rule=`!self.contains(',')`,message="security group name cannot contain a comma"
689+
// +kubebuilder:validation:XValidation:rule=`self.startsWith('sg-') ? self.matches('^sg-[0-9A-Za-z]{17}$') : true`,message="security group follow the pattern '^sg-[0-9A-Za-z]{17}$' if it starts with 'sg-'"
690+
type AWSSecurityGroup string
691+
685692
// GCPLoadBalancerParameters provides configuration settings that are
686693
// specific to GCP load balancers.
687694
type GCPLoadBalancerParameters struct {
@@ -842,7 +849,26 @@ type AWSNetworkLoadBalancerParameters struct {
842849
// +listType=atomic
843850
// +kubebuilder:validation:XValidation:rule=`self.all(x, self.exists_one(y, x == y))`,message="eipAllocations cannot contain duplicates"
844851
// +kubebuilder:validation:MaxItems=10
845-
EIPAllocations []EIPAllocation `json:"eipAllocations"`
852+
EIPAllocations []EIPAllocation `json:"eipAllocations,omitempty"`
853+
854+
// securityGroups is a list of IDs or Names of Security Groups (SG) instances that
855+
// are assigned to the Network Load Balancer.
856+
// The following restrictions apply:
857+
//
858+
// Only a single Security Group can be added (??).
859+
// An SG can be allocated to only a single IngressController.
860+
//
861+
// +optional
862+
// +openshift:enable:FeatureGate=IngressNLBSecurityGroup
863+
// SecurityGroups *AWSSecurityGroups `json:"securityGroups"`
864+
SecurityGroups []AWSSecurityGroup `json:"securityGroups,omitempty"`
865+
866+
// managedSecurityGroup specifies whether the service load balancer should create
867+
// and manage security groups for the Network Load Balancer.
868+
//
869+
// +optional
870+
// +openshift:enable:FeatureGate=IngressNLBSecurityGroup
871+
ManagedSecurityGroup bool `json:"managedSecurityGroup,omitempty"`
846872
}
847873

848874
// EIPAllocation is an ID for an Elastic IP (EIP) address that can be allocated to an ELB in the AWS environment.

0 commit comments

Comments
 (0)