Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert rbac optim #2348

Merged
merged 6 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/common/scc.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ func GetSecurityClient(ctx context.Context) *security.Clientset {
return securityClient
}

func VerifySCCExists(ctx context.Context, sccName string, securityClient security.Interface) error {
func VerifySCCExists(ctx context.Context, sccName string, securityClient *security.Clientset) error {
_, err := securityClient.SecurityV1().SecurityContextConstraints().Get(ctx, sccName, metav1.GetOptions{})
return err
}

func GetSCCRestrictiveList(ctx context.Context, securityClient security.Interface) ([]*securityv1.SecurityContextConstraints, error) {
func GetSCCRestrictiveList(ctx context.Context, securityClient *security.Clientset) ([]*securityv1.SecurityContextConstraints, error) {
logger := logging.FromContext(ctx)
sccList, err := securityClient.SecurityV1().SecurityContextConstraints().List(ctx, metav1.ListOptions{})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
PipelineNotFound = "tekton-pipelines not installed"
TriggerNotReady = "tekton-triggers not ready"
TriggerNotFound = "tekton-triggers not installed"
NamespaceIgnorePattern = "^(openshift|kube|open-cluster-management|package-operator)-"
NamespaceIgnorePattern = "^(openshift|kube)-"
)

func PipelineReady(informer informer.TektonPipelineInformer) (*v1alpha1.TektonPipeline, error) {
Expand Down
4 changes: 0 additions & 4 deletions pkg/reconciler/openshift/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ const (
OperandOpenShiftPipelineAsCode = "openshift-pipeline-as-code"
// NamespaceSCCAnnotation is used to set SCC for a given namespace
NamespaceSCCAnnotation = "operator.tekton.dev/scc"

// RbacProvisioningMaxConcurrentCalls is used to set a go routine pool size when
// we reconcile namespaces and do rbac provisonning
RbacProvisioningMaxConcurrentCalls = "OCP_RBAC_MAX_CONCURRENT_CALLS"
)
3 changes: 2 additions & 1 deletion pkg/reconciler/openshift/tektonconfig/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func deleteInstallerSet(ctx context.Context, oc versioned.Interface, tc *v1alpha
// checkIfInstallerSetExist checks if installer set exists for a component and return true/false based on it
// and if installer set which already exist is of older version then it deletes and return false to create a new
// installer set
func checkIfInstallerSetExist(ctx context.Context, oc versioned.Interface, relVersion string) (*v1alpha1.TektonInstallerSet, error) {
func checkIfInstallerSetExist(ctx context.Context, oc versioned.Interface, relVersion string,
tc *v1alpha1.TektonConfig) (*v1alpha1.TektonInstallerSet, error) {

labelSelector, err := common.LabelSelector(rbacInstallerSetSelector)
if err != nil {
Expand Down
70 changes: 0 additions & 70 deletions pkg/reconciler/openshift/tektonconfig/init.go

This file was deleted.

45 changes: 0 additions & 45 deletions pkg/reconciler/openshift/tektonconfig/init_test.go

This file was deleted.

Loading