52c5aedc63
'make manifests' attempts to generate all airshipctl API types, but several types throw errors and the resulting CRDs can't be properly generated. This change: - updates the controller-gen version to pull in a bug fix for the error 'map values must be a named type, not *ast.StarExpr' - modifies the Templater type's Values member to be of type JSON since controller-gen does not support map[string]interface{}, and unmarshals it separately in the templater itself - adds 'image_repositories' to the VersionsCatalogueSpec struct to ensure it doesn't get deleted from the schema when manifests get regenerated - checks in generated copies of all CRDs from airshipctl's API types, not just catalogues, to be used for validation Closes: #574 Change-Id: I89a12cfd307a08da9aaec9773eac01169ea43ace |
||
---|---|---|
.. | ||
baremetal_manager.go | ||
bootconfiguration_types.go | ||
cluster_map_types.go | ||
clusterctl_types_test.go | ||
clusterctl_types.go | ||
genericcontainer_types.go | ||
groupversion_info.go | ||
isoconfiguration.go | ||
kubeconfig_types.go | ||
kubernetes_apply_types.go | ||
metadata_types.go | ||
networkcatalogue_types.go | ||
phase_types.go | ||
phaseplan_types.go | ||
README.md | ||
replacement_plugin_types.go | ||
templater_plugin_types.go | ||
versionscatalogue_types.go | ||
zz_generated.deepcopy.go |
Generating zz_generated.deepcopy.go in api/v1alpha1
This directory contains the data types needed by airshipctl phase run command.
When you add a new data structure in this directory you will need to generate the file zz_generated.deepcopy.go. To generate this file you will need the tool *controller-gen" executable.
If you don't have controller-gen in your machine, clone the following repository and compile it.
git clone https://github.com/kubernetes-sigs/controller-tools.git
cd controller-tools/cmd/controller-gen
go build -o controller-gen
Now you can generate the zz_generated.deepcopy.go using controller-gen as follow:
/path/to/controller-gen object paths=/path/to/airshipctl/pkg/api/v1alpha1/
At this point you should have a newly generated zz_generated.deepcopy.go. Just check if your data structure has been added to this file and you are good to go.
TODO: Add this task in the Makefile