Comments (8)
If
server
is deined in schema, we can write code as follows:server: pkg.Server = pkg.Server {}
If code in
pkg.Server
asschema NewServer: server: frontend.Server { workloadType = "deployment" }
and, we write code in
XMixin
asmixin XMixin: if True: server: frontend.Server { image = "xxxx" mainContainer = {} }
then, we execute
kusion compile
, it reportsattribute 'image' of Server is required and can't be None or Undefined
When we execute
kusion compile
, the values inschema
andmixin
not merged?
@LeoLiuYan Here, the Server
instance will first be created in NewServer
, where the check fails. U can write:
If code in
pkg.Server
asschema NewServer: mixin [XMixin] server: frontend.Server = frontend.Server { image = "default_image" workloadType = "deployment" }
and, we write code in
XMixin
asmixin XMixin: if True: server: frontend.Server { image = "xxxx" mainContainer = {} }
from konfig.
If server
is deined in schema, we can write code as follows:
server: pkg.Server = pkg.Server {}
from konfig.
fixed in kcl-lang/kcl#159
from konfig.
If
server
is deined in schema, we can write code as follows:server: pkg.Server = pkg.Server {}
If code in pkg.Server
as
schema NewServer:
server: frontend.Server {
workloadType = "deployment"
}
and, we write code in XMixin
as
mixin XMixin:
if True:
server: frontend.Server {
image = "xxxx"
mainContainer = {}
}
then, we execute kusion compile
, it reports
attribute 'image' of Server is required and can't be None or Undefined
When we execute kusion compile
, the values in schema
and mixin
not merged?
from konfig.
It works, but is redundant.
Is it possible to join first before the check
, when a shema includes mixin
?
from konfig.
It works, but is redundant. Is it possible to join first before
the check
, when a shema includesmixin
?
@LeoLiuYan Sure, we will design and optimize this feature with corresponding language proposals in the future.
from konfig.
It works, but is redundant. Is it possible to join first before
the check
, when a shema includesmixin
?
@Peefy@LeoLiuYan Sure, we will design and optimize this feature with corresponding language proposals in the future.
Cool~ Expect to use this "sugar" feature!
from konfig.
Related KCLVM Issue: kcl-lang/kcl#92 @LeoLiuYan
from konfig.
Related Issues (20)
- Refine the schema definitions of Alicloud RDS related resources
- Enhance Github Actions workflow: job apply cannot work HOT 1
- bug: code-city `kusion apply main.k` failed in Konfig codepaces HOT 7
- resource 模板不能单独配置 limit和request
- config app-name in file setting.yaml, can used resource`s namespace, so namespace should config different with app-name HOT 1
- Policies for image pull can be configured container HOT 3
- The application needs to support pvc volume
- Documentation: Add a model development tutorial
- Refactor: upgrade Konfig as the Kusion example repo
- Manual approval required for workflow run 9410810943: Deploying example/quickstart/default HOT 2
- Manual approval required for workflow run 9480296729: Deploying example/nginx/dev example/service-multi-stack/dev example/service-multi-stack/prod example/simple-job/dev example/simple-service/dev example/wordpress-cloud-rds/prod example/wordpress-local-db/prod HOT 2
- Manual approval required for workflow run 9499877053: Deploying example/ai-agent-demo/dev HOT 2
- Manual approval required for workflow run 10246228260: [Preview] Deploying example/quickstart/default HOT 2
- Provide prebuild dev containers for Konfig HOT 3
- The service resource is missing in demo project appops/guestbook-frontend
- The order of key-value pairs in compiled golden files is inconsistent with the compile result with current version kusion
- missing resources in the compiled data when defining a multiple components Server
- Add schema KubeVelaAppConfig to support KubeVela App and IaaS resources HOT 4
- app-service not found in http-echo demo HOT 1
- CI test always failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from konfig.