Skip to content

Commit

Permalink
update log levels and docs
Browse files Browse the repository at this point in the history
Signed-off-by: Mmadu Manasseh <[email protected]>
  • Loading branch information
MeNsaaH committed Jan 10, 2025
1 parent 9d9616c commit dc5046e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ The full list of supported environment variables is described below:
|`KUBECHECKS_WORST_KUBECONFORM_STATE`|The worst state that can be returned from kubeconform.|`panic`|
|`KUBECHECKS_WORST_KYVERNO_STATE`|The worst state that can be returned from the kyverno checks.|`panic`|
|`KUBECHECKS_WORST_PREUPGRADE_STATE`|The worst state that can be returned from preupgrade checks.|`panic`|


See [integration](#integration) for more information on the tools integrated into `kubechecks` .
3 changes: 3 additions & 0 deletions docs/usage.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ The full list of supported environment variables is described below:
{{- range .Options }}
|`{{ .Env }}`|{{ .Usage }}|{{ if .Default }}`{{ .Default }}`{{ end }}|
{{- end }}


See [integration](#integration) for more information on the tools integrated into `kubechecks` .
2 changes: 1 addition & 1 deletion pkg/aisummary/openai_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func GetOpenAiClient(apiToken string) *OpenAiClient {
client := openai.NewClient(apiToken)
openAiClient = &OpenAiClient{client: client, enabled: true}
} else {
log.Debug().Msg("OpenAI client not enabled")
log.Info().Msg("OpenAI client not enabled")
openAiClient = &OpenAiClient{enabled: false}
}
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/argo_client/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ func (a *ArgoClient) generateManifests(ctx context.Context, app v1alpha1.Applica

var packageDir string
if a.sendFullRepository {
log.Info().Msg("sending full repository")
log.Debug().Msg("sending full repository")
packageDir = repo.Directory
} else {
log.Info().Msg("packaging app")
log.Debug().Str("app", app.Name).Msg("packaging app")
packageDir, err = packageApp(ctx, source, refs, repo, getRepo)
if err != nil {
return nil, errors.Wrap(err, "failed to package application")
Expand Down Expand Up @@ -258,7 +258,7 @@ func (a *ArgoClient) generateManifests(ctx context.Context, app v1alpha1.Applica
return nil, fmt.Errorf("failed to send manifest stream file: %w", err)
}

log.Debug().Msg("receiving repsonse")
log.Debug().Msg("receiving response")
response, err := stream.CloseAndRecv()
if err != nil {
return nil, errors.Wrap(err, "failed to get response")
Expand Down
2 changes: 1 addition & 1 deletion pkg/git/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (r *Repo) Clone(ctx context.Context) error {
}
}

log.Info().Msg("repo has been cloned")
log.Info().Str("repo", r.CloneURL).Msg("repo has been cloned")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *Server) ensureWebhooks(ctx context.Context) error {

if wh == nil {
if err = vcsClient.CreateHook(ctx, repo, fullUrl, s.ctr.Config.WebhookSecret); err != nil {
log.Info().Err(err).Msgf("failed to create hook for %s:", repo)
log.Error().Err(err).Msgf("failed to create hook for %s:", repo)
}
}
}
Expand Down

0 comments on commit dc5046e

Please sign in to comment.