Comments (9)
Yes I have noted this also. Something has changed in what it's collected/reported.
from kube-no-trouble.
Thanks for reporting this @gfahyhpe, there was a bug in 0.2.0 where some resources might be reported even though they're not deprecated. It should be fixed since fixed in 0.2.1.
I would like to confirm that this is the case. Would you be able to share manifests of one or two resources that were reported with 0.2.0 version, and not with 0.3.0? (Doesn't have to be full manifest, mainly need the .apiVersion
, .kind
, .metadata
fields). Thanks
from kube-no-trouble.
@stepanstipl
Here is a sample (let me know if I have provided enough info for what you need) ...
apiVersion: v1
kind: Service
metadata:
name: tools-toolsapi
labels:
app: tools-toolsapi
spec:
from kube-no-trouble.
Thanks @gfahyhpe, I would need a little bit more, sorry I was probably confusing in my previous message. I need the metadata of the resource from a cluster (kubectl get deploy my_deployment -o yaml
), in particular I would expect it to have the .metadata.annotation.kubectl.kubernetes.io/last-applied-configuration
value, such as:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1beta1","kind":"Deployment","metadata":{"annotations":{},"labels":
....
....
creationTimestamp: "2019-02-16T00:26:01Z"
generation: 6
labels:
k8s-app: calico
name: calico
namespace: kube-system
resourceVersion: "197110620"
selfLink: /apis/apps/v1/namespaces/kube-system/deployments/calico
uid: 7076727a-3181-11e9-ace0-42010a800043
spec:
...
...
from kube-no-trouble.
@stepanstipl I have posted below the output that you requested, cut down to the specific items of interest and redacted where appropriate
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "20"
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"extensions/v1beta1","kind":"Deployment","metadata":{"annotations":
...
...
creationTimestamp: "2019-10-27T06:10:00Z"
...
generation: 20
labels:
app: tools
chart: tools-v0.2.3
heritage: Tiller
namespace: REDACTED_NS
release: tools
name: tools-toolsapi
namespace: REDACTED_NS
resourceVersion: "169625972"
selfLink: /apis/extensions/v1beta1/namespaces/REDACTED_NS/deployments/tools-toolsapi
uid: <REDACTED>
spec:
...
from kube-no-trouble.
Thanks @gfahyhpe, this does look like a bug. The believe the resource you shared should be indeed reported. This should be enough info for me to reproduce, I'll have look 👍
from kube-no-trouble.
This was now fixed in master, thanks for reporting and help tracking it down. If it's convenient for you to test form master, please do. Otherwise I plan to cut a version probably later this week, but I plan to add some tests to (at least) cover this issue first.
from kube-no-trouble.
I tested kubent v0.2.0 versus v0.3.1 on a number of clusters
Firstly,
the original issue is fixed, i.e. kubent v0.3.1 correctly reports the Kubernetes v1.16 deprecations
However,
v0.2.0 reports Ingress as deprecated in Kubernetes v1.20
v0.3.1 reports Ingress as deprectaed in Kuberneets v1.22
This seems to be because
v0.2.0 is checking the 1.16 and 1.20 rulesets
v0.3.1 is checking the 1.16 and 1.22 rulesets
$ kubent -k kubeconfig.yaml
12:15PM INF >>> Kube No Trouble `kubent` <<<
12:15PM INF version 0.2.0 (git sha b9b45f347c7e67cf488d8dd6e20c8b848c595a3e)
12:15PM INF Initializing collectors and retrieving data
12:15PM INF Retrieved 185 resources from collector name=Cluster
12:15PM INF Retrieved 0 resources from collector name="Helm v2"
12:15PM INF Retrieved 0 resources from collector name="Helm v3"
12:15PM INF Loaded ruleset name=deprecated-1-16.rego
12:15PM INF Loaded ruleset name=deprecated-1-20.rego
__________________________________________________________________________________________
>>> 1.20 Deprecated APIs <<<
------------------------------------------------------------------------------------------
KIND NAMESPACE NAME API_VERSION
Ingress <REDACTED> <REDACTED> extensions/v1beta1
Ingress <REDACTED> <REDACTED> extensions/v1beta1
Ingress <REDACTED> <REDACTED> extensions/v1beta1
$ kubent_031 -k kubeconfig.yaml
12:22PM INF >>> Kube No Trouble `kubent` <<<
12:22PM INF version 0.3.1 (git sha dev)
12:22PM INF Initializing collectors and retrieving data
12:22PM INF Retrieved 95 resources from collector name=Cluster
12:22PM INF Retrieved 0 resources from collector name="Helm v2"
12:22PM INF Retrieved 0 resources from collector name="Helm v3"
12:22PM INF Loaded ruleset name=deprecated-1-16.rego
12:22PM INF Loaded ruleset name=deprecated-1-22.rego
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND NAMESPACE NAME API_VERSION
Ingress <REDACTED> <REDACTED> extensions/v1beta1
Ingress <REDACTED> <REDACTED> extensions/v1beta1
Ingress <REDACTED> <REDACTED> extensions/v1beta1
from kube-no-trouble.
Great, thanks @gfahyhpe for testing and confirming the issue is fixed. 👍 I've now added a bunch of tests (#37) that should cover this and help from any issues like that in future.
The deprecation in 1.22 should be correct for Ingress, this was updated on purpose. I believe this changed over time, and as far as I'm aware this is the current situation - kubernetes/kubernetes#43214.
from kube-no-trouble.
Related Issues (20)
- Multi Tenant Shared EKS cluster HOT 3
- Entries appear that are not in config HOT 5
- Multiple additional kinds of the same resource are not respected HOT 2
- Failure to retrieve AKS cluster resources - kubelogin not found HOT 1
- PodSecurityPolicy Deprecation Not Detected HOT 4
- Skip already removed APIs HOT 2
- Add FAQ explaining potential false positives HOT 7
- Depreciation api call triggered in the kubernetes migration notification window HOT 2
- New release HOT 3
- Missing kubectl.kubernetes.io/last-applied-configuration Annotation in Kubernetes Resources and Inclusion in kubectl Reports HOT 2
- WRN failed to discover supported resources for policy/v1beta1 HOT 3
- Feature request - validate helm charts HOT 2
- kubeconfig context feature does not work in 0.7.1 version HOT 1
- Autofix using a --fix or --autofix flag HOT 2
- Distinguish between deprecated / removed apis in CI mode error code HOT 2
- Kubent cause AWS EKS upgrade warning HOT 4
- Helm charts scanning for deprecated APIs HOT 2
- Missing kubernetes 1.28 deprecations HOT 3
- Unable to give multiple manifest files for scanning HOT 3
- [BUG] Kubent reports updated manifests as outdated if their last applied configuration is outdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-no-trouble.