Skip to content

Commit

Permalink
Fix apache#1286: regen vfs and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Feb 22, 2020
1 parent 2e53536 commit 59b537b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions deploy/resources.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions pkg/install/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/rbac/v1beta1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"

Expand Down Expand Up @@ -126,7 +127,10 @@ func OperatorOrCollect(ctx context.Context, c client.Client, cfg OperatorConfigu
return installKnative(ctx, c, cfg.Namespace, customizer, collection, force)
}

if errevt := installEvents(ctx, c, cfg.Namespace, customizer, collection); errevt != nil {
if errevt := installEvents(ctx, c, cfg.Namespace, customizer, collection, force); errevt != nil {
if k8serrors.IsAlreadyExists(err) {
return err
}
fmt.Println("Warning: the operator will not be able to publish Kubernetes events. Try installing as cluster-admin to allow it to generate events.")
}

Expand Down Expand Up @@ -158,8 +162,8 @@ func installKnative(ctx context.Context, c client.Client, namespace string, cust
)
}

func installEvents(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection) error {
return ResourcesOrCollect(ctx, c, namespace, collection, customizer,
func installEvents(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error {
return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer,
"operator-role-events.yaml",
"operator-role-binding-events.yaml",
)
Expand Down

0 comments on commit 59b537b

Please sign in to comment.