-
Notifications
You must be signed in to change notification settings - Fork 0
/
handle-namespaces.go
30 lines (29 loc) · 1.15 KB
/
handle-namespaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package k8sinformers
// func xxx() {
// log.Debug().Str("ns", obj.(*corev1.Namespace).Name).Msg("add namespace")
// ingressInformer := informernetv1.NewIngressInformer(kif, obj.(*corev1.Namespace).Name, time.Minute, indexers)
// ingressInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
// AddFunc: func(obj interface{}) {
// handler.AddFunc(obj)
// },
// UpdateFunc: func(oldObj, newObj interface{}) {
// handler.UpdateFunc(oldObj, newObj)
// },
// DeleteFunc: func(obj interface{}) {
// handler.DeleteFunc(obj)
// },
// })
// s3BackendInformer := NewS3BackendInformer(dienerApi, obj.(*corev1.Namespace).Name, handler)
// namespacedInformers.addSubInformer(obj.(*corev1.Namespace).Name, subInformer{
// ingressInformer: ingressInformer,
// s3BackendInformer: s3BackendInformer,
// })
// go func() {
// log.Info().Str("ns", obj.(*corev1.Namespace).Name).Msg("starting ingress informer")
// ingressInformer.Run(wait.NeverStop)
// }()
// go func() {
// log.Info().Str("ns", obj.(*corev1.Namespace).Name).Msg("starting S3Backend informer")
// k8scrds.WatchS3Backends(dienerApi, obj.(*corev1.Namespace).Name, handler)
// }()
// }