Skip to content
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

Problem with pruning crds when multiple versions are available. e.g. monitoring.coreos.com/v1 #799

Closed
larsdekroon opened this issue Feb 4, 2021 · 4 comments

Comments

@larsdekroon
Copy link

Bug report

When I run krane on my cluster, it looks up all crd's so they can be pruned if they are not defined. However, alertsmanagersconfig is a crd which has an v1alpha version, but the prune-whitelist is assigned to monitoring.coreos.com/v1/alertsmanagersconfig. This fails, since only monitoring.coreos.com/v1alpha/alertsmanagersconfig exists.

Expected behavior:
A correct combination of the crd's with the result from kubectl api-versions

Actual behavior:
error: no matches for kind "AlertmanagerConfig" in version "monitoring.coreos.com/v1"

Version(s) affected:
2.1.5 and before

Steps to Reproduce

  1. kubectl apply -f https://raw.githubusercontent.com/prometheus-community/helm-charts/main/charts/kube-prometheus-stack/crds/crd-alertmanagerconfigs.yaml

  2. kubectl apply -f https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/crds/crd-alertmanagers.yaml

  3. krane deploy any resource

@dturn
Copy link
Contributor

dturn commented Feb 5, 2021

@larsdekroon Thanks for filing this bug. I think this is a new example of #696 / #699. Can you confirm? I

@larsdekroon
Copy link
Author

@dturn Yes! It seems like the same problem. #795 as well! I think you can get the correct version from "kubectl api-resources" and use that version!

@dturn
Copy link
Contributor

dturn commented Feb 10, 2021

Good news. We've merged #778 which in the real fix to this problem (and removes the need for an override list). We're planning to release a new version this week. Feel free to re-open this issue if you have any questions for problems.

@dturn dturn closed this as completed Feb 10, 2021
@larsdekroon
Copy link
Author

Thanks! Seems nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants