INNER CODE UNIT · Go

flushOtel

kubescape/kubescape · httphandler/main.go:101

func flushOtel(ctx context.Context, shutdown func(context.Context)) {
	flushCtx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second)
	defer cancel()
	shutdown(flushCtx)
}

func initializeStorage(clusterName string, cfg config.Config) {
	namespace := getNamespace(cfg)
	logger.L().Debug("initializing storage", helpers.String("namespace", namespace))

	// Use shared ksinit logic for storage connection
	ksClient, err := ksinit.CreateKsObjectConnection(namespace, 0)
	if err != nil {
		logger.L().Fatal("storage initialization error", helpers.Error(err))
		return
	}

	s, err := storage.NewAPIServerStorage(clusterName, namespace, ksClient, cfg.ContinuousPostureScan)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…