Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ rules:
- get
- list
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- authentication.k8s.io
resources:
Expand Down
4 changes: 4 additions & 0 deletions controllers/classifier_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ type ClassifierReconciler struct {
//+kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines/status,verbs=get;watch;list
//+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch
//+kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch

func (r *ClassifierReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error) {
if r.ShardKey != "" {
Expand Down Expand Up @@ -557,6 +558,9 @@ func (r *ClassifierReconciler) updateLabelsOnMatchingClusters(ctx context.Contex
ref := &classifierScope.Classifier.Status.MachingClusterStatuses[i].ClusterRef
cluster, err := clusterproxy.GetCluster(ctx, r.Client, ref.Namespace, ref.Name, clusterproxy.GetClusterType(ref))
if err != nil {
if apierrors.IsNotFound(err) {
continue
}
logger.V(logs.LogInfo).Error(err, fmt.Sprintf("failed to get cluster %s/%s", ref.Namespace, ref.Name))
return err
}
Expand Down
8 changes: 8 additions & 0 deletions manifest/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ rules:
- get
- list
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- authentication.k8s.io
resources:
Expand Down