kai icon indicating copy to clipboard operation
kai copied to clipboard

GSoC '25: Extend usage of Konveyor AI to detect and update deprecated Kubernetes API usage in golang applications

Open jwmatthews opened this issue 10 months ago • 5 comments

Overview

As part of a CNCF submission for Google Summer of Code `25 we are proposing a project to extend the usage of Konveyor AI applied to detecting and updating deprecated Kubernetes API usage in a golang application. For those who are new to working with Konveyor AI or "kai", kai is a code assistant focused on application modernization that uses data from Konveyor, such as static code analysis and changelogs to generate code suggestions.

Description

You will be responsible for new development, integration, and testing work associated with creating a fully functional demonstration of applying Konveyor AI to the problem of detecting and updating deprecated Kubernetes API usage in a golang application.

As such you will need to develop at a minimum:

  • Golang based sample application that intentionally uses deprecated Kubernetes APIs. In addition, it would be great to identify a few older Kubernetes Operators as additional examples to run Kai against to prove out the concept.
  • Python utility to leverage generative AI techniques to read published deprecated API guides and via help from a LLM generate applicable static code analysis rules Konveyor can run. For an example of existing analysis rules you can see the community's ~2400+ rules in the konveyor/rulesets repository
  • Scripts and documentation to orchestrate the usage of Konveyor AI to highlight the intended workflow
  • Share your findings and experience via a blog post published to https://www.konveyor.io/blog/
  • Attend and present a demonstration of your work in a Konveyor meetup (virtual meeting)
  • Record a video demonstration with voice and share at project culmination

Additionally, we expect you to engage with the Konveyor AI team and help with:

  • Work with team to discover issues as we expand Kai to work with languages beyond Java
  • Surface bugs/issues related to golang support in Kai, you may help to find bugs and share and the team can help to fix blocking issues, or if you are adventurous we can help to guide you in fixing bugs in our analysis tool analyzer-lsp
  • Testing of your use-case via the Kai IDE extension and help to surface any blocking issues

Milestones

  1. Demonstrate ability to convert published deprecated API documentation to Konveyor's static code analysis rules for golang projects
  2. Demonstrate the above created rules run and behave as expected with golang projects as scanned by Kantra
  3. Create a golang sample application that highlights a few deprecated APIs which you will use as the sample application
  4. Create a simple python notebook with langchain to prove the concept of leveraging data from your application and the static code analysis to suggest a code fix
  5. Work with Konveyor AI Team to update kai_analyzer_rpc to allow processing golang applications
  6. Create an integrated test scenario of using Kai with your sample application and custom rules, discover blocking issues and work with team to file issues and help to resolve
  7. [Optional] Add a new validator (agent) to Kai to allow addressing go compiler issues. This is an optional step that would give you exposure to adding a new Agentic workflow into Kai teaching it how to resolve go compiler issues.
  8. Record a full end to end demonstration of Kai detecting deprecated Kubernetes API usage and addressing
  9. Join a Konveyor Meetup virtual meeting and share your demonstration
  10. Submit a blog post sharing your learnings to https://www.konveyor.io/blog

Skills Required

  • Development proficiency with Golang and Python
  • Comfortable bringing up Kubernetes clusters for development testing and deploying applications
  • Comfortable using Kubernetes APIs via golang
  • Desire to learn more about applying Generative AI techniques for coding problems

jwmatthews avatar Feb 10 '25 22:02 jwmatthews

Related to: https://github.com/cncf/mentoring/pull/1382

jwmatthews avatar Feb 12 '25 15:02 jwmatthews

Interested in Contributing šŸš€

Hi, I’d love to contribute to this project as part of GSoC 2025! I have experience with Golang, Python, and Kubernetes API development, making me well-suited for this task.

Relevant Experience:

  • Golang & Kubernetes: Worked on Kubernetes-based applications, including API interactions and operator development.
  • Policy & Code Analysis: Experience in static code analysis and AI-driven automation.
  • Generative AI & Python: Familiar with LangChain and LLMs for code suggestions.

Proposed Contribution:

  • Develop a Golang sample app using deprecated Kubernetes APIs.
  • Create a Python utility to generate static analysis rules for Konveyor.
  • Implement and test end-to-end integration with Konveyor AI.

Looking forward to contributing and collaborating with the Konveyor AI team! Please let me know how I can proceed. šŸš€

akshat-crypto avatar Feb 28 '25 14:02 akshat-crypto

@jwmatthews I am interested in contributing to this project. I have started by learning Kubernetes (upto the level of building CRDs) and also started learning Golang. I am highly proficient in Python. I have a good grasp of working with IDEs, intellisense and compilers (built an browser based IDE), which may be very helpful in contributing to this project

Can you guide me where to start in order to give a good proposal?

burhanuddin6 avatar Mar 10 '25 00:03 burhanuddin6

I am new to Konveyor correct me if I'm wrong,Imitate the use of kai,by leveraging LLM's to identify the use of deprecated k8 api in sample golang application source code and generate ruleset according to konveyor analyzer for Konveyor daemon?If so are we also fetching the source code through konveyor daemon analyzer?Also do we have to implement other features of kai or enough for ultimate goal of updating kai-rpc for go applications?@jwmatthews

Prianshu-git avatar Mar 17 '25 19:03 Prianshu-git

Unfortunately, our project did not make the cut to be funded for a mentee this summer, so Konveyor will not be part of GSoC for Summer 2025.

This issue's goal is still valid and one we want to explore so I will leave this issue open.

jwmatthews avatar May 13 '25 14:05 jwmatthews