Skip to content

Commit 32600bf

Browse files
authored
Merge pull request crossplane-contrib#2215 from saiharsha-plivo/elbv2-listenerrule-support
feat(elbv2): Add ListenerRule resource
2 parents 8dea288 + afe2ccd commit 32600bf

File tree

13 files changed

+3324
-6
lines changed

13 files changed

+3324
-6
lines changed

apis/elbv2/generator-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ ignore:
88
# Type has a json key of type_, so it's reimplemented with loadBalancerType
99
- CreateLoadBalancerInput.Type
1010
- DescribeListenersInput.LoadBalancerArn
11-
resource_names:
12-
- Rule
11+
- CreateRuleInput.ListenerArn
12+
- CreateRuleInput.Priority
1313
resources:
1414
Listener:
1515
exceptions:
@@ -26,6 +26,11 @@ resources:
2626
errors:
2727
404:
2828
code: TargetGroupNotFound
29+
Rule:
30+
exceptions:
31+
errors:
32+
404:
33+
code: RuleNotFound
2934
# Since the Create* actions all return a list and we can't use the same return
3035
# type for Create and Generate* functions, use a noop statement here. This is a
3136
# bit hacky, but can't be helped without some way to configure this more

apis/elbv2/v1alpha1/custom_types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@ package v1alpha1
22

33
import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
44

5+
type CustomRuleParameters struct {
6+
// The Amazon Resource Name (ARN) of the listener.
7+
// +optional
8+
ListenerARN *string `json:"listenerARN,omitempty"`
9+
10+
// Reference to Listener for Listener ARN
11+
// +optional
12+
ListenerARNRef *xpv1.Reference `json:"listenerARNRef,omitempty"`
13+
14+
// Selector for references to Listener for Listener ARN
15+
// +optional
16+
ListenerARNSelector *xpv1.Selector `json:"listenerARNSelector,omitempty"`
17+
18+
// The priority for the rule , must be unique for each rule in the listener
19+
// +kubebuilder:validation:Required
20+
Priority *int64 `json:"priority"`
21+
}
22+
23+
type CustomRuleObservation struct{}
24+
525
// CustomCertificate includes custom fields about certificates.
626
type CustomCertificate struct {
727
// [HTTPS and TLS listeners] The default certificate for the listener.

0 commit comments

Comments
 (0)