Giter VIP home page Giter VIP logo

Comments (9)

jmcdon01 avatar jmcdon01 commented on July 25, 2024

Yes I have noted this also. Something has changed in what it's collected/reported.

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

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.

gfahyhpe avatar gfahyhpe commented on July 25, 2024

@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.

stepanstipl avatar stepanstipl commented on July 25, 2024

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.

gfahyhpe avatar gfahyhpe commented on July 25, 2024

@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.

stepanstipl avatar stepanstipl commented on July 25, 2024

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.

stepanstipl avatar stepanstipl commented on July 25, 2024

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.

gfahyhpe avatar gfahyhpe commented on July 25, 2024

@stepanstipl

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.

stepanstipl avatar stepanstipl commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.