From 18d01ba900e65b03f29b05b1e8f8d1b1f8a71ce9 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 11:18:34 +0200 Subject: [PATCH 1/8] fix(operator): updated workload instance controller, added example Signed-off-by: Thomas Schuetz --- examples/single-service/deploy.yml | 34 ++++++ .../single-service/pre-deployment-tasks.yaml | 9 ++ .../v1alpha1/keptnworkloadinstance_types.go | 4 + .../keptnworkloadinstance/controller.go | 110 ++++-------------- .../keptnworkloadinstance/controller_test.go | 4 +- .../reconcile_deploymentstate.go | 98 ++++++++++++++++ .../reconcile_postdeployment.go | 26 ----- 7 files changed, 169 insertions(+), 116 deletions(-) create mode 100644 examples/single-service/deploy.yml create mode 100644 examples/single-service/pre-deployment-tasks.yaml create mode 100644 operator/controllers/keptnworkloadinstance/reconcile_deploymentstate.go diff --git a/examples/single-service/deploy.yml b/examples/single-service/deploy.yml new file mode 100644 index 0000000000..5fb26c9237 --- /dev/null +++ b/examples/single-service/deploy.yml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: test + name: test +spec: + replicas: 1 + selector: + matchLabels: + app: test + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: test + annotations: + keptn.sh/workload: waiter + keptn.sh/version: "0.2" + keptn.sh/app: waiter + keptn.sh/post-deployment-tasks: pre-deployment-hello + + spec: + containers: + - image: busybox + name: busybox + command: ['sh', '-c', 'echo The app is running! && sleep infinity'] + initContainers: + - name: init-myservice + image: busybox:1.28 + command: ['sh', '-c', 'sleep 30'] +status: {} diff --git a/examples/single-service/pre-deployment-tasks.yaml b/examples/single-service/pre-deployment-tasks.yaml new file mode 100644 index 0000000000..b0cb103501 --- /dev/null +++ b/examples/single-service/pre-deployment-tasks.yaml @@ -0,0 +1,9 @@ +apiVersion: lifecycle.keptn.sh/v1alpha1 +kind: KeptnTaskDefinition +metadata: + name: pre-deployment-hello +spec: + function: + inline: + code: | + console.log("Pre-Deployment Task has been executed"); diff --git a/operator/api/v1alpha1/keptnworkloadinstance_types.go b/operator/api/v1alpha1/keptnworkloadinstance_types.go index b7a3480c17..71a67271cc 100644 --- a/operator/api/v1alpha1/keptnworkloadinstance_types.go +++ b/operator/api/v1alpha1/keptnworkloadinstance_types.go @@ -86,3 +86,7 @@ func (i KeptnWorkloadInstance) IsPreDeploymentCompleted() bool { func (i KeptnWorkloadInstance) IsPostDeploymentCompleted() bool { return i.Status.PostDeploymentStatus.IsCompleted() } + +func (i KeptnWorkloadInstance) IsDeploymentCompleted() bool { + return i.Status.DeploymentStatus.IsCompleted() +} diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index 78df2aee78..c4783ee788 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -24,8 +24,6 @@ import ( "github.com/go-logr/logr" "github.com/google/uuid" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -91,41 +89,40 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr return reconcile.Result{}, fmt.Errorf("could not fetch KeptnWorkloadInstance: %+v", err) } - r.Log.Info("Workload Instance found", "instance", workloadInstance) - - if workloadInstance.IsPostDeploymentCompleted() { - return reconcile.Result{}, nil + if !workloadInstance.IsPreDeploymentCompleted() { + r.Log.Info("Pre deployment checks not finished") + err := r.reconcilePreDeployment(ctx, req, workloadInstance) + if err != nil { + r.Log.Error(err, "Error reconciling pre-deployment checks") + return ctrl.Result{}, err + } + return ctrl.Result{Requeue: true}, nil } - r.Log.Info("Post deployment checks not finished") - - isDeployed, err := r.UpdateWorkloadResourceDeploymentStatus(ctx, workloadInstance) - if err != nil { - return reconcile.Result{}, err + if !workloadInstance.IsDeploymentCompleted() { + r.Log.Info("Deployment not finished") + err := r.reconcileDeployment(ctx, workloadInstance) + if err != nil { + r.Log.Error(err, "Error reconciling deployment") + return ctrl.Result{}, err + } + return ctrl.Result{Requeue: true}, nil } - if isDeployed { + + if !workloadInstance.IsPostDeploymentCompleted() { err = r.reconcilePostDeployment(ctx, req, workloadInstance) if err != nil { r.Log.Error(err, "Error reconciling post-deployment checks") - return ctrl.Result{}, err + return ctrl.Result{Requeue: true}, err } return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil } - r.Log.Info("Deployment of pods not finished") - - if workloadInstance.IsPreDeploymentCompleted() { - r.Log.Info("Post deployment checks not finished") - return ctrl.Result{Requeue: true}, nil + if workloadInstance.IsPostDeploymentCompleted() { + return reconcile.Result{}, nil } - r.Log.Info("Pre deployment checks not finished") - - err = r.reconcilePreDeployment(ctx, req, workloadInstance) - if err != nil { - r.Log.Error(err, "Error reconciling pre-deployment checks") - return ctrl.Result{}, err - } + r.Log.Info("Post deployment checks not finished") return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil @@ -143,69 +140,6 @@ func (r *KeptnWorkloadInstanceReconciler) generateSuffix() string { return uid[:10] } -func (r *KeptnWorkloadInstanceReconciler) UpdateWorkloadResourceDeploymentStatus(ctx context.Context, workloadInstance *klcv1alpha1.KeptnWorkloadInstance) (bool, error) { - if workloadInstance.Status.DeploymentStatus == common.StateSucceeded { - return true, nil - } - if workloadInstance.Spec.ResourceReference.Kind == "Pod" { - isPodRunning, err := r.IsPodRunning(ctx, workloadInstance.Spec.ResourceReference, workloadInstance.Namespace) - if err != nil { - return isPodRunning, err - } - if isPodRunning { - workloadInstance.Status.DeploymentStatus = common.StateSucceeded - return true, r.Client.Status().Update(ctx, workloadInstance) - } - return false, nil - } - isReplicaRunning, err := r.IsReplicaSetRunning(ctx, workloadInstance.Spec.ResourceReference, workloadInstance.Namespace) - if err != nil { - return isReplicaRunning, err - } - if isReplicaRunning { - workloadInstance.Status.DeploymentStatus = common.StateSucceeded - return true, r.Client.Status().Update(ctx, workloadInstance) - } - return false, nil -} - -func (r *KeptnWorkloadInstanceReconciler) IsPodRunning(ctx context.Context, resource klcv1alpha1.ResourceReference, namespace string) (bool, error) { - podList := &corev1.PodList{} - if err := r.Client.List(ctx, podList, client.InNamespace(namespace)); err != nil { - return false, err - } - for _, p := range podList.Items { - if p.UID == resource.UID { - if p.Status.Phase == corev1.PodRunning { - return true, nil - } - return false, nil - } - } - return false, nil -} - -func (r *KeptnWorkloadInstanceReconciler) IsReplicaSetRunning(ctx context.Context, resource klcv1alpha1.ResourceReference, namespace string) (bool, error) { - replica := &appsv1.ReplicaSetList{} - if err := r.Client.List(ctx, replica, client.InNamespace(namespace)); err != nil { - return false, err - } - for _, re := range replica.Items { - if re.UID == resource.UID { - replicas, err := r.GetDesiredReplicas(ctx, re.OwnerReferences[0], namespace) - if err != nil { - return false, err - } - if re.Status.ReadyReplicas == replicas { - return true, nil - } - return false, nil - } - } - return false, nil - -} - func (r *KeptnWorkloadInstanceReconciler) getTaskStatus(taskName string, instanceStatus []klcv1alpha1.WorkloadTaskStatus) klcv1alpha1.WorkloadTaskStatus { for _, status := range instanceStatus { if status.TaskDefinitionName == taskName { diff --git a/operator/controllers/keptnworkloadinstance/controller_test.go b/operator/controllers/keptnworkloadinstance/controller_test.go index 2b7900d160..d8f1dfe910 100644 --- a/operator/controllers/keptnworkloadinstance/controller_test.go +++ b/operator/controllers/keptnworkloadinstance/controller_test.go @@ -20,7 +20,7 @@ func TestKeptnWorkloadInstanceReconciler_IsPodRunning(t *testing.T) { r := &KeptnWorkloadInstanceReconciler{ Client: fake.NewClientBuilder().WithLists(podList).Build(), } - isPodRunning, err := r.IsPodRunning(context.TODO(), v1alpha1.ResourceReference{UID: types.UID("pod1")}, "node1") + isPodRunning, err := r.isPodRunning(context.TODO(), v1alpha1.ResourceReference{UID: types.UID("pod1")}, "node1") testrequire.Nil(t, err) if !isPodRunning { t.Errorf("Wrong!") @@ -29,7 +29,7 @@ func TestKeptnWorkloadInstanceReconciler_IsPodRunning(t *testing.T) { r2 := &KeptnWorkloadInstanceReconciler{ Client: fake.NewClientBuilder().WithLists(podList2).Build(), } - isPodRunning, err = r2.IsPodRunning(context.TODO(), v1alpha1.ResourceReference{UID: types.UID("pod1")}, "node1") + isPodRunning, err = r2.isPodRunning(context.TODO(), v1alpha1.ResourceReference{UID: types.UID("pod1")}, "node1") testrequire.Nil(t, err) if isPodRunning { t.Errorf("Wrong!") diff --git a/operator/controllers/keptnworkloadinstance/reconcile_deploymentstate.go b/operator/controllers/keptnworkloadinstance/reconcile_deploymentstate.go new file mode 100644 index 0000000000..262e6df6f8 --- /dev/null +++ b/operator/controllers/keptnworkloadinstance/reconcile_deploymentstate.go @@ -0,0 +1,98 @@ +package keptnworkloadinstance + +import ( + "context" + klcv1alpha1 "github.com/keptn-sandbox/lifecycle-controller/operator/api/v1alpha1" + "github.com/keptn-sandbox/lifecycle-controller/operator/api/v1alpha1/common" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +func (r *KeptnWorkloadInstanceReconciler) reconcileDeployment(ctx context.Context, workloadInstance *klcv1alpha1.KeptnWorkloadInstance) error { + if workloadInstance.Spec.ResourceReference.Kind == "Pod" { + isPodRunning, err := r.isPodRunning(ctx, workloadInstance.Spec.ResourceReference, workloadInstance.Namespace) + if err != nil { + return err + } + if isPodRunning { + workloadInstance.Status.DeploymentStatus = common.StateSucceeded + } + } + + isReplicaRunning, err := r.isReplicaSetRunning(ctx, workloadInstance.Spec.ResourceReference, workloadInstance.Namespace) + if err != nil { + return err + } + if isReplicaRunning { + workloadInstance.Status.DeploymentStatus = common.StateSucceeded + } + + err = r.Client.Status().Update(ctx, workloadInstance) + if err != nil { + return err + } + return nil +} + +func (r *KeptnWorkloadInstanceReconciler) isReplicaSetRunning(ctx context.Context, resource klcv1alpha1.ResourceReference, namespace string) (bool, error) { + replica := &appsv1.ReplicaSetList{} + if err := r.Client.List(ctx, replica, client.InNamespace(namespace)); err != nil { + return false, err + } + for _, re := range replica.Items { + if re.UID == resource.UID { + replicas, err := r.getDesiredReplicas(ctx, re.OwnerReferences[0], namespace) + if err != nil { + return false, err + } + if re.Status.ReadyReplicas == replicas { + return true, nil + } + return false, nil + } + } + return false, nil + +} + +func (r *KeptnWorkloadInstanceReconciler) isPodRunning(ctx context.Context, resource klcv1alpha1.ResourceReference, namespace string) (bool, error) { + podList := &corev1.PodList{} + if err := r.Client.List(ctx, podList, client.InNamespace(namespace)); err != nil { + return false, err + } + for _, p := range podList.Items { + if p.UID == resource.UID { + if p.Status.Phase == corev1.PodRunning { + return true, nil + } + return false, nil + } + } + return false, nil +} + +func (r *KeptnWorkloadInstanceReconciler) getDesiredReplicas(ctx context.Context, reference v1.OwnerReference, namespace string) (int32, error) { + var replicas *int32 + switch reference.Kind { + case "Deployment": + dep := appsv1.Deployment{} + err := r.Client.Get(ctx, types.NamespacedName{Name: reference.Name, Namespace: namespace}, &dep) + if err != nil { + return 0, err + } + replicas = dep.Spec.Replicas + case "StatefulSet": + sts := appsv1.StatefulSet{} + err := r.Client.Get(ctx, types.NamespacedName{Name: reference.Name, Namespace: namespace}, &sts) + if err != nil { + return 0, err + } + replicas = sts.Spec.Replicas + } + + return *replicas, nil + +} diff --git a/operator/controllers/keptnworkloadinstance/reconcile_postdeployment.go b/operator/controllers/keptnworkloadinstance/reconcile_postdeployment.go index 5012e3e64e..cb90bdd8f3 100644 --- a/operator/controllers/keptnworkloadinstance/reconcile_postdeployment.go +++ b/operator/controllers/keptnworkloadinstance/reconcile_postdeployment.go @@ -4,9 +4,6 @@ import ( "context" klcv1alpha1 "github.com/keptn-sandbox/lifecycle-controller/operator/api/v1alpha1" "github.com/keptn-sandbox/lifecycle-controller/operator/api/v1alpha1/common" - appsv1 "k8s.io/api/apps/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" ) @@ -26,26 +23,3 @@ func (r *KeptnWorkloadInstanceReconciler) reconcilePostDeployment(ctx context.Co } return nil } - -func (r *KeptnWorkloadInstanceReconciler) GetDesiredReplicas(ctx context.Context, reference v1.OwnerReference, namespace string) (int32, error) { - var replicas *int32 - switch reference.Kind { - case "Deployment": - dep := appsv1.Deployment{} - err := r.Client.Get(ctx, types.NamespacedName{Name: reference.Name, Namespace: namespace}, &dep) - if err != nil { - return 0, err - } - replicas = dep.Spec.Replicas - case "StatefulSet": - sts := appsv1.StatefulSet{} - err := r.Client.Get(ctx, types.NamespacedName{Name: reference.Name, Namespace: namespace}, &sts) - if err != nil { - return 0, err - } - replicas = sts.Spec.Replicas - } - - return *replicas, nil - -} From b3ee86604f44b1e01b00950c99cab1274b4fd8b7 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 11:32:33 +0200 Subject: [PATCH 2/8] fix(operator): updated workload instance controller, added example Signed-off-by: Thomas Schuetz --- .../controllers/keptnworkloadinstance/controller.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index c4783ee788..1546b74738 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -106,24 +106,18 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr r.Log.Error(err, "Error reconciling deployment") return ctrl.Result{}, err } - return ctrl.Result{Requeue: true}, nil + return ctrl.Result{Requeue: true, RequeueAfter: 10 * time.Second}, nil } if !workloadInstance.IsPostDeploymentCompleted() { + r.Log.Info("Post deployment checks not finished") err = r.reconcilePostDeployment(ctx, req, workloadInstance) if err != nil { r.Log.Error(err, "Error reconciling post-deployment checks") return ctrl.Result{Requeue: true}, err } - return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil - } - - if workloadInstance.IsPostDeploymentCompleted() { - return reconcile.Result{}, nil + return ctrl.Result{Requeue: true}, nil } - - r.Log.Info("Post deployment checks not finished") - return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil } From d22cedabb1d838f9aebd9ec4f795d614c52b13b6 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 12:12:07 +0200 Subject: [PATCH 3/8] fix(operator): change requeue interval Signed-off-by: Thomas Schuetz --- operator/controllers/keptnworkloadinstance/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index 1546b74738..e68b524ad9 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -118,7 +118,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr } return ctrl.Result{Requeue: true}, nil } - return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil + return ctrl.Result{Requeue: true, RequeueAfter: 30 * time.Second}, nil } From 24918c8a0a3d22310e8fbf302dd05b4c60402bff Mon Sep 17 00:00:00 2001 From: odubajDT Date: Tue, 4 Oct 2022 12:59:14 +0200 Subject: [PATCH 4/8] do not requeue if everything is finished Signed-off-by: odubajDT --- operator/controllers/keptnworkloadinstance/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index e68b524ad9..3ef8e26504 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -118,8 +118,8 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr } return ctrl.Result{Requeue: true}, nil } - return ctrl.Result{Requeue: true, RequeueAfter: 30 * time.Second}, nil + return ctrl.Result{}, nil } // SetupWithManager sets up the controller with the Manager. From 69e8699de5bf076ffdebfdad05dc7ced9941dc8b Mon Sep 17 00:00:00 2001 From: odubajDT Date: Tue, 4 Oct 2022 13:11:28 +0200 Subject: [PATCH 5/8] add minimal requeue timeouts after pre and post deployment reconciliations Signed-off-by: odubajDT --- operator/controllers/keptnworkloadinstance/controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index 3ef8e26504..b193666056 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -96,7 +96,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr r.Log.Error(err, "Error reconciling pre-deployment checks") return ctrl.Result{}, err } - return ctrl.Result{Requeue: true}, nil + return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil } if !workloadInstance.IsDeploymentCompleted() { @@ -116,7 +116,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr r.Log.Error(err, "Error reconciling post-deployment checks") return ctrl.Result{Requeue: true}, err } - return ctrl.Result{Requeue: true}, nil + return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil } return ctrl.Result{}, nil From 7fc372edfde4147d7e4f28d8f5f1c63f22e5f691 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 13:36:08 +0200 Subject: [PATCH 6/8] feat(operator): set requeueing if something fails Signed-off-by: Thomas Schuetz --- operator/controllers/keptnworkloadinstance/controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index b193666056..7c2d076b4a 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -94,7 +94,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr err := r.reconcilePreDeployment(ctx, req, workloadInstance) if err != nil { r.Log.Error(err, "Error reconciling pre-deployment checks") - return ctrl.Result{}, err + return ctrl.Result{Requeue: true}, err } return ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}, nil } @@ -104,7 +104,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr err := r.reconcileDeployment(ctx, workloadInstance) if err != nil { r.Log.Error(err, "Error reconciling deployment") - return ctrl.Result{}, err + return ctrl.Result{Requeue: true}, err } return ctrl.Result{Requeue: true, RequeueAfter: 10 * time.Second}, nil } From 16188b59e5cdcbecd2af665c6bb2c75edb34c141 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 13:40:42 +0200 Subject: [PATCH 7/8] fix(operator): allow operator to patch events Signed-off-by: Thomas Schuetz --- operator/controllers/keptnworkloadinstance/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/controllers/keptnworkloadinstance/controller.go b/operator/controllers/keptnworkloadinstance/controller.go index 7c2d076b4a..601537102d 100644 --- a/operator/controllers/keptnworkloadinstance/controller.go +++ b/operator/controllers/keptnworkloadinstance/controller.go @@ -61,7 +61,7 @@ type KeptnWorkloadInstanceReconciler struct { //+kubebuilder:rbac:groups=lifecycle.keptn.sh,resources=keptntasks,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=lifecycle.keptn.sh,resources=keptntasks/status,verbs=get;update;patch //+kubebuilder:rbac:groups=lifecycle.keptn.sh,resources=keptntasks/finalizers,verbs=update -//+kubebuilder:rbac:groups=core,resources=events,verbs=create;watch +//+kubebuilder:rbac:groups=core,resources=events,verbs=create;watch;patch //+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch //+kubebuilder:rbac:groups=apps,resources=replicasets;deployments;statefulsets,verbs=get;list;watch From aa8c68af22663b7229410cf7ec57779fedf4339f Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 4 Oct 2022 13:41:46 +0200 Subject: [PATCH 8/8] fix(operator): allow operator to patch events Signed-off-by: Thomas Schuetz --- operator/config/rbac/role.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/operator/config/rbac/role.yaml b/operator/config/rbac/role.yaml index 264f40276a..5f5aa48bdd 100644 --- a/operator/config/rbac/role.yaml +++ b/operator/config/rbac/role.yaml @@ -48,6 +48,7 @@ rules: - events verbs: - create + - patch - watch - apiGroups: - ""