-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch ensures the CloudConfig YAML produced by the inline CloudInit spec is validated against the official CloudConfig schema from Cloud-Init. This patch also relocates the `cloudinit` utility package from `./pkg/vmprovider/providers/vsphere2/cloudinit` to `./pkg/util/cloudinit`. Since we do no anticipate future API revisions as a _huge_ departure from what has been established in v1alpha2, it is safe to use those types in utility code as they can be find/replaced with later schema versions, ex. `v1alpha3`, when that time comes. Other than the reference to a `github.com/vmware-tanzu/vm-operator/api/v1alpha2/cloudinit.CloudConfig`, the code in `./pkg/util/cloudinit` is completely unrelated to the vSphere provider, hence its relocation under the utility package.
- Loading branch information
Showing
22 changed files
with
7,391 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:20 AS build | ||
WORKDIR /quicktype | ||
|
||
RUN npm install --prefix /quicktype quicktype | ||
|
||
FROM gcr.io/distroless/nodejs20-debian12 | ||
COPY --from=build /quicktype /quicktype | ||
|
||
WORKDIR /output | ||
CMD [ \ | ||
"/quicktype/node_modules/quicktype/dist/index.js", \ | ||
"--src", "/schema.json", \ | ||
"--src-lang", "schema", \ | ||
"--out", "/output/cloudconfig.go", \ | ||
"--lang", "go", \ | ||
"--package", "schema" \ | ||
] |
Oops, something went wrong.