Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for CreateOrUpdateClusterRoleBinding (0.46 sec)

  1. cmd/kubeadm/app/phases/bootstraptoken/node/tlsbootstrap.go

    	fmt.Println("[bootstrap-token] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials")
    
    	return apiclient.CreateOrUpdateClusterRoleBinding(client, &rbac.ClusterRoleBinding{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: constants.NodeKubeletBootstrap,
    		},
    		RoleRef: rbac.RoleRef{
    			APIGroup: rbac.GroupName,
    			Kind:     "ClusterRole",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Oct 15 10:49:52 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/apiclient/idempotency.go

    			}
    			return true, nil
    		})
    	if err == nil {
    		return nil
    	}
    	return lastError
    }
    
    // CreateOrUpdateClusterRoleBinding creates a ClusterRoleBinding if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.
    func CreateOrUpdateClusterRoleBinding(client clientset.Interface, clusterRoleBinding *rbac.ClusterRoleBinding) error {
    	var lastError error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/phases/addons/proxy/proxy.go

    	if !printManifest {
    		if err := apiclient.CreateOrUpdateServiceAccount(client, sa); err != nil {
    			return errors.Wrap(err, "error when creating kube-proxy service account")
    		}
    
    		if err := apiclient.CreateOrUpdateClusterRoleBinding(client, crb); err != nil {
    			return err
    		}
    
    		if err := apiclient.CreateOrUpdateRole(client, role); err != nil {
    			return err
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 26 13:23:44 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/phases/addons/dns/dns.go

    		return errors.Wrapf(err, "%s ClusterRoleBinding", unableToDecodeCoreDNS)
    	}
    
    	// Create the Clusterrolebindings for CoreDNS or update it in case it already exists
    	if err := apiclient.CreateOrUpdateClusterRoleBinding(client, coreDNSClusterRolesBinding); err != nil {
    		return err
    	}
    
    	coreDNSServiceAccount := &v1.ServiceAccount{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/util/apiclient/idempotency_test.go

    			},
    			expectedError: true,
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			client := clientsetfake.NewSimpleClientset()
    			tc.setupClient(client)
    			err := CreateOrUpdateClusterRoleBinding(client, &rbac.ClusterRoleBinding{})
    			if (err != nil) != tc.expectedError {
    				t.Fatalf("expected error: %v, got %v, error: %v", tc.expectedError, err != nil, err)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 33.2K bytes
    - Viewed (0)
Back to top