-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: skip expected replicaSets from deployments and statefulsets, as well as jobs from cronjobs #341
Comments
Hi @mpatters72 Regarding Regarding history for replicasets and jobs we can add this feature (with a flag for these). Contributions are welcome Last |
I tried a list of commands/objects again and it does indeed work for me. Thank you @yonahd A few other things I noticed that might could be useful features (at least for me). Feature: Context flag Problem
Desired solution
Workaround
======= ** Problem**
spec:
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: "deploymentName"
spec:
scaleTargetRef:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
name: rollout-name Desired Solution
** Workaround **
======= Feature: Other ingress objects Contour: HttpProxy and IngressRoute
Problem
** Desired Solution**
** Workarounds **
|
Hey Regarding references by a CRD we are well aware these false positives exist and warn about it in the Readme. We will try in the future to work on a group of crds to avoid these issues. |
Maybe I'm doing it wrong, but seems like when I provide a list of objects, it seems to just process last one in list instead of all of them and ignores previous ones. Using # replicaset 1st, pdb 2nd, only gives pdb report
kor -n ns-team-hz-ccweb-dev "replicaset,pdb"
kor version: vdev
_ _____ ____
| |/ / _ \| _ \
| ' / | | | |_) |
| . \ |_| | _ <
|_|\_\___/|_| \_\
Unused resources in namespace: "ns-team-hz-ccweb-dev"
+---+---------------+----------------------------------+
| # | RESOURCE TYPE | RESOURCE NAME |
+---+---------------+----------------------------------+
| 1 | Pdb | alertmanager |
| 2 | Pdb | gneiss-service |
| 3 | Pdb | prometheus |
| 4 | Pdb | release-plane-management-service |
+---+---------------+----------------------------------+
# replicaset pdb 1st, replicaset 2nd, only gives replicaset
╭─ ~ ✔ 14:39:32
╰─ kor -n ns-team-hz-ccweb-dev "pdb,replicaset"
kor version: vdev
_ _____ ____
| |/ / _ \| _ \
| ' / | | | |_) |
| . \ |_| | _ <
|_|\_\___/|_| \_\
Unused resources in namespace: "ns-team-hz-ccweb-dev"
+----+---------------+---------------------------------------------+
| # | RESOURCE TYPE | RESOURCE NAME |
+----+---------------+---------------------------------------------+
| 1 | ReplicaSet | app-kube-state-metrics-55965b4d8 |
| 2 | ReplicaSet | app-kube-state-metrics-55cbddcc47 |
| 3 | ReplicaSet | app-kube-state-metrics-56c454694d |
+----+---------------+---------------------------------------------+
# big list of things with secret last, only returns secret
kor -n ns-team-hz-ccweb-dev "pdb,replicaset,hpa,deployment,secret"
kor version: vdev
_ _____ ____
| |/ / _ \| _ \
| ' / | | | |_) |
| . \ |_| | _ <
|_|\_\___/|_| \_\
Unused resources in namespace: "ns-team-hz-ccweb-dev"
+---+---------------+--------------------------------+
| # | RESOURCE TYPE | RESOURCE NAME |
+---+---------------+--------------------------------+
| 1 | Secret | alertmanager-alertmanager |
| 2 | Secret | prometheus-scrape-config |
| 3 | Secret | vault-secrets-operator-approle |
+---+---------------+--------------------------------+ |
Hey @mpatters72 |
Problem: I don't want to alert/include standard replicasets associated with deployments, statefulsets in a report /slack message as this distracts from what I consider truly orphaned resources. Similarly I'd like to be able to keep expected jobs from cronjobs.
A deployment/statefulset that has been updated, may keep around old replicasets up the spec/revisionHistoryLimit (default 10)
We set revisionHistoryLimit so we have some rollback options / history
Jobs that were launched by a cronJob can be useful to checking logs on last successful run. In my team we tune jobs-history-limits to keep last successful and last falied.
Describe the solution you'd like
Flag to skip replicasets currently associated with deployments/statefulsets (or alternatively last X number)
Configmaps/secrets associated with those replicasets skipped also (can't rollback if it is removed)
Describe alternatives you've considered
Add labels to everything and filter out that way. Impractical for the very large number of services and namespaces we use, and eventually things no longer needed.
Don't include replicasets in report. I'm only aware of the command referencing the specific object eg
replicasets
orall
for example. - This actually would be a different feature request to be able to give a list of objects, egcronjobs,deployments
instead ofall
or just 1 object to the command.For cronjobs I could probably use
--older-than
flag to ignore jobs from more recent runs.Additional context
The text was updated successfully, but these errors were encountered: