raising logging levels and removing dead code

This commit is contained in:
chrislovecnm 2017-07-25 14:55:26 -06:00
parent 83fb549a9d
commit fc0f20a020
4 changed files with 6 additions and 34 deletions

View File

@ -65,10 +65,8 @@ func (c *IngressController) Run() {
func (c *IngressController) runWatcher(stopCh <-chan struct{}) {
runOnce := func() (bool, error) {
var listOpts metav1.ListOptions
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
glog.V(4).Infof("querying without label filter")
ingressList, err := c.kubeClient.ExtensionsV1beta1().Ingresses("").List(listOpts)
if err != nil {
return false, fmt.Errorf("error listing ingresss: %v", err)
@ -80,10 +78,6 @@ func (c *IngressController) runWatcher(stopCh <-chan struct{}) {
}
c.scope.MarkReady()
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
listOpts.Watch = true
listOpts.ResourceVersion = ingressList.ResourceVersion
watcher, err := c.kubeClient.ExtensionsV1beta1().Ingresses("").Watch(listOpts)

View File

@ -65,28 +65,20 @@ func (c *NodeController) Run() {
func (c *NodeController) runWatcher(stopCh <-chan struct{}) {
runOnce := func() (bool, error) {
var listOpts metav1.ListOptions
glog.V(4).Infof("querying without field filter")
// Note we need to watch all the nodes, to set up alias targets
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
nodeList, err := c.kubeClient.CoreV1().Nodes().List(listOpts)
if err != nil {
return false, fmt.Errorf("error listing nodes: %v", err)
}
for i := range nodeList.Items {
node := &nodeList.Items[i]
glog.Infof("node: %v", node.Name)
glog.V(4).Infof("node: %v", node.Name)
c.updateNodeRecords(node)
}
c.scope.MarkReady()
// Note we need to watch all the nodes, to set up alias targets
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
listOpts.Watch = true
listOpts.ResourceVersion = nodeList.ResourceVersion
watcher, err := c.kubeClient.CoreV1().Nodes().Watch(listOpts)

View File

@ -66,10 +66,7 @@ func (c *PodController) Run() {
func (c *PodController) runWatcher(stopCh <-chan struct{}) {
runOnce := func() (bool, error) {
var listOpts metav1.ListOptions
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
glog.V(4).Infof("querying without label filter")
podList, err := c.kubeClient.CoreV1().Pods("").List(listOpts)
if err != nil {
return false, fmt.Errorf("error listing pods: %v", err)
@ -81,10 +78,6 @@ func (c *PodController) runWatcher(stopCh <-chan struct{}) {
}
c.scope.MarkReady()
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
listOpts.Watch = true
listOpts.ResourceVersion = podList.ResourceVersion
watcher, err := c.kubeClient.CoreV1().Pods("").Watch(listOpts)

View File

@ -64,10 +64,7 @@ func (c *ServiceController) Run() {
func (c *ServiceController) runWatcher(stopCh <-chan struct{}) {
runOnce := func() (bool, error) {
var listOpts metav1.ListOptions
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
glog.V(4).Infof("querying without label filter")
serviceList, err := c.kubeClient.CoreV1().Services("").List(listOpts)
if err != nil {
return false, fmt.Errorf("error listing services: %v", err)
@ -79,10 +76,6 @@ func (c *ServiceController) runWatcher(stopCh <-chan struct{}) {
}
c.scope.MarkReady()
glog.Warningf("querying without label filter")
//listOpts.LabelSelector = labels.Everything()
glog.Warningf("querying without field filter")
//listOpts.FieldSelector = fields.Everything()
listOpts.Watch = true
listOpts.ResourceVersion = serviceList.ResourceVersion
watcher, err := c.kubeClient.CoreV1().Services("").Watch(listOpts)