v1alpha1

package
v0.0.0-...-7115b38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the pok v1alpha1 API group +kubebuilder:object:generate=true +groupName=pok.kubops.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "pok.kubops.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ImageBuilder

type ImageBuilder struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ImageBuilderSpec   `json:"spec,omitempty"`
	Status ImageBuilderStatus `json:"status,omitempty"`
}

ImageBuilder is the Schema for the imagebuilders API

func (*ImageBuilder) DeepCopy

func (in *ImageBuilder) DeepCopy() *ImageBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilder.

func (*ImageBuilder) DeepCopyInto

func (in *ImageBuilder) DeepCopyInto(out *ImageBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImageBuilder) DeepCopyObject

func (in *ImageBuilder) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ImageBuilderList

type ImageBuilderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ImageBuilder `json:"items"`
}

ImageBuilderList contains a list of ImageBuilder

func (*ImageBuilderList) DeepCopy

func (in *ImageBuilderList) DeepCopy() *ImageBuilderList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderList.

func (*ImageBuilderList) DeepCopyInto

func (in *ImageBuilderList) DeepCopyInto(out *ImageBuilderList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImageBuilderList) DeepCopyObject

func (in *ImageBuilderList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ImageBuilderSpec

type ImageBuilderSpec struct {
	// Source of the repository
	// +required
	Source ImageBuilderSpecSource `json:"source"`
	// Destination of the built image
	// +required
	Destination ImageBuilderSpecDestination `json:"destination"`
	// Build rules
	// TODO: kubebuilder:default:={} does not work
	// +kubebuilder:default:={{source:{type: "branch", pattern: "main"}, build: {file: "Dockerfile", context: ".", platforms: {"linux/amd64"} }, tags: {"latest"}}}
	// +required
	Rules []ImageBuilderSpecRule `json:"rules"`
}

ImageBuilderSpec defines the desired state of ImageBuilder

func (*ImageBuilderSpec) DeepCopy

func (in *ImageBuilderSpec) DeepCopy() *ImageBuilderSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpec.

func (*ImageBuilderSpec) DeepCopyInto

func (in *ImageBuilderSpec) DeepCopyInto(out *ImageBuilderSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderSpecDestination

type ImageBuilderSpecDestination struct {
	// Image name must be in the form [hostname[:port]/][namespace/]repository
	//   - hostname is registry hostname (default: index.docker.io)
	//   - port is the port of the registry (default: 443)
	//   - namespace is the path within the registry (default: library)
	//   - repository is the name of the image
	// +required
	Image string `json:"image"`
	// SecretRef is a reference to a secret containing the credentials needed to scan and push the images
	// +optional
	SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
}

ImageBuilderSpecSource defines the desired state of ImageBuilder

func (*ImageBuilderSpecDestination) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpecDestination.

func (*ImageBuilderSpecDestination) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderSpecRule

type ImageBuilderSpecRule struct {
	// Source of the rule
	// +required
	Source ImageBuilderSpecRuleSource `json:"source"`
	// Build configuration of the rule
	// TODO: kubebuilder:default:={} does not work
	// +kubebuilder:default:={file: "Dockerfile", context: ".", platforms: {"linux/amd64"}}
	// +required
	Build ImageBuilderSpecRuleBuild `json:"build"`
	// Tags to apply to the image
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:default:={latest}
	// +required
	Tags []string `json:"tags"`
}

ImageBuilderSpecRule defines the desired state of ImageBuilder

func (*ImageBuilderSpecRule) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpecRule.

func (*ImageBuilderSpecRule) DeepCopyInto

func (in *ImageBuilderSpecRule) DeepCopyInto(out *ImageBuilderSpecRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderSpecRuleBuild

type ImageBuilderSpecRuleBuild struct {
	// Dockerfile to use for building the image default is Dockerfile
	// +kubebuilder:default:="Dockerfile"
	// +required
	File string `json:"file"`
	// Context to use for building the image default is .
	// +kubebuilder:default:="."
	// +required
	Context string `json:"context"`
	// Platforms to use for building the image default is linux/amd64
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:default:={"linux/amd64"}
	// +required
	Platforms []string `json:"platforms"`
	// Target to use for building the image
	// +optional
	Target string `json:"target,omitempty"`
}

ImageBuilderSpecRuleBuild defines the desired state of ImageBuilder

func (*ImageBuilderSpecRuleBuild) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpecRuleBuild.

func (*ImageBuilderSpecRuleBuild) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderSpecRuleSource

type ImageBuilderSpecRuleSource struct {
	// Type of the source (e.g. branch, tag)
	// +kubebuilder:validation:Enum=branch;tag
	// +kubebuilder:default:="branch"
	// +required
	Type string `json:"type,omitempty"`
	// Pattern to match the source (e.g. main, v1.0)
	// +kubebuilder:default:="main"
	// +optional
	Pattern string `json:"pattern,omitempty"`
}

ImageBuilderSpecSource defines the desired state of ImageBuilder

func (*ImageBuilderSpecRuleSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpecRuleSource.

func (*ImageBuilderSpecRuleSource) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderSpecSource

type ImageBuilderSpecSource struct {
	// URL of the Git repository in http, https.
	// +kubebuilder:validation:Pattern="^(http|https)://.*$"
	// +required
	URL string `json:"url"`
	// SecretRef is a reference to a secret containing the credentials needed to access the repository
	// +optional
	SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
}

ImageBuilderSpecSource defines the repository source

func (*ImageBuilderSpecSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderSpecSource.

func (*ImageBuilderSpecSource) DeepCopyInto

func (in *ImageBuilderSpecSource) DeepCopyInto(out *ImageBuilderSpecSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageBuilderStatus

type ImageBuilderStatus struct {
}

ImageBuilderStatus defines the observed state of ImageBuilder

func (*ImageBuilderStatus) DeepCopy

func (in *ImageBuilderStatus) DeepCopy() *ImageBuilderStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBuilderStatus.

func (*ImageBuilderStatus) DeepCopyInto

func (in *ImageBuilderStatus) DeepCopyInto(out *ImageBuilderStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalObjectReference

type LocalObjectReference struct {
	// Name of the referent.
	// +required
	Name string `json:"name"`
}

func (*LocalObjectReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.

func (*LocalObjectReference) DeepCopyInto

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳