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

fix(api): Add failure field to swagger docs #90

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ func Metrics(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about nodes in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.NodeRespose
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /nodes [get]
func GetNodes(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -112,6 +114,8 @@ func GetNodes(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about namespaces in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.NamespaceResponse
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /namespaces [get]
func GetNamespaces(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -129,6 +133,8 @@ func GetNamespaces(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about pods in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.NamespaceResponse
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /pods [get]
func GetPods(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -146,6 +152,8 @@ func GetPods(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about ingresses in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.IngressResponse
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /ingresses [get]
func GetIngresses(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -163,6 +171,8 @@ func GetIngresses(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about FluxCD Kustomizations in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.FluxKustomizationsResponse
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /fluxkustomizations [get]
func GetFluxKustomizations(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -181,6 +191,8 @@ func GetFluxKustomizations(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about FluxCD Kustomizations in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.FluxHelmreleasesResponse
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router /fluxhelmreleases [get]
func GetFluxHelmreleases(w http.ResponseWriter, r *http.Request) {
//Connect to k8s api server
Expand All @@ -199,6 +211,8 @@ func GetFluxHelmreleases(w http.ResponseWriter, r *http.Request) {
// @Summary Get info about resources in cluster
// @Produce json
// @Success 200 {object} kubeApiResponseStruct.ResourceResponce
// @Failure 500 {object} string
// @Failure 503 {object} string
// @Router / [get]
func GetKubeInfo(w http.ResponseWriter, r *http.Request) {
// Variable declaration
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kubeinfo-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: ghcr.io/randsw/kubeinfo
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "1.1.8"
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
Loading