<commit_before>package kubernetes

import (
	"context"

	"github.com/kyma-project/kyma/components/busola-migrator/internal/model"

	"github.com/pkg/errors"
	apirbacv1 "k8s.io/api/rbac/v1"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
)

const (
	subjectKind  = "User"
	roleRefKind  = "ClusterRole"
	rbacAPIGroup = "rbac.authorization.k8s.io"
)

var rbacConfig = map[model.UserPermission]struct {
	clusterRoleBindingName string
	clusterRoleName        string
}{
	model.UserPermissionAdmin: {
		clusterRoleBindingName: "cluster-admin-users",
		clusterRoleName:        "kyma-admin",
	},
	model.UserPermissionDeveloper: {
		clusterRoleBindingName: "cluster-developer-users",
		clusterRoleName:        "kyma-essentials",
	},
}<commit_msg>Assign cluster-admin when migrating kyma namespace admins to kyma2 (#12446)<commit_after>package kubernetes

import (
	"context"

	"github.com/kyma-project/kyma/components/busola-migrator/internal/model"

	"github.com/pkg/errors"
	apirbacv1 "k8s.io/api/rbac/v1"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
)

const (
	subjectKind  = "User"
	roleRefKind  = "ClusterRole"
	rbacAPIGroup = "rbac.authorization.k8s.io"
)

var rbacConfig = map[model.UserPermission]struct {
	clusterRoleBindingName string
	clusterRoleName        string
}{
	model.UserPermissionAdmin: {
		clusterRoleBindingName: "cluster-admin-users",
		clusterRoleName:        "cluser-admin",
	},
	model.UserPermissionDeveloper: {
		clusterRoleBindingName: "cluster-developer-users",
		clusterRoleName:        "kyma-essentials",
	},
}
{'fraction_non_alphanumeric': 0.12873563218390804, 'fraction_numerical': 0.014942528735632184, 'mean_word_length': 4.526984126984127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7056067', 'n_tokens_mistral': 688, 'n_tokens_neox': 660, 'n_words': 85}