diff --git a/internal/controllers/applications.go b/internal/controllers/applications.go index 0303b5b..137d38f 100644 --- a/internal/controllers/applications.go +++ b/internal/controllers/applications.go @@ -5,6 +5,7 @@ import ( b64 "encoding/base64" "fmt" "os" + "strings" "git.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/helmhelper" "git.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/helmrelease" @@ -132,10 +133,10 @@ func (app *Application) Create(ctx context.Context) error { } logrus.Info(string(cfgYaml)) - formattedName := b64.StdEncoding.EncodeToString([]byte(app.Data.Application + app.Data.Name)) + formattedName := strings.ToLower(b64.StdEncoding.EncodeToString([]byte(app.Data.Application + app.Data.Name))) appSecret := corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: formattedName[0:10], + Name: formattedName[0:20], Namespace: app.UserID, Labels: map[string]string{ "component": "install",