Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"

"github.com/vmware-tanzu/nsx-operator/pkg/apis/legacy/v1alpha1"
crdv1alpha1 "github.com/vmware-tanzu/nsx-operator/pkg/apis/vpc/v1alpha1"
"github.com/vmware-tanzu/nsx-operator/pkg/config"
"github.com/vmware-tanzu/nsx-operator/pkg/controllers/gateway"
"github.com/vmware-tanzu/nsx-operator/pkg/controllers/inventory"
"github.com/vmware-tanzu/nsx-operator/pkg/controllers/ipaddressallocation"
namespacecontroller "github.com/vmware-tanzu/nsx-operator/pkg/controllers/namespace"
Expand Down Expand Up @@ -58,6 +60,7 @@ import (
"github.com/vmware-tanzu/nsx-operator/pkg/metrics"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/common"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/dns"
ipaddressallocationservice "github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/ipaddressallocation"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/vpc"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/util"
Expand All @@ -82,6 +85,7 @@ func init() {
utilruntime.Must(crdv1alpha1.AddToScheme(scheme))
utilruntime.Must(v1alpha1.AddToScheme(scheme))
utilruntime.Must(vmv1alpha1.AddToScheme(scheme))
utilruntime.Must(gatewayv1.Install(scheme))
config.AddFlags()

cf, err = config.NewNSXOperatorConfigFromFile()
Expand Down Expand Up @@ -192,6 +196,11 @@ func startServiceController(mgr manager.Manager, nsxClient *nsx.Client) {
log.Error(err, "Failed to initialize staticroute commonService", "controller", "StaticRoute")
os.Exit(1)
}
dnsRecordService, err := dns.InitializeDNSRecordService(commonService, vpcService)
if err != nil {
log.Error(err, "Failed to initialize DNS record service", "controller", "DNS")
os.Exit(1)
}
ipblocksInfoService := ipblocksinfo.InitializeIPBlocksInfoService(commonService, subnetService)

subnetBindingService, err := subnetbindingservice.InitializeService(commonService)
Expand Down Expand Up @@ -230,7 +239,7 @@ func startServiceController(mgr manager.Manager, nsxClient *nsx.Client) {
subnetSetReconcile = subnetset.NewSubnetSetReconciler(mgr, subnetService, subnetPortService, vpcService, subnetBindingService)
reconcilerList = append(
reconcilerList,
networkinfocontroller.NewNetworkInfoReconciler(mgr, vpcService, ipblocksInfoService),
networkinfocontroller.NewNetworkInfoReconciler(mgr, vpcService, ipblocksInfoService, dnsRecordService),
namespacecontroller.NewNamespaceReconciler(mgr, cf, vpcService, subnetService, subnetPortService),
subnet.NewSubnetReconciler(mgr, subnetService, subnetPortService, vpcService, subnetBindingService),
subnetSetReconcile,
Expand All @@ -241,7 +250,8 @@ func startServiceController(mgr manager.Manager, nsxClient *nsx.Client) {
subnetport.NewSubnetPortReconciler(mgr, subnetPortService, subnetService, vpcService, ipAddressAllocationService),
pod.NewPodReconciler(mgr, subnetPortService, subnetService, vpcService, nodeService),
networkpolicycontroller.NewNetworkPolicyReconciler(mgr, commonService, vpcService),
service.NewServiceLbReconciler(mgr, commonService),
service.NewServiceLbReconciler(mgr, commonService, dnsRecordService),
gateway.NewGatewayReconciler(mgr, dnsRecordService),
subnetbindingcontroller.NewReconciler(mgr, subnetService, subnetBindingService),
subnetipreservationcontroller.NewReconciler(mgr, subnetIPReservationService, subnetService),
)
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ require (
github.com/vmware/govmomi v0.53.1
github.com/vmware/vsphere-automation-sdk-go/lib v0.8.0
github.com/vmware/vsphere-automation-sdk-go/runtime v0.8.0
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260310075027-d32fca6a7b22
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260310075027-d32fca6a7b22
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260429104618-0417fff4645f
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260429104618-0417fff4645f
go.uber.org/automaxprocs v1.6.0
go.uber.org/zap v1.27.1
golang.org/x/crypto v0.50.0
golang.org/x/net v0.53.0
golang.org/x/sync v0.20.0
golang.org/x/time v0.14.0
gopkg.in/ini.v1 v1.67.1
Expand All @@ -55,6 +56,7 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible
go.openly.dev/pointy v1.3.0
go.uber.org/mock v0.6.0
sigs.k8s.io/gateway-api v1.5.0
)

require (
Expand All @@ -63,7 +65,6 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.1 // indirect
Expand Down Expand Up @@ -96,7 +97,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/ginkgo/v2 v2.28.1 // indirect
github.com/onsi/gomega v1.39.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.5 // indirect
Expand All @@ -108,7 +108,6 @@ require (
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/term v0.42.0 // indirect
Expand Down
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsP
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k=
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
Expand Down Expand Up @@ -175,10 +175,10 @@ github.com/vmware/vsphere-automation-sdk-go/lib v0.8.0 h1:u1SXOTM6D4Ygb3jeidj2Rd
github.com/vmware/vsphere-automation-sdk-go/lib v0.8.0/go.mod h1:8d5JTwjpM/Z03n/IZb0fwmXkJNWvWwuLXBqoakqYio4=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.8.0 h1:KnDIX9LY0nru7iMQTg0sy9vChhyorPo5OdASM2MaAcI=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.8.0/go.mod h1:DzLetYAmw1+vj7bqElRWEpuy40WYE/woL3alsymYa/c=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260310075027-d32fca6a7b22 h1:yDMJj+UG0u9aDdC0Q1byw8QEjfPd8gm7QKB2mo2oU1I=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260310075027-d32fca6a7b22/go.mod h1:C3JVOHRVLrGBQ8kTWAiGYlRz5UQC5qAcTdt3tvA+5P0=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260310075027-d32fca6a7b22 h1:SKbUc9p+LFUwtPvjk9WCwrjstN6NpewgPx4eWSIZq+k=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260310075027-d32fca6a7b22/go.mod h1:ugk9I4YM62SSAox57l5NAVBCRIkPQ1RNLb3URxyTADc=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260429104618-0417fff4645f h1:giI6VdAbSQ40fwpRjLow2S9iWNJ3ywJAST61WJ9ZxZU=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20260429104618-0417fff4645f/go.mod h1:C3JVOHRVLrGBQ8kTWAiGYlRz5UQC5qAcTdt3tvA+5P0=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260429104618-0417fff4645f h1:Y3Nn/DkcjEZFBGAoXRPj6r8Q4Av8ZL2mwXdgL1hpETk=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20260429104618-0417fff4645f/go.mod h1:ugk9I4YM62SSAox57l5NAVBCRIkPQ1RNLb3URxyTADc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
Expand Down Expand Up @@ -293,6 +293,8 @@ k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0x
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80=
sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0=
sigs.k8s.io/gateway-api v1.5.0 h1:duoo14Ky/fJXpjpmyMISE2RTBGnfCg8zICfTYLTnBJA=
sigs.k8s.io/gateway-api v1.5.0/go.mod h1:GvCETiaMAlLym5CovLxGjS0NysqFk3+Yuq3/rh6QL2o=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
Expand Down
11 changes: 11 additions & 0 deletions pkg/clean/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/vmware-tanzu/nsx-operator/pkg/logger"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/common"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/dns"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/inventory"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/ipaddressallocation"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/nsxserviceaccount"
Expand Down Expand Up @@ -115,6 +116,10 @@ func InitializeCleanupService(cf *config.NSXOperatorConfig, nsxClient *nsx.Clien
if err != nil {
return nil, err
}
dnsRecordService, err := dns.InitializeDNSRecordService(commonService, vpcService)
if err != nil {
return nil, err
}
subnetPortService, err := subnetport.InitializeSubnetPort(commonService, vpcService, ipAddressAllocationService)
if err != nil {
return nil, err
Expand Down Expand Up @@ -155,6 +160,11 @@ func InitializeCleanupService(cf *config.NSXOperatorConfig, nsxClient *nsx.Clien
return ipAddressAllocationService, nil
}
}
wrapInitializeDNSRecordService := func(service common.Service) cleanupFunc {
return func() (interface{}, error) {
return dnsRecordService, nil
}
}
wrapInitializeSubnetBinding := func(service common.Service) cleanupFunc {
return func() (interface{}, error) {
return subnetbinding.InitializeService(service)
Expand Down Expand Up @@ -213,6 +223,7 @@ func InitializeCleanupService(cf *config.NSXOperatorConfig, nsxClient *nsx.Clien
loggedAdd("StaticRoute", wrapInitializeStaticRoute(commonService))
loggedAdd("VPC", wrapInitializeVPC(commonService))
loggedAdd("IPAddressAllocation", wrapInitializeIPAddressAllocation(commonService))
loggedAdd("DNSRecord", wrapInitializeDNSRecordService(commonService))
loggedAdd("Inventory", wrapInitializeInventory(commonService))
loggedAdd("LBInfraCleaner", wrapInitializeLBInfraCleaner(commonService))
loggedAdd("HealthCleaner", wrapInitializeHealthCleaner(commonService))
Expand Down
9 changes: 8 additions & 1 deletion pkg/clean/clean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/vmware-tanzu/nsx-operator/pkg/config"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/common"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/dns"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/inventory"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/ipaddressallocation"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/nsxserviceaccount"
Expand Down Expand Up @@ -187,6 +188,9 @@ func TestInitializeCleanupService_Success(t *testing.T) {
patches.ApplyFunc(ipaddressallocation.InitializeIPAddressAllocation, func(service common.Service, vpcService common.VPCServiceProvider, flag bool) (*ipaddressallocation.IPAddressAllocationService, error) {
return &ipaddressallocation.IPAddressAllocationService{}, nil
})
patches.ApplyFunc(dns.InitializeDNSRecordService, func(service common.Service, vpcService common.VPCServiceProvider) (*dns.DNSRecordService, error) {
return &dns.DNSRecordService{}, nil
})
patches.ApplyFunc(subnetbinding.InitializeService, func(service common.Service) (*subnetbinding.BindingService, error) {
return &subnetbinding.BindingService{}, nil
})
Expand Down Expand Up @@ -216,7 +220,7 @@ func TestInitializeCleanupService_Success(t *testing.T) {
// vpcPreCleaners: SubnetPort, SubnetBinding, SubnetIPReservation, Inventory, SecurityPolicy, LBInfraCleaner, NSXServiceAccount, HealthCleaner = 8
assert.Len(t, cleanupService.vpcPreCleaners, 7)
assert.Len(t, cleanupService.vpcChildrenCleaners, 5)
assert.Len(t, cleanupService.infraCleaners, 2)
assert.Len(t, cleanupService.infraCleaners, 3)
}

func TestInitializeCleanupService_VPCError(t *testing.T) {
Expand Down Expand Up @@ -245,6 +249,9 @@ func TestInitializeCleanupService_VPCError(t *testing.T) {
patches.ApplyFunc(ipaddressallocation.InitializeIPAddressAllocation, func(service common.Service, vpcService common.VPCServiceProvider, flag bool) (*ipaddressallocation.IPAddressAllocationService, error) {
return &ipaddressallocation.IPAddressAllocationService{}, nil
})
patches.ApplyFunc(dns.InitializeDNSRecordService, func(service common.Service, vpcService common.VPCServiceProvider) (*dns.DNSRecordService, error) {
return &dns.DNSRecordService{}, nil
})
patches.ApplyFunc(subnetbinding.InitializeService, func(service common.Service) (*subnetbinding.BindingService, error) {
return &subnetbinding.BindingService{}, nil
})
Expand Down
4 changes: 4 additions & 0 deletions pkg/controllers/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const (
MetricResTypeNode = "node"
MetricResTypeServiceLb = "servicelb"
MetricResTypeStatefulSet = "statefulset"
MetricResTypeGateway = "gateway"
MaxConcurrentReconciles = 8
NSXOperatorError = "nsx-op/error"
//sync the error with NCP side
Expand All @@ -35,6 +36,9 @@ const (

LabelK8sMasterRole = "node-role.kubernetes.io/master"
LabelK8sControlRole = "node-role.kubernetes.io/control-plane"

ManagedK8sGatewayClassIstio = "istio"
ManagedK8sGatewayClassAviLB = "avi-lb"
)

var (
Expand Down
54 changes: 54 additions & 0 deletions pkg/controllers/gateway/dns_owner_endpoints.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* Copyright © 2026 Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0 */

package gateway

import (
"k8s.io/apimachinery/pkg/types"

"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/dns"
extdns "github.com/vmware-tanzu/nsx-operator/pkg/third_party/externaldns/endpoint"
)

// Route DNS: hostnames + ipCache → extdns.Endpoint.
// Gateway annotation-hostname DNS (collectGatewayEndpointsByAnnotation / buildEndpointsFromAnnotations)
// was moved to dns-networkinfo-hostname to separate the hostname-conflict-resolution feature.

type parentGatewayMatch struct {
nn types.NamespacedName
filter string
ips extdns.Targets
}

func mergeTargetsUnion(a, b extdns.Targets) extdns.Targets {
return extdns.NewTargets(append(append([]string(nil), a...), b...)...)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the nil val needed? Won't this add a literal nil entry in?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[]string(nil) equals to the below var s []string, but we don't need to introduce a dedicated temporary variable s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense. Bit tricky to read.

}

// buildRouteDNSMergedEndpoints builds owner-scoped Route DNS rows (Gateway or ListenerSet→root Gateway, same rules as aggregation).
func (a routeReconcilerAdapter[PT, T]) buildRouteDNSMergedEndpoints(route PT) (*dns.AggregatedDNSEndpoints, map[string]string, error) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the routeReconcilerAdapter type? I thought it'd be in the same file as the methods defined on it. Can we keep them together?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean move the existing code in this file to route_subreconciler.go ?

owner := route.GetResourceRef()
eps, allowed, err := a.reconciler.buildRouteDNSEndpointsForAggregation(route.GetNamespace(), owner, route.GetParentRefs(), route.GetRouteParentStatus(), route.GetObjectMeta(), route.GetSpecHostnames())
if err != nil || len(eps) == 0 {
return nil, allowed, err
}
return dns.NewOwnerScopedAggregatedRouteDNS(owner, eps), allowed, nil
}

// buildEndpoints appends extdns endpoints per hostname; sets EndpointLabelParentGateway to gatewayLabel (comma-separated if merged).
func buildEndpoints(out *[]*extdns.Endpoint, hostnames []string, targets extdns.Targets, parentGatewayLabel string) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this func follows an output param pattern while most everything else follows returning vals.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually to append the generated Endpoints to an existing slice, the caller is within a for-loop.

ttl := extdns.TTL(0)
for _, h := range hostnames {
if h == "" {
continue
}
for _, ep := range extdns.EndpointsForHostname(h, targets, ttl) {
if ep == nil {
continue
}
if parentGatewayLabel != "" {
ep.WithLabel(dns.EndpointLabelParentGateway, parentGatewayLabel)
}
*out = append(*out, ep)
}
}
}
Loading
Loading