Giter VIP home page Giter VIP logo

Comments (7)

mausch avatar mausch commented on July 25, 2024

Hi, this was closed 2021-06-11 but the latest release 0.5.1 (2021-10-26) doesn't seem to have it?

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

Hi @mausch,

I've checked with 0.5.1 in particular, and it seems to work as expected:

$~/Downloads/kubent -c=false --helm2=false --helm3=false -f ingress-v1beta1.yaml
11:27AM INF >>> Kube No Trouble `kubent` <<<
11:27AM INF version 0.5.1 (git sha a762ff3c6b5622650b86dc982652843cc2bd123c)
11:27AM INF Initializing collectors and retrieving data
11:27AM INF Retrieved 1 resources from collector name=File
11:27AM INF Loaded ruleset name=custom.rego.tmpl
11:27AM INF Loaded ruleset name=deprecated-1-16.rego
11:27AM INF Loaded ruleset name=deprecated-1-22.rego
11:27AM INF Loaded ruleset name=deprecated-1-25.rego
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND      NAMESPACE     NAME           API_VERSION          REPLACE_WITH (SINCE)
Ingress   <undefined>   test-ingress   extensions/v1beta1   networking.k8s.io/v1 (1.19.0)

Can you elaborate a bit more on what exactly are you trying and is not working? If we're talking about in-cluster resource, can you share the full manifest (kubectl get ... -o yaml)? Cheers 👍

from kube-no-trouble.

mausch avatar mausch commented on July 25, 2024

Hi, thanks for checking back.
Just noticed that if I download the manifest and pass it to kubent explicitly it does recognise it as deprecated.
But when I let kubent scan in-cluster resources it doesn't report it.

The ingress is:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  creationTimestamp: "2021-09-30T18:29:19Z"
  generation: 4
  labels:
    app: elevate-app-graphql-api
    chart: elevate-app-graphql-api-0.1.1
    release: elevate-app-dev
  name: elevate-app-graphql-api
  namespace: dev
  resourceVersion: "218971072"
  selfLink: /apis/extensions/v1beta1/namespaces/dev/ingresses/elevate-app-graphql-api
  uid: 535013d3-221c-11ec-8ee3-0281f75a7f2b
spec:
  rules:
  - host: some_domain.com
    http:
      paths:
      - backend:
          serviceName: elevate-app-graphql-api
          servicePort: 80
        path: /graphql

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

No problem 😄.

This would be expected if the resource does not contain the kubectl.kubernetes.io/last-applied-configuration annotation. This is because the versioning applies to APIs, rather than the internal storage. I.e. once a resource is created, it's not directly possible to tell which API version was used, so we have to use various hints (kubectl.kubernetes.io/last-applied-configuration for cluster collector, or Helm actually stores the original manifests in-cluster). This is explained more in detail in #287 (comment) and the linked posts.

So I'm guessing you're not using kubectl (i.e. annotation is missing; also some other tools "copy" kubectl's behavour and add this annotation), nor Helm (the currently supported detection methods are listed in readme).

Out of curiosity - how do you deploy the manifests? Might give me some ideas for future support...

from kube-no-trouble.

mausch avatar mausch commented on July 25, 2024

Out of curiosity - how do you deploy the manifests? Might give me some ideas for future support...

Strange, I deploy with Helm 2.

kubent recognises all other deprecated resource types correctly... I've already used it to update a bunch of Deployments. The issue is only with Ingresses apparently.

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

Hmm, that should work. And thanks for the additional info. Let's try to find out why it is not flagged.

Can you please try to get and share the Helm manifest by running helm get manifest [RELEASE_NAME] - this should show the manifest stored in-cluster.

from kube-no-trouble.

mausch avatar mausch commented on July 25, 2024

Here's the ingress from the Helm manifest:

# Source: elevate-app/charts/elevate-app-graphql-api/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: elevate-app-graphql-api
  labels:
    chart: "elevate-app-graphql-api-0.1.1"
    app: elevate-app-graphql-api
    release: "elevate-app-dev"
    
spec:
  rules:
  - host: "some_domain.com"
    http:
      paths:
      - path: "/graphql"
        backend:
          serviceName: elevate-app-graphql-api
          servicePort: 80

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.