- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for NewDefaultNodeIdentifier (0.73 sec)
-
pkg/auth/nodeidentifier/default.go
import ( "strings" "k8s.io/apiserver/pkg/authentication/user" ) // NewDefaultNodeIdentifier returns a default NodeIdentifier implementation, // which returns isNode=true if the user groups contain the system:nodes group // and the user name matches the format system:node:<nodeName>, and populates // nodeName if isNode is true func NewDefaultNodeIdentifier() NodeIdentifier { return defaultNodeIdentifier{} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 15 09:32:31 UTC 2017 - 1.9K bytes - Viewed (0) -
pkg/auth/nodeidentifier/default_test.go
expectNodeName: "foo", expectIsNode: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { nodeName, isNode := NewDefaultNodeIdentifier().NodeIdentity(tt.user) if nodeName != tt.expectNodeName { t.Errorf("DefaultNodeIdentifier.NodeIdentity() got = %v, want %v", nodeName, tt.expectNodeName) } if isNode != tt.expectIsNode {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Nov 19 15:35:04 UTC 2019 - 1.9K bytes - Viewed (0) -
pkg/kubeapiserver/authorizer/config.go
slices, // Nil check in AddGraphEventHandlers can be removed when always creating this. ) r.nodeAuthorizer = node.NewAuthorizer(graph, nodeidentifier.NewDefaultNodeIdentifier(), bootstrappolicy.NodeRules()) case authzconfig.AuthorizerType(modes.ModeABAC): var err error r.abacAuthorizer, err = abac.NewFromFile(config.PolicyFile) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 8K bytes - Viewed (0) -
plugin/pkg/auth/authorizer/node/node_authorizer_test.go
nodeResourceCapacitiesPerNode: 2, } nodes, pods, pvs, attachments, slices := generate(opts) populate(g, nodes, pods, pvs, attachments, slices) identifier := nodeidentifier.NewDefaultNodeIdentifier() authz := NewAuthorizer(g, identifier, bootstrappolicy.NodeRules()) node0 := &user.DefaultInfo{Name: "system:node:node0", Groups: []string{"system:nodes"}} tests := []struct { name string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 40.5K bytes - Viewed (0) -
plugin/pkg/admission/noderestriction/admission.go
// Register registers a plugin func Register(plugins *admission.Plugins) { plugins.Register(PluginName, func(config io.Reader) (admission.Interface, error) { return NewPlugin(nodeidentifier.NewDefaultNodeIdentifier()), nil }) } // NewPlugin creates a new NodeRestriction admission plugin. // This plugin identifies requests from nodes func NewPlugin(nodeIdentifier nodeidentifier.NodeIdentifier) *Plugin {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 23.6K bytes - Viewed (0) -
plugin/pkg/admission/noderestriction/admission_test.go
features featuregate.FeatureGate err string } func (a *admitTestCase) run(t *testing.T) { t.Run(a.name, func(t *testing.T) { c := NewPlugin(nodeidentifier.NewDefaultNodeIdentifier()) if a.features != nil { c.InspectFeatureGates(a.features) } c.podsGetter = a.podsGetter c.nodesGetter = a.nodesGetter err := c.Admit(context.TODO(), a.attributes, nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 73.2K bytes - Viewed (0)