Start implementing a logger

This commit is contained in:
2024-05-06 11:39:28 +02:00
parent 0cb8295df1
commit bcd62301e3
4 changed files with 33 additions and 6 deletions

View File

@ -7,6 +7,7 @@ import (
"log"
"strings"
"github.com/go-logr/logr"
"github.com/google/uuid"
"github.com/joho/godotenv"
@ -225,6 +226,11 @@ func (env *Environemnt) Delete(ctx context.Context) error {
}
func (env *Environemnt) ListEnvs(ctx context.Context, searchString string) ([]*Environemnt, error) {
log, err := logr.FromContext(ctx)
if err != nil {
return nil, err
}
log.Info("Test a new logger")
env.Controller.GetClient()
conf := &rest.Config{
Host: "https://kubernetes.default.svc.cluster.local:443",