This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Rename .spec.image.ociClaim.ref
to .spec.image.oci
for simplicity
#311
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
81cf9cd
OCIImageClaim -> OCIRef, simplify by naming the field `oci`
twelho f023830
Add conversion for `v1alpha1` for OCIClaim <-> OCIRef
twelho c8b42d8
Update reconciliation loop to use OCIRef
twelho 0c7eb4a
make autogen tidy
twelho 01e0850
Fix small typo
twelho 9d6ab9e
Address feedback, OCIRef -> OCI, remove extras, consolidate conversion
twelho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,103 @@ func Convert_v1alpha1_OCIImageSource_To_ignite_OCIImageSource(in *OCIImageSource | |
out.ID, err = meta.ParseOCIContentID(contentRef) | ||
return | ||
} | ||
|
||
// Convert_ignite_ImageSpec_To_v1alpha1_ImageSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_ignite_ImageSpec_To_v1alpha1_ImageSpec(in *ignite.ImageSpec, out *ImageSpec, s conversion.Scope) error { | ||
if err := autoConvert_ignite_ImageSpec_To_v1alpha1_ImageSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIClaim.Ref = in.OCIRef | ||
out.OCIClaim.Type = ImageSourceTypeDocker | ||
|
||
return nil | ||
} | ||
|
||
// Convert_v1alpha1_ImageSpec_To_ignite_ImageSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_v1alpha1_ImageSpec_To_ignite_ImageSpec(in *ImageSpec, out *ignite.ImageSpec, s conversion.Scope) error { | ||
if err := autoConvert_v1alpha1_ImageSpec_To_ignite_ImageSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIRef = in.OCIClaim.Ref | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd comment specifically here that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added that comment to |
||
|
||
return nil | ||
} | ||
|
||
// Convert_ignite_KernelSpec_To_v1alpha1_KernelSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_ignite_KernelSpec_To_v1alpha1_KernelSpec(in *ignite.KernelSpec, out *KernelSpec, s conversion.Scope) error { | ||
if err := autoConvert_ignite_KernelSpec_To_v1alpha1_KernelSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIClaim.Ref = in.OCIRef | ||
out.OCIClaim.Type = ImageSourceTypeDocker | ||
|
||
return nil | ||
} | ||
|
||
// Convert_v1alpha1_KernelSpec_To_ignite_KernelSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_v1alpha1_KernelSpec_To_ignite_KernelSpec(in *KernelSpec, out *ignite.KernelSpec, s conversion.Scope) error { | ||
if err := autoConvert_v1alpha1_KernelSpec_To_ignite_KernelSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIRef = in.OCIClaim.Ref | ||
|
||
return nil | ||
} | ||
|
||
// Convert_ignite_VMImageSpec_To_v1alpha1_VMImageSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_ignite_VMImageSpec_To_v1alpha1_VMImageSpec(in *ignite.VMImageSpec, out *VMImageSpec, s conversion.Scope) error { | ||
if err := autoConvert_ignite_VMImageSpec_To_v1alpha1_VMImageSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIClaim.Ref = in.OCIRef | ||
out.OCIClaim.Type = ImageSourceTypeDocker | ||
|
||
return nil | ||
} | ||
|
||
// Convert_v1alpha1_VMImageSpec_To_ignite_VMImageSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_v1alpha1_VMImageSpec_To_ignite_VMImageSpec(in *VMImageSpec, out *ignite.VMImageSpec, s conversion.Scope) error { | ||
if err := autoConvert_v1alpha1_VMImageSpec_To_ignite_VMImageSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIRef = in.OCIClaim.Ref | ||
|
||
return nil | ||
} | ||
|
||
// Convert_ignite_VMKernelSpec_To_v1alpha1_VMKernelSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_ignite_VMKernelSpec_To_v1alpha1_VMKernelSpec(in *ignite.VMKernelSpec, out *VMKernelSpec, s conversion.Scope) error { | ||
if err := autoConvert_ignite_VMKernelSpec_To_v1alpha1_VMKernelSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIClaim.Ref = in.OCIRef | ||
out.OCIClaim.Type = ImageSourceTypeDocker | ||
|
||
return nil | ||
} | ||
|
||
// Convert_v1alpha1_VMKernelSpec_To_ignite_VMKernelSpec calls the autogenerated conversion function along with custom conversion logic | ||
func Convert_v1alpha1_VMKernelSpec_To_ignite_VMKernelSpec(in *VMKernelSpec, out *ignite.VMKernelSpec, s conversion.Scope) error { | ||
if err := autoConvert_v1alpha1_VMKernelSpec_To_ignite_VMKernelSpec(in, out, s); err != nil { | ||
return err | ||
} | ||
|
||
// Convert between the old and new OCI reference format | ||
out.OCIRef = in.OCIClaim.Ref | ||
|
||
return nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe create a
Convert_v1alpha1_OCIClaim_To_ignite_OCI(in *OCIClaim, out *meta.OCIImageRef) error
and vice-versa which you can call in all these higher-context functions?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 9d6ab9e.