Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 51d5df1

Browse files
garbage collect only profile components
1 parent 463e144 commit 51d5df1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎controllers/osrmcluster_controller.go‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,14 @@ func (r *OSRMClusterReconciler) getChildResources(ctx context.Context, instance
448448
}
449449

450450
func (r *OSRMClusterReconciler) garbageCollection(ctx context.Context, instance *osrmv1alpha1.OSRMCluster) error {
451-
labelSelector := fmt.Sprintf("%s,%s notin (%d)", metadata.GenerationLabelKey, metadata.GenerationLabelKey, instance.ObjectMeta.Generation)
451+
labelSelector := fmt.Sprintf(
452+
"%s in (%s),%s,%s notin (%d)",
453+
metadata.ComponentLabelKey,
454+
metadata.ComponentLabelProfile,
455+
metadata.GenerationLabelKey,
456+
metadata.GenerationLabelKey,
457+
instance.ObjectMeta.Generation,
458+
)
452459
propagationPolicy := metav1.DeletePropagationBackground
453460

454461
err := r.Client.DeleteAllOf(ctx, &batchv1.CronJob{}, &client.DeleteAllOfOptions{

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /