We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kcode
apiVersion = "apps/v1" kind = "Deployment" metadata = { name = _app labels.app = _app } spec = { replicas = 3 selector.matchLabels = metadata.labels template.metadata.labels = metadata.labels template.spec.containers = [ { name = metadata.name image = "${metadata.name}:1.14.2" ports = [{ containerPort = 80 }] $protocol = "TCP" } ] } #_app: str = option("app") or "default" _app = option("app", "str", False, "", "工程名")
output
apiVersion: apps/v1 kind: Deployment metadata: labels: {} spec: replicas: 3 selector: matchLabels: {} template: metadata: labels: {} spec: containers: - image: Undefined:1.14.2 ports: - containerPort: 80 protocol: TCP
why _app not render as value
The text was updated successfully, but these errors were encountered:
See the KCL document. https://www.kcl-lang.io/docs/reference/lang/tour#variables
Sorry, something went wrong.
And _app needs to be defined before apiVersion. This feature will be released at kcl v0.9.0 See this PR kcl-lang/kcl#1104
_app
get it
No branches or pull requests
kcode
output
why _app not render as value
The text was updated successfully, but these errors were encountered: