@@ -203,13 +203,18 @@ func (a *Adapter) newIngress(typ IngressType, metadata kubeItemMetadata, host st
203203 }
204204
205205 ipAddressType := a .ingressIpAddressType
206- if annotation := getAnnotationsString (annotations , ingressALBIPAddressType , "" ); annotation == aws .IPAddressTypeDualstack {
207- ipAddressType = aws .IPAddressTypeDualstack
208- } else if annotation == aws .IPAddressTypeIPV4 {
209- ipAddressType = aws .IPAddressTypeIPV4
206+ ingressALBAnnotation := getAnnotationsString (annotations , ingressALBIPAddressType , "" )
207+ if ingressALBAnnotation != "" {
208+ log .Warnf ("Deprecated annotation %q in use for %q resource named %q in namespace %q" , ingressALBIPAddressType , typ , metadata .Name , metadata .Namespace )
209+ switch ingressALBAnnotation {
210+ case aws .IPAddressTypeDualstack :
211+ ipAddressType = aws .IPAddressTypeDualstack
212+ case aws .IPAddressTypeIPV4 :
213+ ipAddressType = aws .IPAddressTypeIPV4
214+ }
210215 }
211216
212- if annotation := getAnnotationsString (annotations , ingressNLBIPAddressType , "" ); annotation == aws .IPAddressTypeDualstack {
217+ if annotation := getAnnotationsString (annotations , ingressIPAddressType , "" ); annotation == aws .IPAddressTypeDualstack {
213218 ipAddressType = aws .IPAddressTypeDualstack
214219 } else if annotation == aws .IPAddressTypeIPV4 {
215220 ipAddressType = aws .IPAddressTypeIPV4
0 commit comments