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

[OpenShift] Fix forbidden error for community tasks #514

Merged
merged 1 commit into from
Nov 22, 2021
Merged
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
14 changes: 8 additions & 6 deletions pkg/reconciler/openshift/tektonaddon/tektonaddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,17 @@ func (r *Reconciler) ensureClusterTasks(ctx context.Context, ta *v1alpha1.Tekton
communityClusterTaskManifest := r.manifest

if err := r.appendCommunityTarget(ctx, &communityClusterTaskManifest, ta); err != nil {
return err
}
// Continue if failed to resolve community task URL.
// (Ex: on disconnected cluster community tasks won't be reachable because of proxy).
logging.FromContext(ctx).Error("Failed to get community task: Skipping community tasks installation ", err)
} else {
if err := r.communityTransform(ctx, &communityClusterTaskManifest, ta); err != nil {
return err
}

if err := r.communityTransform(ctx, &communityClusterTaskManifest, ta); err != nil {
return err
clusterTaskManifest = clusterTaskManifest.Append(communityClusterTaskManifest)
}

clusterTaskManifest = clusterTaskManifest.Append(communityClusterTaskManifest)

if err := createInstallerSet(ctx, r.operatorClientSet, ta, clusterTaskManifest,
r.version, clusterTaskInstallerSet, "addon-clustertasks"); err != nil {
return err
Expand Down