Skip to content

Commit

Permalink
Fix permission using watch-namespace
Browse files Browse the repository at this point in the history
Command-line option `--watch-namespace` configures the controller to read and use ingress objects from a single namespace. This would require fewer permissions,however the launch process tries to read the specified namespace, and such reading requires cluster wide permission. The launch process was updated to read an ingress resource instead.
  • Loading branch information
jcmoraisjr committed May 11, 2020
1 parent 94be859 commit ab5e475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/common/ingress/controller/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func NewIngressController(backend ingress.Controller) *GenericController {
}

if *watchNamespace != "" {
_, err = kubeClient.CoreV1().Namespaces().Get(*watchNamespace, metav1.GetOptions{})
_, err = kubeClient.ExtensionsV1beta1().Ingresses(*watchNamespace).List(metav1.ListOptions{Limit: 1})
if err != nil {
glog.Fatalf("no watchNamespace with name %v found: %v", *watchNamespace, err)
}
Expand Down

0 comments on commit ab5e475

Please sign in to comment.