You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.rst
+22-2
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,8 @@ How it works
43
43
44
44
Kubedantic does the following:
45
45
46
-
1. Uses the `kubernetes <https://github.com/kubernetes-client/python>`_ library to fetch the openapi specifications from the cluster.
47
-
2. Merges the specifications extracted from the openapi specifications into a single schema file (one for the native types and one for the custom resources).
46
+
1. Uses the `kubernetes <https://github.com/kubernetes-client/python>`_ library to fetch the OpenAPI specifications from the cluster.
47
+
2. Merges the specifications extracted into a couple schema file (one for the native types and one for the custom resources).
48
48
3. Uses `datamodel-code-generator <https://github.com/koxudaxi/datamodel-code-generator>`_ to generate the Pydantic models from each schema file.
49
49
50
50
Schema files will be cached locally in the `kubedantic_specs/` directory, e.g.:
@@ -56,3 +56,23 @@ Schema files will be cached locally in the `kubedantic_specs/` directory, e.g.:
56
56
└── crd.json # Custom resource definitions
57
57
58
58
You can control the cache location by using the `--specs-path` option.
59
+
60
+
Models will be generated by default in the `kubedantic_models/` directory, e.g.:
61
+
62
+
.. code-block:: bash
63
+
64
+
kubedantic_models/
65
+
├── crd
66
+
│ └── io
67
+
│ └── argoproj
68
+
│ ├── __init__.py
69
+
│ └── v1alpha1.py
70
+
└── k8s
71
+
└── io
72
+
└── k8s
73
+
└── api
74
+
└── apps
75
+
├── __init__.py
76
+
└── v1.py
77
+
78
+
You can control the output location by using the `--output-path` option.
0 commit comments