Code Monkey home page Code Monkey logo

Comments (7)

rikatz avatar rikatz commented on June 12, 2024 1

Yes sure! Would love to see this! Sorry folks I've been pretty busy but want to start smashing those bugs again :)

from kubepug.

rikatz avatar rikatz commented on June 12, 2024 1

So we have two different problems :)

  • YAML parsing is hard... (to not say other word!) but now it's working. I did reduced the logging threshold when parsing the YAML file kind and apiVersion to info, as it's not quite true.

Still, I fixed some things on the yaml parsing, moving the spliting from the library directly to bytes (everytime --- is found we know there is a new file). It's working fine

Finally, I have moved to Kubernetes yaml library, which seems better and more stable than the official one 🤷

  • Standard input reading. Using /dev/stdin seems not to be the right/working way of doing it.
    I'm fixing this, so instead of passing "/dev/stdin" the idea is passing "-" as input file and leaving golang compiler to read from os.STDIN :)

from kubepug.

rikatz avatar rikatz commented on June 12, 2024

Hello,

Can you please post one of the yaml files in some pastebin or gist?

About the usage inside the cluster, I've never tried this approach but need to, and maybe also map some RBACs to deploy it as a job inside kubernetes :)

Thanks!

from kubepug.

nohaj avatar nohaj commented on June 12, 2024

Hello,

You can find the files there : https://gitlab.com/gitlab-org/charts/gitlab-runner/-/tree/master/templates

It would be nice to have theses new features ! :)

Thank you

from kubepug.

danielhoherd avatar danielhoherd commented on June 12, 2024

@rikatz given that several people (myself included) are reporting problems with yaml files, would it make sense to have some tests that run in CI against problematic yaml files one at a time? People could make PRs with their problematic files and others could either point out their problem or they would become valid test cases against kubepug.

FWIW I am running kubepug against github.com/astronomer/astronomer and getting an empty list no matter what I do:

$ git clone [email protected]:astronomer/astronomer.git
Cloning into 'astronomer'...
remote: Enumerating objects: 28955, done.
remote: Counting objects: 100% (969/969), done.
remote: Compressing objects: 100% (447/447), done.
remote: Total 28955 (delta 603), reused 826 (delta 510), pack-reused 27986
Receiving objects: 100% (28955/28955), 6.27 MiB | 9.48 MiB/s, done.
Resolving deltas: 100% (20055/20055), done.
$ cd astronomer
$ git co v0.25.2
HEAD is now at 932208d9 astronomer version 0.25.2
$ helm template -f values.yaml --set baseDomain=example.com . --kube-version v1.13.0 | kubepug --k8s-version v1.13.0 --input-file /dev/stdin
time="2021-06-02T16:34:23-07:00" level=warning msg="YAML file does not contain apiVersion or Kind: /dev/stdin  Skipping to next"
RESULTS:
Deprecated APIs:


Deleted APIs:

$ helm template -f values.yaml --set baseDomain=example.com . --kube-version v1.21.0 | kubepug --k8s-version v1.21.0 --input-file /dev/stdin
time="2021-06-02T16:34:36-07:00" level=warning msg="YAML file does not contain apiVersion or Kind: /dev/stdin  Skipping to next"
RESULTS:
Deprecated APIs:


Deleted APIs:

$ helm template -f values.yaml --set baseDomain=example.com . --kube-version v1.21.0 | wc -l
    8863
$ helm template -f values.yaml --set baseDomain=example.com . --kube-version v1.21.0 | grep '^kind:' | wc -l
     135

As a comparison, when I install that chart in a 1.19 cluster and run kubepug against it I see

RESULTS:
Deprecated APIs:

ComponentStatus found in /v1
	 ├─ ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+
		-> GLOBAL: controller-manager 
		-> GLOBAL: scheduler 
		-> GLOBAL: etcd-0 


Deleted APIs:

Ingress found in extensions/v1beta1
	 ├─ API REMOVED FROM THE CURRENT VERSION AND SHOULD BE MIGRATED IMMEDIATELY!!
		-> OBJECT: astronomer-alertmanager-ingress namespace: astronomer 
		-> OBJECT: astronomer-grafana-ingress namespace: astronomer 
		-> OBJECT: astronomer-kibana-ingress namespace: astronomer 
		-> OBJECT: astronomer-prometheus-ingress namespace: astronomer 
		-> OBJECT: astronomer-public-ingress namespace: astronomer 

Error: found 1 Deleted APIs and 1 Deprecated APIs
time="2021-06-02T23:34:08Z" level=error msg="An error has ocurred: found 1 Deleted APIs and 1 Deprecated APIs"

from kubepug.

rikatz avatar rikatz commented on June 12, 2024

Hey folks, took the day to debug this. Apparently there is something wrong with the manifest that is making yaml parser get lost.

I'm trying to figure out in which part it is problematic, and will fix here.

Thanks for reporting this!

from kubepug.

rikatz avatar rikatz commented on June 12, 2024

Will make a new release today! Let me know if this problem is solved folks.

This gave me some idea of having kubepug also testing helm charts directly (like, you point to some chart, it downloads, renders and attempts to verify) but no promises, as I'm getting a ton of other stuff to do :(

If someone wants to play/try implementing this, LMK and I can help :)

from kubepug.

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.