Open mtiller opened 4 years ago
You can access all official resources using kubernetes-models/<apiVersion>/<kind>
. Here's the example of importing Ingress
class.
import { Ingress } from 'kubernetes-models/networking.k8s.io/v1beta1';
import { Ingress } from 'kubernetes-models/networking.k8s.io/v1beta1/Ingress';
This ticket can be closed or do you think we should document these two patterns in the README after the Pod example?
kubernetes-models/<apiVersion>/<kind>
@kubernetes-models/<module>/<apiGroup>/<apiVersion>/<kind>
What do you think about creating a package @kubernetes-models/core
?
This is a very cool idea. Converting all the open API stuff into TypeScript definitions is very cool. But I'm wondering how this is meant to be organized. I can see, for example, that
Deployment
can be imported fromkubernetes-models/apps/v1
andService
can be imported fromkubernetes-models/v1
. But what aboutIngress
? It seems you have to import that fromkubernetes-models/_definitions/IoK8sApiExtensionsV1beta1Ingress
. That's not so easy to find. Was there a reason thatIngress
wasn't included in an easier to access package?