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
### Proposed Changes:
This PR significantly enhances the underlying code generation logic by
leveraging the Pulumi Kubernetes provider’s advanced schema generation
capabilities. The Kubernetes provider’s schema generation has been
thoroughly tested over multiple Kubernetes version releases, and used in
production environments, making it a robust solution. By adopting this
approach, we can efficiently resolve several codegen related bugs in
`crd2pulumi` without needing numerous fragile targeted fixes within the
current codebase.
### Technical Changes
- Removed manual parsing of CRD manifests.
- Integrated Pulumi Kubernetes provider's schema generation logic:
- CRD manifests are now converted to OpenAPI specs before being
schematized.
- Inline nested objects within CRDs are now treated as global objects in
the OpenAPI layer, simplifying handling and reducing code complexity.
- Updated mocked CRDs to be valid for testing, as valid CRDs are
required for OpenAPI conversion.
- Expanded e2e tests by adding additional CRDs to be code generated, and
adding compilation steps for Go, Node, and Dotnet languages to ensure
validity.
### User Facing Changes
This PR maintains backward compatibility as much as possible, though
some behavior changes are expected:
1. CRDs provided to crd2pulumi must be valid and acceptable by a
Kubernetes API server. Previous versions made best-effort conversions
regardless of validity.
2. Generated Go code now adheres to the `--goPath` flag if provided,
ensuring code is generated at the specified path, aligning Go with other
languages in terms of folder structure.
3. While we’ve made efforts to maintain consistency, field names and
resource names in generated Pulumi code may change slightly due to
cross-language sanitization of field and resource names.
### Related Issues
Resolves#142, resolves#141, resolves#115, resolves#113, resolves#110, resolves#104, resolves#103, resolves#100, resolves#97,
resolves#89, resolves#70, resolves#49, resolves#34, resolves#30,
resolves#26, resolves#21, resolves#111, resolves#50
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,25 @@
2
2
3
3
## Unreleased
4
4
5
+
## 1.5.0 (2024-09-13)
6
+
7
+
### Added
8
+
- Patch variant resources are now generated for all custom resources. Patch resources allow you to modify and an existing custom resource. For more details on using Patch resources, see our [documentation](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/#patch-a-resource).
9
+
10
+
### Changed
11
+
- The Pulumi schema generation now utilizes the library from the Pulumi Kubernetes provider, replacing the previous custom implementation. This resolves a number of correctness issues when generating code. [#143](https://github.com/pulumi/crd2pulumi/pull/143)
12
+
- Golang package generation now correctly adheres to the `--goPath` CLI flag, aligning with the behavior of other languages. [#89](https://github.com/pulumi/crd2pulumi/issues/89)
13
+
- CRDs with oneOf fields are now correctly typed and not generic. [#97](https://github.com/pulumi/crd2pulumi/issues/97)
14
+
-
15
+
16
+
### Fixed
17
+
- Various code generation correctness issues have been addressed, including:
18
+
- Python packages can now be successfully imported and consumed by Pulumi Python programs. [#113](https://github.com/pulumi/crd2pulumi/issues/113)
19
+
- Golang packages no longer produce compilation errors due to duplicate declarations. [#104](https://github.com/pulumi/crd2pulumi/issues/104)
20
+
- NodeJS package names are now properly generated. [#70](https://github.com/pulumi/crd2pulumi/issues/70)
21
+
- Dotnet packages now include the correct imports. [#49](https://github.com/pulumi/crd2pulumi/issues/49)
0 commit comments