INNER CODE UNIT · Go
setupCRDMigrator
syself/cluster-api-provider-hetzner · main.go:369
func setupCRDMigrator(ctx context.Context, mgr *strictManager) error {
crdMigratorConfig := map[client.Object]crdmigrator.ByObjectConfig{
&infrastructurev1beta1.HCloudMachineTemplate{}: {
// UseCache should be set to true only if an informer already exists for the API type
// (i.e. there is a controller watching this resource).
UseCache: true,
// UseStatusForStorageVersionMigration should be enabled only if the CRD defines a status subresource.
UseStatusForStorageVersionMigration: true,
},
&infrastructurev1beta1.HCloudMachine{}: {
UseCache: true,
UseStatusForStorageVersionMigration: true,
},
&infrastructurev1beta1.HCloudRemediationTemplate{}: {
UseCache: false,
UseStatusForStorageVersionMigration: true,
},