We currently have all ListenerClass spec fields at the top level. Most are passed through to the Service and most are prefixed with service while others are not.
Perhaps we should consider one of these options:
- Prefix all fields that will be passed to
Service with service.
- Move
Service related fields down to serviceOverrides
- We need to consider if there are
Service fields that should not be overridable.
Option 1 (dismissed)
apiVersion: listeners.stackable.tech/v1alpha1
kind: ListenerClass
metadata:
name: aws-ec2-nlb-public
spec:
# 👇 This is not passed to the Service
preferredAddressType: HostnameConservative
serviceType: LoadBalancer
# 👇 prefix with `service`
serviceLoadBalancerClass: eks.amazonaws.com/nlb
serviceLoadBalancerAllocateNodePorts: false
# 👆
serviceExternalTrafficPolicy: Local
serviceAnotations: {}
Option 2 (dismissed)
apiVersion: listeners.stackable.tech/v1alpha1
kind: ListenerClass
metadata:
name: aws-ec2-nlb-public
spec:
# 👇 This remains unchanged, not passed to the Service
preferredAddressType: HostnameConservative
# 👇 New
serviceOverrides:
type: LoadBalancer
loadBalancerClass: eks.amazonaws.com/nlb
loadBalancerAllocateNodePorts: false
externalTrafficPolicy: Local
annotations: {}
Option 3 (approved)
apiVersion: listeners.stackable.tech/v1alpha1
kind: ListenerClass
metadata:
name: aws-ec2-nlb-public
spec:
# 👇 This remains unchanged, not passed to the Service
preferredAddressType: HostnameConservative
# 👇 New
serviceOverrides:
<service object>
metadata:
annotations:
spec:
type: LoadBalancer
loadBalancerClass: eks.amazonaws.com/nlb
allocateLoadBalancerNodePorts: false
externalTrafficPolicy: Local
We currently have all
ListenerClassspec fields at the top level. Most are passed through to theServiceand most are prefixed withservicewhile others are not.Perhaps we should consider one of these options:
Servicewithservice.Servicerelated fields down toserviceOverridesServicefields that should not be overridable.Option 1 (dismissed)
Option 2 (dismissed)
Option 3 (approved)