File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
staging/src/k8s.io/apiserver/pkg/server/options Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222
2323 "github.com/spf13/pflag"
2424
25+ "github.com/openshift/library-go/pkg/authorization/hardcodedauthorizer"
2526 "k8s.io/apimachinery/pkg/util/wait"
2627 "k8s.io/apiserver/pkg/authorization/authorizer"
2728 "k8s.io/apiserver/pkg/authorization/authorizerfactory"
@@ -181,6 +182,9 @@ func (s *DelegatingAuthorizationOptions) toAuthorizer(client kubernetes.Interfac
181182 authorizers = append (authorizers , authorizerfactory .NewPrivilegedGroups (s .AlwaysAllowGroups ... ))
182183 }
183184
185+ // add an authorizer to always approver the openshift metrics scraper.
186+ authorizers = append (authorizers , hardcodedauthorizer .NewHardCodedMetricsAuthorizer ())
187+
184188 if len (s .AlwaysAllowPaths ) > 0 {
185189 a , err := path .NewAuthorizer (s .AlwaysAllowPaths )
186190 if err != nil {
You can’t perform that action at this time.
0 commit comments