Skip to content

Commit 9d94eb0

Browse files
authored
feat: delete runtime config in module proto (#970)
1 parent 97c6f0f commit 9d94eb0

File tree

4 files changed

+14
-34
lines changed

4 files changed

+14
-34
lines changed

docs/design/kusion_module/kusion_modules.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ message GeneratorRequest {
117117
bytes dev_module_config = 5;
118118
// PlatformModuleConfig is the platform engineer's inputs of this module
119119
bytes platform_module_config = 6;
120-
// RuntimeConfig is the runtime configurations defined in the workspace
121-
bytes runtime_config = 7;
122120
}
123121
124122
// GeneratorResponse represents the generate result of the generator.

pkg/modules/generators/app_configurations_generator.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ func parseModuleKey(accessory v1.Accessory, dependencies *pkg.Dependencies) (str
390390
}
391391

392392
func (g *appConfigurationGenerator) initModuleRequest(config moduleConfig) (*proto.GeneratorRequest, error) {
393-
var workloadConfig, devConfig, platformConfig, runtimeConfig []byte
393+
var workloadConfig, devConfig, platformConfig []byte
394394
var err error
395395
// Attention: we MUST yaml.v2 to serialize the object,
396396
// because we have introduced MapSlice in the Workload which is supported only in the yaml.v2
@@ -409,19 +409,14 @@ func (g *appConfigurationGenerator) initModuleRequest(config moduleConfig) (*pro
409409
return nil, fmt.Errorf("marshal platform module config failed. %w", err)
410410
}
411411
}
412-
if g.ws.Runtimes != nil {
413-
if runtimeConfig, err = yaml.Marshal(g.ws.Runtimes); err != nil {
414-
return nil, fmt.Errorf("marshal runtime config failed. %w", err)
415-
}
416-
}
412+
417413
protoRequest := &proto.GeneratorRequest{
418414
Project: g.project,
419415
Stack: g.stack,
420416
App: g.appName,
421417
Workload: workloadConfig,
422418
DevModuleConfig: devConfig,
423419
PlatformModuleConfig: platformConfig,
424-
RuntimeConfig: runtimeConfig,
425420
}
426421
return protoRequest, nil
427422
}

pkg/modules/proto/module.pb.go

Lines changed: 12 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/modules/proto/module.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ message GeneratorRequest {
1515
bytes dev_module_config = 5;
1616
// PlatformModuleConfig is the platform engineer's inputs of this module
1717
bytes platform_module_config = 6;
18-
// RuntimeConfig is the runtime configurations defined in the workspace
19-
bytes runtime_config = 7;
2018
}
2119

2220
// GeneratorResponse represents the generate result of the generator.

0 commit comments

Comments
 (0)