Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels