Add depot, attendant, jetfire, optimus, ota services with kustomize overlays

This commit is contained in:
Chris Rai
2026-01-31 15:35:07 -05:00
parent a0ec642ca1
commit 9a5cb2f547
404 changed files with 38817 additions and 16 deletions

View File

@@ -0,0 +1,46 @@
package utils
import (
"strings"
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
az "github.com/Azure/azure-storage-blob-go/azblob"
"github.com/pkg/errors"
)
type Direction int
const (
Up Direction = iota
Down
)
var (
cursorDirection = map[string]Direction{
"up": Up,
"down": Down,
}
)
func ParseCursorDirection(str string) (Direction, bool) {
c, ok := cursorDirection[strings.ToLower(str)]
return c, ok
}
var (
AzureAccount = envtool.GetEnv("AZURE_STORAGE_ACCOUNT", "REPLACE_ME")
AzureAccountKey = envtool.GetEnv("AZURE_STORAGE_ACCESS_KEY", "REPLACE_ME")
AzureTRexLogsContainerName = envtool.GetEnv("AZURE_TREX_LOGS_STORAGE_CONTAINER_NAME", "trex-logs")
ReadFileName = "raw.log"
AzureLogsBlobPath = "https://%s.blob.core.windows.net/%s"
)
func AzureStorageCredential() (*az.SharedKeyCredential, error) {
cred, err := az.NewSharedKeyCredential(AzureAccount, AzureAccountKey)
if err != nil {
return nil, errors.WithStack(err)
}
return cred, nil
}