Skip to content

Pull NetworkConfig logic out of Revision controller #1242

@mattmoor

Description

@mattmoor

I'd rather have the controllers' use of informers focused on reconciliation. In the case of the NetworkConfig, I feel like we could do this by:

  1. Exposing SetNetworkConfig on the revision controller
  2. In cmd/controller/main.go doing something like:
    configMapInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
        UpdateFunc: func(_, obj interface{}) {
            configMap := obj.(*corev1.ConfigMap)
            if isNetworkConfig(configMap) {
                revisionController.SetNetworkConfig(NewNetworkConfigFromConfigMap(configMap))
                return
            }
            // handle other configmaps being routed to other controllers
        })

Metadata

Metadata

Assignees

Labels

area/APIAPI objects and controllersarea/networkingkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions