mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-09-16 23:28:48 +00:00
push image to registry
This commit is contained in:
@@ -17,8 +17,6 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
@@ -36,38 +34,18 @@ type OSArtifactSpec struct {
|
||||
// Points to a prepared kairos image (e.g. a released one)
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
|
||||
// Points to a vanilla (non-Kairos) image. osbuilder will try to convert this to a Kairos image
|
||||
BaseImageName string `json:"baseImageName,omitempty"`
|
||||
|
||||
// Points to a Secret that contains a Dockerfile. osbuilder will build the image using that Dockerfile and will try to create a Kairos image from it.
|
||||
BaseImageDockerfile *SecretKeySelector `json:"baseImageDockerfile,omitempty"`
|
||||
|
||||
ISO bool `json:"iso,omitempty"`
|
||||
|
||||
// +kubebuilder:validation:Type:=string
|
||||
// +kubebuilder:validation:Enum:=rpi3;rpi4
|
||||
Model *Model `json:"model,omitempty"`
|
||||
|
||||
//Disk-only stuff
|
||||
DiskSize string `json:"diskSize,omitempty"`
|
||||
CloudImage bool `json:"cloudImage,omitempty"`
|
||||
AzureImage bool `json:"azureImage,omitempty"`
|
||||
GCEImage bool `json:"gceImage,omitempty"`
|
||||
|
||||
Netboot bool `json:"netboot,omitempty"`
|
||||
NetbootURL string `json:"netbootURL,omitempty"`
|
||||
|
||||
CloudConfigRef *SecretKeySelector `json:"cloudConfigRef,omitempty"`
|
||||
GRUBConfig string `json:"grubConfig,omitempty"`
|
||||
|
||||
Bundles []string `json:"bundles,omitempty"`
|
||||
FileBundles map[string]string `json:"fileBundles,omitempty"`
|
||||
OSRelease string `json:"osRelease,omitempty"`
|
||||
KairosRelease string `json:"kairosRelease,omitempty"`
|
||||
Bundles []string `json:"bundles,omitempty"`
|
||||
FileBundles map[string]string `json:"fileBundles,omitempty"`
|
||||
|
||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
|
||||
Exporters []batchv1.JobSpec `json:"exporters,omitempty"`
|
||||
Volume *corev1.PersistentVolumeClaimSpec `json:"volume,omitempty"`
|
||||
OutputImage *OutputImage `json:"outputImage,omitempty"`
|
||||
}
|
||||
|
||||
type SecretKeySelector struct {
|
||||
@@ -76,6 +54,14 @@ type SecretKeySelector struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
}
|
||||
|
||||
type OutputImage struct {
|
||||
Registry string `json:"registry,omitempty"`
|
||||
Repository string `json:"repository,omitempty"`
|
||||
Tag string `json:"tag,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
PasswordSecretKeyRef *SecretKeySelector `json:"passwordSecretKeyRef,omitempty"`
|
||||
}
|
||||
|
||||
type ArtifactPhase string
|
||||
|
||||
const (
|
||||
|
@@ -21,9 +21,7 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
@@ -89,11 +87,6 @@ func (in *OSArtifactList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OSArtifactSpec) DeepCopyInto(out *OSArtifactSpec) {
|
||||
*out = *in
|
||||
if in.BaseImageDockerfile != nil {
|
||||
in, out := &in.BaseImageDockerfile, &out.BaseImageDockerfile
|
||||
*out = new(SecretKeySelector)
|
||||
**out = **in
|
||||
}
|
||||
if in.Model != nil {
|
||||
in, out := &in.Model, &out.Model
|
||||
*out = new(Model)
|
||||
@@ -116,21 +109,9 @@ func (in *OSArtifactSpec) DeepCopyInto(out *OSArtifactSpec) {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.ImagePullSecrets != nil {
|
||||
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
||||
*out = make([]v1.LocalObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Exporters != nil {
|
||||
in, out := &in.Exporters, &out.Exporters
|
||||
*out = make([]batchv1.JobSpec, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Volume != nil {
|
||||
in, out := &in.Volume, &out.Volume
|
||||
*out = new(v1.PersistentVolumeClaimSpec)
|
||||
if in.OutputImage != nil {
|
||||
in, out := &in.OutputImage, &out.OutputImage
|
||||
*out = new(OutputImage)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
@@ -150,7 +131,7 @@ func (in *OSArtifactStatus) DeepCopyInto(out *OSArtifactStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]metav1.Condition, len(*in))
|
||||
*out = make([]v1.Condition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
@@ -167,6 +148,26 @@ func (in *OSArtifactStatus) DeepCopy() *OSArtifactStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OutputImage) DeepCopyInto(out *OutputImage) {
|
||||
*out = *in
|
||||
if in.PasswordSecretKeyRef != nil {
|
||||
in, out := &in.PasswordSecretKeyRef, &out.PasswordSecretKeyRef
|
||||
*out = new(SecretKeySelector)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputImage.
|
||||
func (in *OutputImage) DeepCopy() *OutputImage {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(OutputImage)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) {
|
||||
*out = *in
|
||||
|
Reference in New Issue
Block a user