What happened?
When running pluto detect-api-resources --target-versions k8s=v1.21.0 on my AWS EKS Kubernetes cluster four resources of type DaemonSet with name kube-proxy were listed as being a removed version extensions/v1beta1.
Upon looking at the single kube-proxy resource there was no extensions/v1beta1 value in the kubectl.kubernetes.io/last-applied-configuration or apiVersion fields of this resource.
When debugging and stepping through the code I realised that this was actually referring to a ControllerRevisions resource and not a DaemonSet. It seems the code prioritises the kubectl.kubernetes.io/last-applied-configuration annotation to get the kind of resource rather than carrying through the original resource kind.
What did you expect to happen?
I expected the output to show me the correct resource and where to look, saying the DaemonSet resource was the removed kind did not make me think about the ControllerRevisions resource.
How can we reproduce this?
This might be something OpenShift / AWS EKS related as the ControllerRevisions resource doesn't seem to be standard Kubernetes.
Creating a ControllerRevisions resource and setting the annotation kubectl.kubernetes.io/last-applied-configuration to
{"apiVersion":"apps/v1","kind":"DaemonSet","metadata":{"annotations":{}}}
should be able to reproduce this.
Version
v5.12.0
Search
Code of Conduct
Additional context
Happy to submit a PR eventually if keeping the original resources Kind and not using the kind in the change annotations JSON is the way to go.
As a work around I am currently editing the ControllerRevisions kubectl.kubernetes.io/last-applied-configuration to manually remove the bad API versions.
What happened?
When running
pluto detect-api-resources --target-versions k8s=v1.21.0on my AWS EKS Kubernetes cluster four resources of typeDaemonSetwith namekube-proxywere listed as being a removed versionextensions/v1beta1.Upon looking at the single
kube-proxyresource there was noextensions/v1beta1value in thekubectl.kubernetes.io/last-applied-configurationorapiVersionfields of this resource.When debugging and stepping through the code I realised that this was actually referring to a
ControllerRevisionsresource and not aDaemonSet. It seems the code prioritises thekubectl.kubernetes.io/last-applied-configurationannotation to get thekindof resource rather than carrying through the original resource kind.What did you expect to happen?
I expected the output to show me the correct resource and where to look, saying the
DaemonSetresource was the removed kind did not make me think about theControllerRevisionsresource.How can we reproduce this?
This might be something OpenShift / AWS EKS related as the ControllerRevisions resource doesn't seem to be standard Kubernetes.
Creating a
ControllerRevisionsresource and setting the annotationkubectl.kubernetes.io/last-applied-configurationtoshould be able to reproduce this.
Version
v5.12.0
Search
Code of Conduct
Additional context
Happy to submit a PR eventually if keeping the original resources Kind and not using the kind in the change annotations JSON is the way to go.
As a work around I am currently editing the
ControllerRevisionskubectl.kubernetes.io/last-applied-configurationto manually remove the bad API versions.