Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ENV CGO_ENABLED=0

WORKDIR /flyteorg/build

COPY app app
COPY dataproxy dataproxy
COPY executor executor
COPY flytecopilot flytecopilot
Expand Down
2 changes: 1 addition & 1 deletion actions/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/flyteorg/flyte/v2/actions"
actionsconfig "github.com/flyteorg/flyte/v2/actions/config"
"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
)

func main() {
Expand Down
26 changes: 26 additions & 0 deletions actions/config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package config

import (
"time"

"github.com/flyteorg/flyte/v2/flytestdlib/config"
)

Expand All @@ -21,10 +23,31 @@ var defaultConfig = &Config{
RunServiceURL: "http://localhost:8090",
// 8M slots × 8 bytes/pointer = 64 MB; can track ~8M unique actions.
RecordFilterSize: 1 << 23,
Apps: AppConfig{
Enabled: false,
Namespace: "flyte-apps",
DefaultRequestTimeout: 5 * time.Minute,
MaxRequestTimeout: time.Hour,
},
}

var configSection = config.MustRegisterSection(configSectionKey, defaultConfig)

// AppConfig holds configuration for the App deployment controller.
type AppConfig struct {
// Enabled controls whether the app deployment controller is started.
Enabled bool `json:"enabled" pflag:",Enable app deployment controller"`

// Namespace is the K8s namespace where KService CRDs are created.
Namespace string `json:"namespace" pflag:",Namespace for app KServices"`

// DefaultRequestTimeout is the request timeout applied to apps that don't specify one.
DefaultRequestTimeout time.Duration `json:"defaultRequestTimeout" pflag:",Default request timeout for apps"`

// MaxRequestTimeout is the hard cap on request timeout (Knative max is 3600s).
Comment thread
AdilFayyaz marked this conversation as resolved.
MaxRequestTimeout time.Duration `json:"maxRequestTimeout" pflag:",Maximum allowed request timeout for apps"`
}

// Config holds the configuration for the Actions service
type Config struct {
// HTTP server configuration
Expand All @@ -45,6 +68,9 @@ type Config struct {

// RecordFilterSize is the size of the bloom filter used to deduplicate RecordAction calls.
RecordFilterSize int `json:"recordFilterSize" pflag:",Size of the oppo bloom filter for deduplicating RecordAction calls"`

// Apps holds configuration for the app deployment controller.
Apps AppConfig `json:"apps"`
}

// ServerConfig holds HTTP server configuration
Expand Down
2 changes: 1 addition & 1 deletion actions/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/flyteorg/flyte/v2/actions/config"
actionsk8s "github.com/flyteorg/flyte/v2/actions/k8s"
"github.com/flyteorg/flyte/v2/actions/service"
"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/flytestdlib/logger"
"github.com/flyteorg/flyte/v2/gen/go/flyteidl2/actions/actionsconnect"
"github.com/flyteorg/flyte/v2/gen/go/flyteidl2/workflow/workflowconnect"
Expand Down
22 changes: 0 additions & 22 deletions app/db.go

This file was deleted.

5 changes: 3 additions & 2 deletions cache_service/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"os"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/cache_service"
cacheserviceconfig "github.com/flyteorg/flyte/v2/cache_service/config"
"github.com/flyteorg/flyte/v2/flytestdlib/contextutils"
"github.com/flyteorg/flyte/v2/flytestdlib/database"
"github.com/flyteorg/flyte/v2/flytestdlib/logger"
"github.com/flyteorg/flyte/v2/flytestdlib/promutils"
"github.com/flyteorg/flyte/v2/flytestdlib/promutils/labeled"
"github.com/flyteorg/flyte/v2/flytestdlib/storage"
Expand All @@ -24,7 +25,7 @@ func main() {
sc.Host = cfg.Server.Host
sc.Port = cfg.Server.Port

db, err := app.InitDB(ctx, database.GetConfig())
db, err := database.GetDB(ctx, database.GetConfig(), logger.GetConfig())
if err != nil {
return fmt.Errorf("failed to initialize database: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cache_service/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/go-gormigrate/gormigrate/v2"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/cache_service/config"
"github.com/flyteorg/flyte/v2/cache_service/migrations"
"github.com/flyteorg/flyte/v2/cache_service/service"
Expand Down
2 changes: 1 addition & 1 deletion dataproxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/dataproxy"
"github.com/flyteorg/flyte/v2/flytestdlib/contextutils"
"github.com/flyteorg/flyte/v2/flytestdlib/promutils"
Expand Down
2 changes: 1 addition & 1 deletion dataproxy/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/http"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/dataproxy/config"
"github.com/flyteorg/flyte/v2/dataproxy/service"
"github.com/flyteorg/flyte/v2/gen/go/flyteidl2/dataproxy/dataproxyconnect"
Expand Down
2 changes: 1 addition & 1 deletion events/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"os"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/events"
eventsconfig "github.com/flyteorg/flyte/v2/events/config"
)
Expand Down
2 changes: 1 addition & 1 deletion events/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net/http"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/events/config"
"github.com/flyteorg/flyte/v2/events/service"
"github.com/flyteorg/flyte/v2/flytestdlib/logger"
Expand Down
2 changes: 1 addition & 1 deletion executor/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
"github.com/flyteorg/flyte/v2/executor"
ctrl "sigs.k8s.io/controller-runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion executor/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

"github.com/flyteorg/flyte/v2/app"
"github.com/flyteorg/flyte/v2/flytestdlib/app"
flyteorgv1 "github.com/flyteorg/flyte/v2/executor/api/v1"
"github.com/flyteorg/flyte/v2/executor/pkg/config"
"github.com/flyteorg/flyte/v2/executor/pkg/controller"
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions flytestdlib/app/app_scheme.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package app

import (
"k8s.io/client-go/kubernetes/scheme"
servingv1 "knative.dev/serving/pkg/apis/serving/v1"
)

// InitAppScheme registers Knative Serving types (Service, Route, Configuration, Revision)
// into the client-go scheme so that the K8s client can manage KService CRDs.
// Must be called before creating any K8s clients that interact with apps.
func InitAppScheme() error {
return servingv1.AddToScheme(scheme.Scheme)
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
github.com/googleapis/gax-go/v2 v2.15.0
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3
github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/golang-lru v1.0.2
github.com/imdario/mergo v0.3.16
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgx/v5 v5.7.6
Expand Down Expand Up @@ -81,6 +81,7 @@ require (
k8s.io/client-go v0.34.1
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
knative.dev/serving v0.40.2
sigs.k8s.io/controller-runtime v0.22.4
)

Expand Down Expand Up @@ -116,6 +117,7 @@ require (
github.com/aws/smithy-go v1.24.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
Expand Down Expand Up @@ -145,6 +147,7 @@ require (
github.com/google/cel-go v0.26.0 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry v0.13.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/s2a-go v0.1.9 // indirect
Expand Down Expand Up @@ -173,6 +176,7 @@ require (
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/ncw/swift v1.0.53 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
Expand Down Expand Up @@ -222,6 +226,8 @@ require (
k8s.io/component-base v0.34.1 // indirect
k8s.io/kms v0.28.3 // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
knative.dev/networking v0.0.0-20240116081125-ce0738abf051 // indirect
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
Loading
Loading