Skip to content
Draft
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
126 changes: 39 additions & 87 deletions cmd/adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import (
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/dryrun"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/executor"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/hyperfleetapi"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/k8sclient"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/maestroclient"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/transportclient"
"github.com/openshift-hyperfleet/hyperfleet-adapter/internal/transportregistry"
"github.com/openshift-hyperfleet/hyperfleet-adapter/pkg/health"
"github.com/openshift-hyperfleet/hyperfleet-adapter/pkg/logger"
"github.com/openshift-hyperfleet/hyperfleet-adapter/pkg/metrics"
Expand Down Expand Up @@ -304,88 +303,6 @@ func createAPIClient(apiConfig configloader.HyperfleetAPIConfig, log logger.Logg
return hyperfleetapi.NewClient(log, opts...)
}

// createTransportClient creates the appropriate transport client based on config.
func createTransportClient(
ctx context.Context,
config *configloader.Config,
log logger.Logger,
) (transportclient.TransportClient, error) {
if config.Clients.Maestro != nil {
log.Info(ctx, "Creating Maestro transport client...")
client, err := createMaestroClient(ctx, config.Clients.Maestro, log)
if err != nil {
return nil, fmt.Errorf("failed to create Maestro client: %w", err)
}
log.Info(ctx, "Maestro transport client created successfully")
return client, nil
}

log.Info(ctx, "Creating Kubernetes transport client...")
client, err := createK8sClient(ctx, config.Clients.Kubernetes, log)
if err != nil {
return nil, fmt.Errorf("failed to create Kubernetes client: %w", err)
}
log.Info(ctx, "Kubernetes transport client created successfully")
return client, nil
}

// createK8sClient creates a Kubernetes client from the config
func createK8sClient(
ctx context.Context,
k8sConfig configloader.KubernetesConfig,
log logger.Logger,
) (*k8sclient.Client, error) {
clientConfig := k8sclient.ClientConfig{
KubeConfigPath: k8sConfig.KubeConfigPath,
QPS: k8sConfig.QPS,
Burst: k8sConfig.Burst,
}
return k8sclient.NewClient(ctx, clientConfig, log)
}

// createMaestroClient creates a Maestro client from the config
func createMaestroClient(
ctx context.Context,
maestroConfig *configloader.MaestroClientConfig,
log logger.Logger,
) (*maestroclient.Client, error) {
config := &maestroclient.Config{
MaestroServerAddr: maestroConfig.HTTPServerAddress,
GRPCServerAddr: maestroConfig.GRPCServerAddress,
SourceID: maestroConfig.SourceID,
Insecure: maestroConfig.Insecure,
}

if maestroConfig.Timeout != "" {
d, err := time.ParseDuration(maestroConfig.Timeout)
if err != nil {
return nil, fmt.Errorf("invalid maestro timeout %q: %w", maestroConfig.Timeout, err)
}
config.HTTPTimeout = d
}

if maestroConfig.ServerHealthinessTimeout != "" {
d, err := time.ParseDuration(maestroConfig.ServerHealthinessTimeout)
if err != nil {
return nil, fmt.Errorf(
"invalid maestro serverHealthinessTimeout %q: %w",
maestroConfig.ServerHealthinessTimeout,
err,
)
}
config.ServerHealthinessTimeout = d
}

if maestroConfig.Auth.TLSConfig != nil {
config.CAFile = maestroConfig.Auth.TLSConfig.CAFile
config.ClientCertFile = maestroConfig.Auth.TLSConfig.CertFile
config.ClientKeyFile = maestroConfig.Auth.TLSConfig.KeyFile
config.HTTPCAFile = maestroConfig.Auth.TLSConfig.HTTPCAFile
}

return maestroclient.NewMaestroClient(ctx, config, log)
}

// buildExecutor creates the executor with the given clients.
func buildExecutor(
config *configloader.Config,
Expand Down Expand Up @@ -545,12 +462,27 @@ func runServe(flags *pflag.FlagSet) error {
return fmt.Errorf("failed to create HyperFleet API client: %w", err)
}

tc, err := createTransportClient(ctx, config, log)
transportRuntime, err := transportregistry.Build(ctx, config, log)
if err != nil {
errCtx := logger.WithErrorField(ctx, err)
log.Errorf(errCtx, "Failed to create transport client")
log.Errorf(errCtx, "Failed to create transport registry")
return err
}
defer func() {
if closeErr := transportRuntime.Close(); closeErr != nil {
errCtx := logger.WithErrorField(ctx, closeErr)
log.Warnf(errCtx, "Failed to close transport registry")
}
}()

compatibilityKey := configloader.TransportClientKubernetes
if config.Clients.Maestro != nil {
compatibilityKey = configloader.TransportClientMaestro
}
tc, err := transportRuntime.Registry.Get(compatibilityKey)
if err != nil {
return fmt.Errorf("failed to resolve transport client: %w", err)
}

// Build executor
log.Info(ctx, "Creating event executor...")
Expand Down Expand Up @@ -740,8 +672,28 @@ func runDryRun(flags *pflag.FlagSet) error {
dryrunClient = dryrun.NewDryrunTransportClient()
}

transportRuntime, err := transportregistry.BuildRecording(config, dryrunClient)
if err != nil {
return fmt.Errorf("failed to create recording transport registry: %w", err)
}
defer func() {
if closeErr := transportRuntime.Close(); closeErr != nil {
errCtx := logger.WithErrorField(ctx, closeErr)
log.Warnf(errCtx, "Failed to close recording transport registry")
}
}()

compatibilityKey := configloader.TransportClientKubernetes
if config.Clients.Maestro != nil {
compatibilityKey = configloader.TransportClientMaestro
}
tc, err := transportRuntime.Registry.Get(compatibilityKey)
if err != nil {
return fmt.Errorf("failed to resolve recording transport client: %w", err)
}

// Build executor with mock clients (same builder as serve, no metrics in dry-run)
exec, err := buildExecutor(config, dryrunAPI, dryrunClient, log, nil)
exec, err := buildExecutor(config, dryrunAPI, tc, log, nil)
if err != nil {
return fmt.Errorf("failed to create executor: %w", err)
}
Expand Down
22 changes: 22 additions & 0 deletions configs/adapter-config-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ adapter:
# Flag: --debug-config
debug_config: false

# Named deployment transports and stores. These are infrastructure settings,
# loaded with the deployment config (including Viper overrides); they do not
# belong in the task configuration.
#
# A Kubernetes entry needs no store. A remote entry writes desires through a
# named memory or Redis store. Names are stable registry keys, so multiple
# entries can use the same transport or store type.
transports:
kubernetes:
type: kubernetes
remote:
type: remote
store: adapter-desires

stores:
adapter-desires:
type: memory
# For Redis, replace the memory store above (or add another named store):
# redis-desires:
# type: redis
# url: "rediss://username:password@redis.example.com:6379/0"

# Logging configuration
# Priority: CLI flag > LOG_LEVEL/LOG_FORMAT/LOG_OUTPUT env vars > this file > defaults
log:
Expand Down
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ go 1.26.0
require (
cel.dev/cel-go v0.32.0
github.com/Masterminds/semver/v3 v3.5.0
github.com/alicebob/miniredis/v2 v2.39.0
github.com/cloudevents/sdk-go/v2 v2.16.2
github.com/go-playground/validator/v10 v10.30.3
github.com/go-viper/mapstructure/v2 v2.5.0
github.com/mitchellh/copystructure v1.2.0
github.com/openshift-hyperfleet/hyperfleet-applier v0.0.0-20260827133207-94b7a4d56697
github.com/openshift-hyperfleet/hyperfleet-broker v1.1.1
github.com/openshift-online/maestro v0.0.0-20260202062555-48b47506a254
github.com/openshift-online/ocm-sdk-go v0.1.510
github.com/prometheus/client_golang v1.24.1
github.com/prometheus/client_model v0.6.2
github.com/redis/go-redis/v9 v9.22.0
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
Expand Down Expand Up @@ -128,6 +131,7 @@ require (
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/openshift-hyperfleet/hyperfleet-logger v0.0.0-20260811173525-c9f9e282d029 // indirect
github.com/pelletier/go-toml/v2 v2.4.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -146,6 +150,7 @@ require (
github.com/tklauser/go-sysconf v0.4.0 // indirect
github.com/tklauser/numcpus v0.12.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/yuin/gopher-lua v1.1.1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
Expand All @@ -158,6 +163,7 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect
go.opentelemetry.io/otel/metric v1.46.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
Expand All @@ -180,7 +186,7 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.37.0 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 // indirect
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
Expand Down
28 changes: 24 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ github.com/ThreeDotsLabs/watermill-amqp/v3 v3.1.0 h1:2EhCSlRZyZZUpLMh7PvhaTKJus0
github.com/ThreeDotsLabs/watermill-amqp/v3 v3.1.0/go.mod h1:eYO5aoQNezSBHuuiW69vj8iyH90bJSld1+zUvhhfJsQ=
github.com/ThreeDotsLabs/watermill-googlecloud/v2 v2.0.1 h1:UF8mC04XepJ5uP0EN6YOUFjfQRKEJvgPO/lVOe8ftms=
github.com/ThreeDotsLabs/watermill-googlecloud/v2 v2.0.1/go.mod h1:dIL2o+0uhh3GUgk3yfayPorjO83oSvO4J9fKsxASnVw=
github.com/alicebob/miniredis/v2 v2.39.0 h1:M7WbmV5BmV56L8KTG0rw6vEQ+woTOghpDgin2xv4A0g=
github.com/alicebob/miniredis/v2 v2.39.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M=
Expand Down Expand Up @@ -218,6 +224,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk=
github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down Expand Up @@ -273,8 +281,12 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/openshift-hyperfleet/hyperfleet-applier v0.0.0-20260827133207-94b7a4d56697 h1:9DFSlPuXlMY4zshztT4/MEnY6QAgu0WoVY1KFtVE9fg=
github.com/openshift-hyperfleet/hyperfleet-applier v0.0.0-20260827133207-94b7a4d56697/go.mod h1:tDZnkLwpVO5ksfPm3NH9dy5Yl0ZBSfbtOA3hj2wrmHc=
github.com/openshift-hyperfleet/hyperfleet-broker v1.1.1 h1:3zbpNuFL+OEvKl6a/KJAlHFcYR4QqQBoGkf35higypU=
github.com/openshift-hyperfleet/hyperfleet-broker v1.1.1/go.mod h1:E7Br4NnsaTTfWR2fEqHAtvFXUAgzFpksF+G5qTBMmy0=
github.com/openshift-hyperfleet/hyperfleet-logger v0.0.0-20260811173525-c9f9e282d029 h1:c3GdD3EUdR9lRjNot+aBIxVbAXbOSTtiQpWVTHnFHaU=
github.com/openshift-hyperfleet/hyperfleet-logger v0.0.0-20260811173525-c9f9e282d029/go.mod h1:5Nh2IMS2MouehZ4UiRXFMjhuwdys2DX26J4vArmXe6Y=
github.com/openshift-online/maestro v0.0.0-20260202062555-48b47506a254 h1:v/jYqdzZpzB/bscVpajlbcKgCNeV4tx4fkm5m2JR8Ug=
github.com/openshift-online/maestro v0.0.0-20260202062555-48b47506a254/go.mod h1:cyeif610uObNrbcyn5s1fZg7OWseVjaMAqgrEDA2Aec=
github.com/openshift-online/ocm-sdk-go v0.1.510 h1:oPwgGHPi6LeY+RANXUhJwVvkY4yvddyRqHHThHZZRyM=
Expand Down Expand Up @@ -303,6 +315,8 @@ github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+
github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY=
github.com/rabbitmq/amqp091-go v1.12.0 h1:V0v14Iqfs+MwHWihJt/nGS5Ulu0vw572b2Co3mwunkI=
github.com/rabbitmq/amqp091-go v1.12.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/redis/go-redis/v9 v9.22.0 h1:laDvpYXTJtZLloinw1fA5Kqd6HAEH2XKxOkG/PDq2F0=
github.com/redis/go-redis/v9 v9.22.0/go.mod h1:y2g0Wj8rQvuK0ELM+oxSudcLtC09JScs98I/X9gRWY4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down Expand Up @@ -350,8 +364,12 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
go.einride.tech/aip v0.83.0 h1:TI21IdeOnLTwZEJ3BxtImIZk6bsN2Q+sd0x99SLiQ+M=
go.einride.tech/aip v0.83.0/go.mod h1:E8+wdTApA70odnpFzJgsGogHozC2JCIhFJBKPr8bVig=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
Expand Down Expand Up @@ -392,6 +410,8 @@ go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu6
go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI=
go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk=
go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
Expand Down Expand Up @@ -508,16 +528,16 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.37.0 h1:Z//Vj9N7RA/yS2sDmxyeo7h+RR4zbUrd2vrd3Z0TbB4=
k8s.io/api v0.37.0/go.mod h1:LKXgcJWMc+f4OLbP5SFR8rulEg07zZhpi/zMULiBImk=
k8s.io/apiextensions-apiserver v0.36.0 h1:Wt7E8J+VBCbj4FjiBfDTK/neXDDjyJVJc7xfuOHImZ0=
k8s.io/apiextensions-apiserver v0.36.0/go.mod h1:kGDjH0msuiIB3tgsYRV0kS9GqpMYMUsQ3GHv7TApyug=
k8s.io/apiextensions-apiserver v0.36.4 h1:SfvCVt+4CqKWvzuVytYDT5g9hyb9MztoiYELIkPVrFc=
k8s.io/apiextensions-apiserver v0.36.4/go.mod h1:JT9V2Ju7ys1FY4zbSpmX9XOvKB3/BwsODc4hFQEa+Xo=
k8s.io/apimachinery v0.37.0 h1:Np2AbDtf8x6RDHiD8T9LbKJ9gaegeVNa8yNm5FuGKm0=
k8s.io/apimachinery v0.37.0/go.mod h1:RN3nhprFSCxOi5Selxd7oMTXOe/c+ZbcE7Im+TS2zkE=
k8s.io/client-go v0.37.0 h1:nsN31fy8wBySuZ+QRnKmrjRSQLOG2rvoGN0tKd12zhQ=
k8s.io/client-go v0.37.0/go.mod h1:FcGqw+Ll/gNQiq+nPGY1Oyt9y7SgDh1d3MW3RFDEbn0=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A=
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I=
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 h1:z5+pcu1jTyKK5mNTe2/+x+U6Uuv9jRVOJQLaBJJMpeI=
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I=
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 h1:jVkFFVfXdXP74B/zbO3hM3hpSFD0xvhQ5U686DPurkE=
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3/go.mod h1:M2s5JB1lIYP3jzZdorPLHXIPJzt9vv2muW5a6L9DtNM=
open-cluster-management.io/api v1.3.0 h1:Q3miH38BE3N5+PesHQ0kcFi5nhX5350m7OJWapZcVqY=
Expand Down
15 changes: 15 additions & 0 deletions internal/configloader/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ const (
FieldPost = "post"
FieldEnv = "env"
FieldEvent = "event"
FieldTransports = "transports"
FieldStores = "stores"
)

// Adapter field names
const (
FieldVersion = "version"
FieldStore = "store"
)

// Parameter field names
Expand Down Expand Up @@ -83,6 +86,18 @@ const (
TransportClientMaestro = "maestro"
)

// Deployment transport types.
const (
TransportTypeKubernetes = "kubernetes"
TransportTypeRemote = "remote"
)

// Deployment store types.
const (
StoreTypeMemory = "memory"
StoreTypeRedis = "redis"
)

// Resource field names
const (
FieldManifest = "manifest"
Expand Down
Loading