Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Provide a better development experience #305

Closed
cubxxw opened this issue Apr 20, 2023 · 3 comments · Fixed by #317
Closed

feature: Provide a better development experience #305

cubxxw opened this issue Apr 20, 2023 · 3 comments · Fixed by #317
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@cubxxw
Copy link
Contributor

cubxxw commented Apr 20, 2023

Proposal

It's great to see such a promising, future-oriented, and active project, especially with K8sGPT's superpowers like ChatGPT.

As a Kubernetes enthusiast, I was deeply attracted to K8sGPT, so I pulled the code to my local machine to dive deeper into it.

However, I encountered some issues:

  • The Makefile doesn't provide compilation and testing capabilities, which is currently very simple:

    ❯ cat Makefile
    .PHONY: docker-build
    IMG ?= ghcr.io/k8sgpt-ai/k8sgpt:latest
    
    deploy:
    ifndef SECRET
            $(error SECRET environment variable is not set)
    endif
            kubectl create ns k8sgpt || true
            kubectl create secret generic ai-backend-secret --from-literal=secret-key=$(SECRET) --namespace=k8sgpt || true
            kubectl apply -f container/manifests
    undeploy:
            kubectl delete secret ai-backend-secret --namespace=k8sgpt
            kubectl delete -f container/manifests
            kubectl delete ns k8sgpt
    docker-build:
            docker buildx build --build-arg=VERSION="$$(git describe --tags --abbrev=0)" --build-arg=COMMIT="$$(git rev-parse --short HEAD)" --build-arg DATE="$$(date +%FT%TZ)" --platform="linux/amd64,linux/arm64" -t ${IMG} -f container/Dockerfile . --push
    
    
  • The handling of the binary after compilation is not very friendly, even though the [contributing document](https://github.com/k8sgpt-ai/k8sgpt/blob/main/CONTRIBUTING.md) tells me: Building the binary is as simple as running go build . in the root of the repository.

Suggestions

As my first step in contributing to K8sGPT, I would like to hear everyone's suggestions for any good features and proposals.

@AlexsJones
Copy link
Member

Hey thanks for reaching out - you're right we could provide some additional make directives. Would you like to contribute ?

go test ./...
go build .
go vet ./...

These would all be valuable to add

@cubxxw
Copy link
Contributor Author

cubxxw commented Apr 20, 2023

Great, it's the same idea with me, you can assign it to me, thank you.

@matthisholleville matthisholleville added enhancement New feature or request good first issue Good for newcomers labels Apr 20, 2023
@cubxxw
Copy link
Contributor Author

cubxxw commented Apr 21, 2023

Is copyright addition and verification required, even though k8sgpt is an MIT protocol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Done
3 participants