From d716baf286f30140219927c6f36b2c29c02e5f09 Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Wed, 1 May 2019 14:26:21 -0700 Subject: [PATCH] Add /status to MachineSet and MachineDeployment kubebuilder directives (#922) Signed-off-by: Vince Prignano --- config/rbac/rbac_role.yaml | 1 - pkg/controller/machinedeployment/controller.go | 2 +- pkg/controller/machineset/controller.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/rbac/rbac_role.yaml b/config/rbac/rbac_role.yaml index 3b248988a96e..90cbd805e01b 100644 --- a/config/rbac/rbac_role.yaml +++ b/config/rbac/rbac_role.yaml @@ -25,7 +25,6 @@ rules: - list - watch - create - - patch - apiGroups: - cluster.k8s.io resources: diff --git a/pkg/controller/machinedeployment/controller.go b/pkg/controller/machinedeployment/controller.go index 57e2ae9c5840..3fa7a4848abe 100644 --- a/pkg/controller/machinedeployment/controller.go +++ b/pkg/controller/machinedeployment/controller.go @@ -162,7 +162,7 @@ func (r *ReconcileMachineDeployment) adoptOrphan(deployment *v1alpha1.MachineDep // Reconcile reads that state of the cluster for a MachineDeployment object and makes changes based on the state read // and what is in the MachineDeployment.Spec -// +kubebuilder:rbac:groups=cluster.k8s.io,resources=machinedeployments,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=cluster.k8s.io,resources=machinedeployments;machinedeployments/status,verbs=get;list;watch;create;update;patch;delete func (r *ReconcileMachineDeployment) Reconcile(request reconcile.Request) (reconcile.Result, error) { // Fetch the MachineDeployment instance d := &v1alpha1.MachineDeployment{} diff --git a/pkg/controller/machineset/controller.go b/pkg/controller/machineset/controller.go index 6fba8033cbb2..86d0c8cbb54a 100644 --- a/pkg/controller/machineset/controller.go +++ b/pkg/controller/machineset/controller.go @@ -140,7 +140,7 @@ func (r *ReconcileMachineSet) MachineToMachineSets(o handler.MapObject) []reconc // Reconcile reads that state of the cluster for a MachineSet object and makes changes based on the state read // and what is in the MachineSet.Spec // Automatically generate RBAC rules to allow the Controller to read and write Deployments -// +kubebuilder:rbac:groups=cluster.k8s.io,resources=machinesets,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=cluster.k8s.io,resources=machinesets;machinesets/status,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=cluster.k8s.io,resources=machines,verbs=get;list;watch;create;update;patch;delete func (r *ReconcileMachineSet) Reconcile(request reconcile.Request) (reconcile.Result, error) { // Fetch the MachineSet instance