Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit f15a9d7

Browse files
committed
feat: standard k8s cluster support #54
1 parent b762772 commit f15a9d7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

internal/manager/manager.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,17 @@ func (s *Service) loadSchemaFromFile(filename string) (*graphql.Schema, error) {
165165
return nil, err
166166
}
167167

168-
g, err := gateway.New(s.log, definitions, s.resolver)
168+
l := spec.Definitions{}
169+
170+
for key, def := range definitions {
171+
if !strings.Contains(key, "automaticd") {
172+
continue
173+
}
174+
175+
l[key] = def
176+
}
177+
178+
g, err := gateway.New(s.log, l, s.resolver)
169179
if err != nil {
170180
return nil, err
171181
}
@@ -215,7 +225,9 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
215225
return
216226
}
217227

218-
r = r.WithContext(kontext.WithCluster(r.Context(), logicalcluster.Name(workspace)))
228+
if s.appCfg.EnableKCP {
229+
r = r.WithContext(kontext.WithCluster(r.Context(), logicalcluster.Name(workspace)))
230+
}
219231

220232
split := strings.Split(token, " ")
221233
if len(split) == 1 {

0 commit comments

Comments
 (0)