Closed Petrosz007 closed 4 months ago
Hello @Petrosz007 For this error, you need to import the entire k8s.api.apps.v1
package. For example
import k8s.api.apps.v1 as appsv1
import k8s.api.core.v1 as corev1
import k8s.apimachinery.pkg.apis.meta.v1 as metav1
statefulSet = appsv1.StatefulSet {
spec: appsv1.StatefulSetSpec{
serviceName: "foo"
template: corev1.PodTemplateSpec{}
selector: metav1.LabelSelector{}
}
}
Oh cool, thank you so much! I'm new to KCL and I didn't know that the import system should be used this way 😄
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
In the
main.k
:Run
kcl run main.k
2. What did you expect to see? (Required)
The code compiles
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
kcl.mod.lock
: