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
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ type Image struct { | |
|
||
// ImageSpec declares what the image contains | ||
type ImageSpec struct { | ||
OCIClaim OCIImageClaim `json:"ociClaim"` | ||
OCIRef meta.OCIImageRef `json:"oci"` | ||
} | ||
|
||
// ImageSourceType is an enum of different supported Image Source Types | ||
|
@@ -38,17 +38,6 @@ const ( | |
ImageSourceTypeDocker ImageSourceType = "Docker" | ||
) | ||
|
||
// OCIImageClaim defines a claim for importing an OCI image | ||
type OCIImageClaim struct { | ||
// Type defines how the image should be imported | ||
Type ImageSourceType `json:"type"` | ||
// Ref defines the reference to use when talking to the backend. | ||
// This is most commonly the image name, followed by a tag. | ||
// Other supported ways are $registry/$user/$image@sha256:$digest | ||
// This ref is also used as ObjectMeta.Name for kinds Images and Kernels | ||
Ref meta.OCIImageRef `json:"ref"` | ||
} | ||
|
||
// OCIImageSource specifies how the OCI image was imported. | ||
// It is the status variant of OCIImageClaim | ||
type OCIImageSource struct { | ||
|
@@ -136,7 +125,7 @@ type Kernel struct { | |
|
||
// KernelSpec describes the properties of a kernel | ||
type KernelSpec struct { | ||
OCIClaim OCIImageClaim `json:"ociClaim"` | ||
OCIRef meta.OCIImageRef `json:"oci"` | ||
// Optional future feature, support per-kernel specific default command lines | ||
// DefaultCmdLine string | ||
} | ||
|
@@ -183,12 +172,12 @@ type VMSpec struct { | |
} | ||
|
||
type VMImageSpec struct { | ||
OCIClaim OCIImageClaim `json:"ociClaim"` | ||
OCIRef meta.OCIImageRef `json:"oci"` | ||
} | ||
|
||
type VMKernelSpec struct { | ||
OCIClaim OCIImageClaim `json:"ociClaim"` | ||
CmdLine string `json:"cmdLine,omitempty"` | ||
OCIRef meta.OCIImageRef `json:"oci"` | ||
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. Generally, you always want to match the field name with the JSON tag to avoid so-called "OpenAPI violations". 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. Changed in 9d6ab9e. |
||
CmdLine string `json:"cmdLine,omitempty"` | ||
} | ||
|
||
type VMNetworkSpec struct { | ||
|
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
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
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.
Also remove the
ImageSourceType
enumThere 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.
Removed in 9d6ab9e.
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.
Also removed
GetImageSourceTypes
as it's redundant.