Skip to content

Commit

Permalink
Add /status to MachineSet and MachineDeployment kubebuilder directives (
Browse files Browse the repository at this point in the history
kubernetes-sigs#922)

Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri authored and detiber committed May 2, 2019
1 parent 204e2f3 commit d716baf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion config/rbac/rbac_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ rules:
- list
- watch
- create
- patch
- apiGroups:
- cluster.k8s.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/machinedeployment/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/machineset/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d716baf

Please sign in to comment.