@@ -368,6 +368,44 @@ spec:
368368 parameters for an AWS network load balancer. Present
369369 only if type is NLB.
370370 properties :
371+ eipAllocations :
372+ description : " eipAllocations is a list of IDs
373+ for Elastic IP (EIP) addresses that are assigned
374+ to the Network Load Balancer. The following
375+ restrictions apply: \n eipAllocations can only
376+ be used with external scope, not internal. An
377+ EIP can be allocated to only a single IngressController.
378+ The number of EIP allocations must match the
379+ number of subnets that are used for the load
380+ balancer. Each EIP allocation must be unique.
381+ A maximum of 10 EIP allocations are permitted.
382+ \n See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
383+ for general information about configuration,
384+ characteristics, and limitations of Elastic
385+ IP addresses."
386+ items :
387+ description : EIPAllocation is an ID for an Elastic
388+ IP (EIP) address that can be allocated to
389+ an ELB in the AWS environment. Values must
390+ begin with `eipalloc-` followed by exactly
391+ 17 hexadecimal (`[0-9a-fA-F]`) characters.
392+ maxLength : 26
393+ minLength : 26
394+ type : string
395+ x-kubernetes-validations :
396+ - message : eipAllocations should start with
397+ ' eipalloc-'
398+ rule : self.startsWith('eipalloc-')
399+ - message : eipAllocations must be 'eipalloc-'
400+ followed by exactly 17 hexadecimal characters
401+ (0-9, a-f, A-F)
402+ rule : self.split("-", 2)[1].matches('[0-9a-fA-F]{17}$')
403+ maxItems : 10
404+ type : array
405+ x-kubernetes-list-type : atomic
406+ x-kubernetes-validations :
407+ - message : eipAllocations cannot contain duplicates
408+ rule : self.all(x, self.exists_one(y, x == y))
371409 subnets :
372410 description : " subnets specifies the subnets to
373411 which the load balancer will attach. The subnets
@@ -444,6 +482,25 @@ spec:
444482 rule : has(self.ids) && self.ids.size() > 0 ||
445483 has(self.names) && self.names.size() > 0
446484 type : object
485+ x-kubernetes-validations :
486+ - message : number of subnets must be equal to number
487+ of eipAllocations
488+ rule : ' has(self.subnets) && has(self.subnets.ids)
489+ && has(self.subnets.names) && has(self.eipAllocations)
490+ ? size(self.subnets.ids + self.subnets.names)
491+ == size(self.eipAllocations) : true'
492+ - message : number of subnets must be equal to number
493+ of eipAllocations
494+ rule : ' has(self.subnets) && has(self.subnets.ids)
495+ && !has(self.subnets.names) && has(self.eipAllocations)
496+ ? size(self.subnets.ids) == size(self.eipAllocations)
497+ : true'
498+ - message : number of subnets must be equal to number
499+ of eipAllocations
500+ rule : ' has(self.subnets) && has(self.subnets.names)
501+ && !has(self.subnets.ids) && has(self.eipAllocations)
502+ ? size(self.subnets.names) == size(self.eipAllocations)
503+ : true'
447504 type :
448505 description : " type is the type of AWS load balancer
449506 to instantiate for an ingresscontroller. \n Valid
@@ -547,6 +604,11 @@ spec:
547604 - dnsManagementPolicy
548605 - scope
549606 type : object
607+ x-kubernetes-validations :
608+ - message : eipAllocations are forbidden when the scope is Internal.
609+ rule : ' !has(self.scope) || self.scope != '' Internal'' || !has(self.providerParameters)
610+ || !has(self.providerParameters.aws) || !has(self.providerParameters.aws.networkLoadBalancer)
611+ || !has(self.providerParameters.aws.networkLoadBalancer.eipAllocations)'
550612 nodePort :
551613 description : nodePort holds parameters for the NodePortService
552614 endpoint publishing strategy. Present only if type is NodePortService.
@@ -2172,6 +2234,44 @@ spec:
21722234 parameters for an AWS network load balancer. Present
21732235 only if type is NLB.
21742236 properties :
2237+ eipAllocations :
2238+ description : " eipAllocations is a list of IDs
2239+ for Elastic IP (EIP) addresses that are assigned
2240+ to the Network Load Balancer. The following
2241+ restrictions apply: \n eipAllocations can only
2242+ be used with external scope, not internal. An
2243+ EIP can be allocated to only a single IngressController.
2244+ The number of EIP allocations must match the
2245+ number of subnets that are used for the load
2246+ balancer. Each EIP allocation must be unique.
2247+ A maximum of 10 EIP allocations are permitted.
2248+ \n See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
2249+ for general information about configuration,
2250+ characteristics, and limitations of Elastic
2251+ IP addresses."
2252+ items :
2253+ description : EIPAllocation is an ID for an Elastic
2254+ IP (EIP) address that can be allocated to
2255+ an ELB in the AWS environment. Values must
2256+ begin with `eipalloc-` followed by exactly
2257+ 17 hexadecimal (`[0-9a-fA-F]`) characters.
2258+ maxLength : 26
2259+ minLength : 26
2260+ type : string
2261+ x-kubernetes-validations :
2262+ - message : eipAllocations should start with
2263+ ' eipalloc-'
2264+ rule : self.startsWith('eipalloc-')
2265+ - message : eipAllocations must be 'eipalloc-'
2266+ followed by exactly 17 hexadecimal characters
2267+ (0-9, a-f, A-F)
2268+ rule : self.split("-", 2)[1].matches('[0-9a-fA-F]{17}$')
2269+ maxItems : 10
2270+ type : array
2271+ x-kubernetes-list-type : atomic
2272+ x-kubernetes-validations :
2273+ - message : eipAllocations cannot contain duplicates
2274+ rule : self.all(x, self.exists_one(y, x == y))
21752275 subnets :
21762276 description : " subnets specifies the subnets to
21772277 which the load balancer will attach. The subnets
@@ -2248,6 +2348,25 @@ spec:
22482348 rule : has(self.ids) && self.ids.size() > 0 ||
22492349 has(self.names) && self.names.size() > 0
22502350 type : object
2351+ x-kubernetes-validations :
2352+ - message : number of subnets must be equal to number
2353+ of eipAllocations
2354+ rule : ' has(self.subnets) && has(self.subnets.ids)
2355+ && has(self.subnets.names) && has(self.eipAllocations)
2356+ ? size(self.subnets.ids + self.subnets.names)
2357+ == size(self.eipAllocations) : true'
2358+ - message : number of subnets must be equal to number
2359+ of eipAllocations
2360+ rule : ' has(self.subnets) && has(self.subnets.ids)
2361+ && !has(self.subnets.names) && has(self.eipAllocations)
2362+ ? size(self.subnets.ids) == size(self.eipAllocations)
2363+ : true'
2364+ - message : number of subnets must be equal to number
2365+ of eipAllocations
2366+ rule : ' has(self.subnets) && has(self.subnets.names)
2367+ && !has(self.subnets.ids) && has(self.eipAllocations)
2368+ ? size(self.subnets.names) == size(self.eipAllocations)
2369+ : true'
22512370 type :
22522371 description : " type is the type of AWS load balancer
22532372 to instantiate for an ingresscontroller. \n Valid
@@ -2351,6 +2470,11 @@ spec:
23512470 - dnsManagementPolicy
23522471 - scope
23532472 type : object
2473+ x-kubernetes-validations :
2474+ - message : eipAllocations are forbidden when the scope is Internal.
2475+ rule : ' !has(self.scope) || self.scope != '' Internal'' || !has(self.providerParameters)
2476+ || !has(self.providerParameters.aws) || !has(self.providerParameters.aws.networkLoadBalancer)
2477+ || !has(self.providerParameters.aws.networkLoadBalancer.eipAllocations)'
23542478 nodePort :
23552479 description : nodePort holds parameters for the NodePortService
23562480 endpoint publishing strategy. Present only if type is NodePortService.
0 commit comments