Closed LeoLiuYan closed 2 years ago
U can write code as follows:
import base.pkg.kusion_models.kube.frontend
# The application configuration in stack will overwrite
# the configuration with the same attribute in base.
appConfiguration: frontend.Server {
image = "gcr.io/google-samples/gb-frontend:v4-test"
schedulingStrategy.resource = res_tpl.tiny
mainContainer: container.Main {
env: [{
name = "TEST"
value = "test"
}]
}
}
Please note that mainContainer
and env
use :
operator; name
and value
use =
operator
If U want to append more envs, U can write code as follows (use +=
operator):
import base.pkg.kusion_models.kube.frontend
# The application configuration in stack will overwrite
# the configuration with the same attribute in base.
appConfiguration: frontend.Server {
image = "gcr.io/google-samples/gb-frontend:v4-test"
schedulingStrategy.resource = res_tpl.tiny
mainContainer: container.Main {
env += [{
name = "TEST"
value = "test"
}]
}
}
@Peefy THX
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
konfig/appops/guestbook-frontend/base/main.k
konfig/appops/guestbook-frontend/test/main.k
2. What did you expect to see? (Required)
Kusion compile success.
3. What did you see instead (Required)
4. What is your KusionStack components version? (Required)