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