Ensure controller-gen is up-to-date and the code and the manifests are in-sync
Follow-up for #95 that added /finalizers subresource permission and #103 that upgraded controller-gen from 0.2.4 from 0.3.0
This commit is contained in:
		
							parent
							
								
									a309eb1687
								
							
						
					
					
						commit
						1e466ad3df
					
				
							
								
								
									
										2
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										2
									
								
								Makefile
								
								
								
								
							|  | @ -110,7 +110,7 @@ ifeq (, $(shell which controller-gen)) | ||||||
| 	CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
 | 	CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
 | ||||||
| 	cd $$CONTROLLER_GEN_TMP_DIR ;\
 | 	cd $$CONTROLLER_GEN_TMP_DIR ;\
 | ||||||
| 	go mod init tmp ;\
 | 	go mod init tmp ;\
 | ||||||
| 	go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4 ;\
 | 	go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\
 | ||||||
| 	rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
 | 	rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
 | ||||||
| 	} | 	} | ||||||
| CONTROLLER_GEN=$(GOBIN)/controller-gen | CONTROLLER_GEN=$(GOBIN)/controller-gen | ||||||
|  |  | ||||||
|  | @ -10,6 +10,17 @@ rules: | ||||||
|   - actions.summerwind.dev |   - actions.summerwind.dev | ||||||
|   resources: |   resources: | ||||||
|   - horizontalrunnerautoscalers |   - horizontalrunnerautoscalers | ||||||
|  |   verbs: | ||||||
|  |   - create | ||||||
|  |   - delete | ||||||
|  |   - get | ||||||
|  |   - list | ||||||
|  |   - patch | ||||||
|  |   - update | ||||||
|  |   - watch | ||||||
|  | - apiGroups: | ||||||
|  |   - actions.summerwind.dev | ||||||
|  |   resources: | ||||||
|   - horizontalrunnerautoscalers/finalizers |   - horizontalrunnerautoscalers/finalizers | ||||||
|   verbs: |   verbs: | ||||||
|   - create |   - create | ||||||
|  | @ -31,6 +42,17 @@ rules: | ||||||
|   - actions.summerwind.dev |   - actions.summerwind.dev | ||||||
|   resources: |   resources: | ||||||
|   - runnerdeployments |   - runnerdeployments | ||||||
|  |   verbs: | ||||||
|  |   - create | ||||||
|  |   - delete | ||||||
|  |   - get | ||||||
|  |   - list | ||||||
|  |   - patch | ||||||
|  |   - update | ||||||
|  |   - watch | ||||||
|  | - apiGroups: | ||||||
|  |   - actions.summerwind.dev | ||||||
|  |   resources: | ||||||
|   - runnerdeployments/finalizers |   - runnerdeployments/finalizers | ||||||
|   verbs: |   verbs: | ||||||
|   - create |   - create | ||||||
|  | @ -52,6 +74,17 @@ rules: | ||||||
|   - actions.summerwind.dev |   - actions.summerwind.dev | ||||||
|   resources: |   resources: | ||||||
|   - runnerreplicasets |   - runnerreplicasets | ||||||
|  |   verbs: | ||||||
|  |   - create | ||||||
|  |   - delete | ||||||
|  |   - get | ||||||
|  |   - list | ||||||
|  |   - patch | ||||||
|  |   - update | ||||||
|  |   - watch | ||||||
|  | - apiGroups: | ||||||
|  |   - actions.summerwind.dev | ||||||
|  |   resources: | ||||||
|   - runnerreplicasets/finalizers |   - runnerreplicasets/finalizers | ||||||
|   verbs: |   verbs: | ||||||
|   - create |   - create | ||||||
|  | @ -73,6 +106,17 @@ rules: | ||||||
|   - actions.summerwind.dev |   - actions.summerwind.dev | ||||||
|   resources: |   resources: | ||||||
|   - runners |   - runners | ||||||
|  |   verbs: | ||||||
|  |   - create | ||||||
|  |   - delete | ||||||
|  |   - get | ||||||
|  |   - list | ||||||
|  |   - patch | ||||||
|  |   - update | ||||||
|  |   - watch | ||||||
|  | - apiGroups: | ||||||
|  |   - actions.summerwind.dev | ||||||
|  |   resources: | ||||||
|   - runners/finalizers |   - runners/finalizers | ||||||
|   verbs: |   verbs: | ||||||
|   - create |   - create | ||||||
|  | @ -101,6 +145,17 @@ rules: | ||||||
|   - "" |   - "" | ||||||
|   resources: |   resources: | ||||||
|   - pods |   - pods | ||||||
|  |   verbs: | ||||||
|  |   - create | ||||||
|  |   - delete | ||||||
|  |   - get | ||||||
|  |   - list | ||||||
|  |   - patch | ||||||
|  |   - update | ||||||
|  |   - watch | ||||||
|  | - apiGroups: | ||||||
|  |   - "" | ||||||
|  |   resources: | ||||||
|   - pods/finalizers |   - pods/finalizers | ||||||
|   verbs: |   verbs: | ||||||
|   - create |   - create | ||||||
|  |  | ||||||
|  | @ -50,6 +50,7 @@ type HorizontalRunnerAutoscalerReconciler struct { | ||||||
| 
 | 
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments,verbs=get;list;watch;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments,verbs=get;list;watch;update;patch
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=horizontalrunnerautoscalers,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=horizontalrunnerautoscalers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
|  | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=horizontalrunnerautoscalers/finalizers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=horizontalrunnerautoscalers/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=horizontalrunnerautoscalers/status,verbs=get;update;patch
 | ||||||
| // +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
 | // +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -53,8 +53,10 @@ type RunnerReconciler struct { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners,verbs=get;list;watch;create;update;patch;delete
 | ||||||
|  | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners/finalizers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners/status,verbs=get;update;patch
 | ||||||
| // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
 | ||||||
|  | // +kubebuilder:rbac:groups=core,resources=pods/finalizers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
 | // +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
 | ||||||
| 
 | 
 | ||||||
| func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { | func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { | ||||||
|  |  | ||||||
|  | @ -54,6 +54,7 @@ type RunnerDeploymentReconciler struct { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments,verbs=get;list;watch;create;update;patch;delete
 | ||||||
|  | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments/finalizers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerdeployments/status,verbs=get;update;patch
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets/status,verbs=get;update;patch
 | ||||||
|  |  | ||||||
|  | @ -44,6 +44,7 @@ type RunnerReplicaSetReconciler struct { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets,verbs=get;list;watch;create;update;patch;delete
 | ||||||
|  | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets/finalizers,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runnerreplicasets/status,verbs=get;update;patch
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners,verbs=get;list;watch;create;update;patch;delete
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners,verbs=get;list;watch;create;update;patch;delete
 | ||||||
| // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners/status,verbs=get;update;patch
 | // +kubebuilder:rbac:groups=actions.summerwind.dev,resources=runners/status,verbs=get;update;patch
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue