cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
Configurable garbage collection
/kind feature /help
Describe the solution you'd like As a follow-up to #3518 it would be good to allow users to configure the garbage collection. Specifically, it would be good to expose this configuration:
- Selecting clusters where GC will be applied via label selectors on the
Cluster. - Selecting which GC tasks will be done (i.e. services, pvc)
Anything else you would like to add: In my head i am thinking there is an option CRD or config map that if it exists it will contain this configuration. As an an example
kind: AWSGarbageCollectorConfig
spec:
clusterSelector:
matchLabels:
mycompany/envtype: non-prod
cleanupTasks:
services: true
pvc: false
Environment:
- Cluster-api-provider-aws version:
- Kubernetes version: (use
kubectl version): - OS (e.g. from
/etc/os-release):
@richardcase: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/kind feature /help
Describe the solution you'd like As a follow-up to #3518 it would be good to allow users to configure the garbage collection. Specifically, it would be good to expose this configuration:
- Selecting clusters where GC will be applied via label selectors on the
Cluster.- Selecting which GC tasks will be done (i.e. services, pvc)
Anything else you would like to add: In my head i am thinking there is an option CRD or config map that if it exists it will contain this configuration. As an an example
kind: AWSGarbageCollectorConfig spec: clusterSelector: matchLabels: mycompany/envtype: non-prod cleanupTasks: services: true pvc: falseEnvironment:
- Cluster-api-provider-aws version:
- Kubernetes version: (use
kubectl version):- OS (e.g. from
/etc/os-release):
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/priority important-longterm /triage accepted
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
/assign @Atharva-Shinde
/unassign Atharva-Shinde
/help
Discussed in today's office hours.
Selecting which GC tasks will be done (i.e. services, pvc)
This is not possible today, and so needs a solution. We agreed that we could address this using an annotation, and agreed to implement this.
Selecting clusters where GC will be applied via label selectors on the Cluster.
We considered two approaches: (1) a Custom Resource with a list of configurations, each configuration scoped to a set of clusters using selectors (2) a Custom Resource that holds exactly one configuration, and an AWSCluster.Spec.GCConfigurationRef field that refers to this Resource. If the Resource is mutable, changing it affects all referring clusters.
We also agreed that the "selecting clusters" problem is not urgent, and that it can be addressed by setting/updating annotations on many AWSCluster resources, even if that requires the user to do more work than updating one Custom Resource.