Skip to content

Commit d2f92be

Browse files
authored
fix: add deletecollection for pods (#163)
1 parent 30d43f7 commit d2f92be

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

charts/tensor-fusion/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.2.17
18+
version: 1.2.18
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/tensor-fusion/templates/rbac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ rules:
4444
- patch
4545
- update
4646
- watch
47+
- deletecollection
4748
- apiGroups:
4849
- ""
4950
resources:

config/rbac/role.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ rules:
2727
- ""
2828
resources:
2929
- nodes
30-
- pods
3130
verbs:
3231
- create
3332
- delete
@@ -52,6 +51,19 @@ rules:
5251
- get
5352
- patch
5453
- update
54+
- apiGroups:
55+
- ""
56+
resources:
57+
- pods
58+
verbs:
59+
- create
60+
- delete
61+
- deletecollection
62+
- get
63+
- list
64+
- patch
65+
- update
66+
- watch
5567
- apiGroups:
5668
- ""
5769
resources:
@@ -74,6 +86,8 @@ rules:
7486
resources:
7587
- daemonsets
7688
- deployments
89+
- replicasets
90+
- statefulsets
7791
verbs:
7892
- create
7993
- delete

internal/controller/pod_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type PodReconciler struct {
4343
Scheme *runtime.Scheme
4444
}
4545

46-
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
46+
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete;deletecollection
4747
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;update;patch
4848
// +kubebuilder:rbac:groups=core,resources=pods/exec,verbs=create;get;update;patch
4949
// +kubebuilder:rbac:groups=core,resources=pods/finalizers,verbs=update

internal/controller/tensorfusioncluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type TensorFusionClusterReconciler struct {
6161
// +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch
6262
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
6363
// +kubebuilder:rbac:groups="",resources=namespaces;configmaps,verbs=get;list;watch;create;update;patch
64-
// +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete
64+
// +kubebuilder:rbac:groups=apps,resources=daemonsets;statefulsets;replicasets,verbs=get;list;watch;create;update;patch;delete
6565

6666
// Reconcile a TensorFusionCluster object, create and monitor GPU Pool, managing cluster level component versions
6767
func (r *TensorFusionClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {

0 commit comments

Comments
 (0)