Skip to content

Commit

Permalink
allow operator to manage resources in pipelinesascode.tekton.dev group
Browse files Browse the repository at this point in the history
Signed-off-by: Jeeva Kandasamy <[email protected]>
  • Loading branch information
jkandasa committed Sep 14, 2023
1 parent 6afdbc1 commit 067d46d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/openshift/base/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ rules:
- tekton.dev
- triggers.tekton.dev
- operator.tekton.dev
- pipelinesascode.tekton.dev
resources:
- '*'
verbs:
Expand Down
6 changes: 5 additions & 1 deletion pkg/reconciler/shared/tektonconfig/upgrade/post_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package upgrade
import (
"context"

"github.com/tektoncd/operator/pkg/apis/operator/v1alpha1"
"github.com/tektoncd/operator/pkg/client/clientset/versioned"
upgrade "github.com/tektoncd/operator/pkg/reconciler/shared/tektonconfig/upgrade/helper"
"go.uber.org/zap"
Expand All @@ -43,7 +44,6 @@ func upgradeStorageVersion(ctx context.Context, logger *zap.SugaredLogger, k8sCl
"interceptors.triggers.tekton.dev",
"pipelineruns.tekton.dev",
"pipelines.tekton.dev",
"repositories.pipelinesascode.tekton.dev",
"resolutionrequests.resolution.tekton.dev",
"taskruns.tekton.dev",
"tasks.tekton.dev",
Expand All @@ -53,6 +53,10 @@ func upgradeStorageVersion(ctx context.Context, logger *zap.SugaredLogger, k8sCl
"verificationpolicies.tekton.dev",
}

if v1alpha1.IsOpenShiftPlatform() {
crdGroups = append(crdGroups, "repositories.pipelinesascode.tekton.dev")
}

migrator := storageversion.NewMigrator(
dynamic.NewForConfigOrDie(restConfig),
apixclient.NewForConfigOrDie(restConfig),
Expand Down

0 comments on commit 067d46d

Please sign in to comment.