Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for toApplyPolicyRules (0.34 sec)

  1. pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go

    	return err
    }
    
    func (c *ClusterRoleAggregationController) applyClusterRoles(ctx context.Context, name string, newPolicyRules []rbacv1.PolicyRule) error {
    	clusterRoleApply := rbacv1ac.ClusterRole(name).
    		WithRules(toApplyPolicyRules(newPolicyRules)...)
    
    	opts := metav1.ApplyOptions{FieldManager: "clusterrole-aggregation-controller", Force: true}
    	_, err := c.clusterRoleClient.ClusterRoles().Apply(ctx, clusterRoleApply, opts)
    	return err
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. pkg/controller/clusterroleaggregation/clusterroleaggregation_controller_test.go

    		ret := rbacv1ac.ClusterRole("combined")
    
    		var r []*rbacv1ac.PolicyRuleApplyConfiguration
    		for _, currRules := range rules {
    			r = append(r, toApplyPolicyRules(currRules)...)
    		}
    		ret.WithRules(r...)
    		return ret
    	}
    
    	tests := []struct {
    		name                     string
    		startingClusterRoles     []*rbacv1.ClusterRole
    		clusterRoleToSync        string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top