v1alpha1

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the nautes v1alpha1 API group +kubebuilder:object:generate=true +groupName=nautes.resource.nautes.io

Index

Constants

View Source
const (
	CodeRepoBindingPermissionReadOnly  = "readonly"
	CodeRepoBindingPermissionReadWrite = "readwrite"
)
View Source
const (
	LABEL_FROM_PRODUCT          = "resource.nautes.io/reference"
	LABEL_BELONG_TO_PRODUCT     = "resource.nautes.io/belongsto"
	LABEL_FROM_PRODUCT_PROVIDER = "resource.nautes.io/from"
)
View Source
const (
	RuntimeTypeDeploymentRuntime = "deploymentRuntime"
	RuntimeTypePipelineRuntime   = "pipelineRuntime"
)
View Source
const (
	SelectFieldCodeRepoBindingProductAndRepo = "productAndRepo"
	SelectFieldMetaDataName                  = "metadata.name"
)
View Source
const (
	EventSourceTypeGitlab   = "gitlab"
	EventSourceTypeCalendar = "calendar"
)
View Source
const (
	EnvUseRealName = "USEREALNAME"
)
View Source
const (
	LABEL_TENANT_MANAGEMENT = "coderepo.resource.nautes.io/tenant-management"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "nautes.resource.nautes.io", 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
)
View Source
var GetClusterSubResourceFunctions = []GetClusterSubResources{}

GetClusterSubResourceFunctions stores a set of methods for obtaining a list of cluster sub-resources. When the cluster checks whether it is being referenced, it will loop through the method list here.

View Source
var GetCoderepoSubResourceFunctions = []GetCodeRepoSubResources{}
View Source
var GetEnvironmentSubResourceFunctions = []GetEnvironmentSubResources{}

GetEnvironmentSubResourceFunctions stores a set of methods for obtaining a list of environment sub-resources. When the environment checks whether it is being referenced, it will loop through the method list here.

View Source
var (
	// KubernetesClient create from webhook main.go, it use to validate resource is legal
	KubernetesClient client.Client
)

Functions

func ConvertComponentsListToMap added in v0.4.0

func ConvertComponentsListToMap(list ComponentsList) map[string]*Component

func GetConditions

func GetConditions(conditions []metav1.Condition, conditionTypes map[string]bool) []metav1.Condition

func GetNewConditions

func GetNewConditions(src, conditions []metav1.Condition, evaluatedTypes map[string]bool) []metav1.Condition

func GetPipelineHooksMetaData added in v0.4.2

func GetPipelineHooksMetaData(ctx context.Context, k8sClient client.Client, pipelineName string) ([]resource.HookMetadata, error)

func GetUsedNamespaces added in v0.3.9

func GetUsedNamespaces(ctx context.Context, client ValidateClient, opts ...GetUsedNamespacesOptions) (map[string][]string, error)

GetUsedNamespaces will find out namespaces in used by nautes. It will return in format map[cluster]namespaces

func ProductProviderIsDeletable

func ProductProviderIsDeletable(ctx context.Context, k8sClient client.Client, opts ...client.ListOption) error

Types

type ArtifactRepo

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

	Spec   ArtifactRepoSpec   `json:"spec,omitempty"`
	Status ArtifactRepoStatus `json:"status,omitempty"`
}

ArtifactRepo is the Schema for the artifactrepoes API

func (*ArtifactRepo) Compare

func (a *ArtifactRepo) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*ArtifactRepo) DeepCopy

func (in *ArtifactRepo) DeepCopy() *ArtifactRepo

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

func (*ArtifactRepo) DeepCopyInto

func (in *ArtifactRepo) DeepCopyInto(out *ArtifactRepo)

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

func (*ArtifactRepo) DeepCopyObject

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

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

type ArtifactRepoList

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

ArtifactRepoList contains a list of ArtifactRepo

func (*ArtifactRepoList) DeepCopy

func (in *ArtifactRepoList) DeepCopy() *ArtifactRepoList

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

func (*ArtifactRepoList) DeepCopyInto

func (in *ArtifactRepoList) DeepCopyInto(out *ArtifactRepoList)

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

func (*ArtifactRepoList) DeepCopyObject

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

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

type ArtifactRepoProvider

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

	Spec   ArtifactRepoProviderSpec   `json:"spec,omitempty"`
	Status ArtifactRepoProviderStatus `json:"status,omitempty"`
}

ArtifactRepoProvider is the Schema for the artifactrepoproviders API

func (*ArtifactRepoProvider) Compare

func (a *ArtifactRepoProvider) Compare(obj client.Object) (bool, error)

func (*ArtifactRepoProvider) DeepCopy

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

func (*ArtifactRepoProvider) DeepCopyInto

func (in *ArtifactRepoProvider) DeepCopyInto(out *ArtifactRepoProvider)

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

func (*ArtifactRepoProvider) DeepCopyObject

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

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

type ArtifactRepoProviderList

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

ArtifactRepoProviderList contains a list of ArtifactRepoProvider

func (*ArtifactRepoProviderList) DeepCopy

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

func (*ArtifactRepoProviderList) DeepCopyInto

func (in *ArtifactRepoProviderList) DeepCopyInto(out *ArtifactRepoProviderList)

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

func (*ArtifactRepoProviderList) DeepCopyObject

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

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

type ArtifactRepoProviderSpec

type ArtifactRepoProviderSpec struct {
	URL          string `json:"url" yaml:"url"`
	APIServer    string `json:"apiServer" yaml:"apiServer"`
	ProviderType string `json:"providerType" yaml:"providerType"`
}

ArtifactRepoProviderSpec defines the desired state of ArtifactRepoProvider

func (*ArtifactRepoProviderSpec) DeepCopy

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

func (*ArtifactRepoProviderSpec) DeepCopyInto

func (in *ArtifactRepoProviderSpec) DeepCopyInto(out *ArtifactRepoProviderSpec)

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

type ArtifactRepoProviderStatus

type ArtifactRepoProviderStatus struct {
}

ArtifactRepoProviderStatus defines the observed state of ArtifactRepoProvider

func (*ArtifactRepoProviderStatus) DeepCopy

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

func (*ArtifactRepoProviderStatus) DeepCopyInto

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

type ArtifactRepoSpec

type ArtifactRepoSpec struct {
	ArtifactRepoProvider string `json:"artifactRepoProvider" yaml:"artifactRepoProvider"`
	Product              string `json:"product" yaml:"product"`
	// +nullable
	// +optional
	Projects []string `json:"projects" yaml:"projects"`
	RepoName string   `json:"repoName" yaml:"repoName"`
	// remote, local, virtual...
	// +kubebuilder:validation:Enum=remote;local;virtual
	RepoType string `json:"repoType" yaml:"repoType"`
	// maven, python, go...
	// +kubebuilder:validation:Enum=maven;python;go
	PackageType string `json:"packageType" yaml:"packageType"`
}

ArtifactRepoSpec defines the desired state of ArtifactRepo

func (*ArtifactRepoSpec) DeepCopy

func (in *ArtifactRepoSpec) DeepCopy() *ArtifactRepoSpec

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

func (*ArtifactRepoSpec) DeepCopyInto

func (in *ArtifactRepoSpec) DeepCopyInto(out *ArtifactRepoSpec)

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

type ArtifactRepoStatus

type ArtifactRepoStatus struct {
}

ArtifactRepoStatus defines the observed state of ArtifactRepo

func (*ArtifactRepoStatus) DeepCopy

func (in *ArtifactRepoStatus) DeepCopy() *ArtifactRepoStatus

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

func (*ArtifactRepoStatus) DeepCopyInto

func (in *ArtifactRepoStatus) DeepCopyInto(out *ArtifactRepoStatus)

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

type Calendar

type Calendar struct {
	// Schedule is a cron-like expression. For reference, see: https://en.wikipedia.org/wiki/Cron
	// +optional
	Schedule string `json:"schedule,omitempty"`
	// Interval is a string that describes an interval duration, e.g. 1s, 30m, 2h...
	// +optional
	Interval string `json:"interval,omitempty"`
	// ExclusionDates defines the list of DATE-TIME exceptions for recurring events.
	// +optional
	ExclusionDates []string `json:"exclusionDates,omitempty"`
	// Timezone in which to run the schedule
	// +optional
	Timezone string `json:"timezone,omitempty"`
}

func (*Calendar) DeepCopy

func (in *Calendar) DeepCopy() *Calendar

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

func (*Calendar) DeepCopyInto

func (in *Calendar) DeepCopyInto(out *Calendar)

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

type Cluster

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

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API

func GetClusterByRuntime

func GetClusterByRuntime(ctx context.Context, client ValidateClient, runtime Runtime) (*Cluster, error)

func GetClusterFromString

func GetClusterFromString(name, namespace string, specStr string) (*Cluster, error)

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) Default

func (r *Cluster) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Cluster) GetDependencies

func (r *Cluster) GetDependencies(ctx context.Context, k8sClient client.Client) ([]string, error)

func (*Cluster) SetupWebhookWithManager

func (r *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Cluster) SpecToJsonString

func (c *Cluster) SpecToJsonString() string

func (*Cluster) ValidateCluster

func (r *Cluster) ValidateCluster(ctx context.Context, old *Cluster, k8sClient client.Client, isDelete bool) error

ValidateCluster check cluster is changeable

func (*Cluster) ValidateCreate

func (r *Cluster) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateDelete

func (r *Cluster) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateUpdate

func (r *Cluster) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterEntryPoint

type ClusterEntryPoint struct {
	// The port of entry point service
	HTTPPort  int32       `json:"httpPort,omitempty" yaml:"httpPort"`
	HTTPSPort int32       `json:"httpsPort,omitempty" yaml:"httpsPort"`
	Type      ServiceType `json:"type,omitempty" yaml:"type"`
}

func (*ClusterEntryPoint) DeepCopy

func (in *ClusterEntryPoint) DeepCopy() *ClusterEntryPoint

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

func (*ClusterEntryPoint) DeepCopyInto

func (in *ClusterEntryPoint) DeepCopyInto(out *ClusterEntryPoint)

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

type ClusterKind

type ClusterKind string
const (
	CLUSTER_KIND_KUBERNETES ClusterKind = "kubernetes"
)

type ClusterList

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

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterResourceInfo

type ClusterResourceInfo struct {
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`
	// +kubebuilder:validation:MinLength=1
	Group string `json:"group"`
}

func (*ClusterResourceInfo) DeepCopy

func (in *ClusterResourceInfo) DeepCopy() *ClusterResourceInfo

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

func (*ClusterResourceInfo) DeepCopyInto

func (in *ClusterResourceInfo) DeepCopyInto(out *ClusterResourceInfo)

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

type ClusterSpec

type ClusterSpec struct {
	// +kubebuilder:validation:Pattern=`https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)`
	ApiServer string `json:"apiServer" yaml:"apiServer"`
	// +kubebuilder:validation:Enum=physical;virtual
	ClusterType ClusterType `json:"clusterType" yaml:"clusterType"`
	// +optional
	// +kubebuilder:default:=kubernetes
	// +kubebuilder:validation:Enum=kubernetes
	ClusterKind ClusterKind `json:"clusterKind" yaml:"clusterKind"`
	// the usage of cluster, for user use it directry or deploy vcluster on it
	// +kubebuilder:validation:Enum=host;worker
	Usage ClusterUsage `json:"usage" yaml:"usage"`
	// +optional
	HostCluster string `json:"hostCluster,omitempty" yaml:"hostCluster"`
	// +optional
	// PrimaryDomain is used to build the domain of components within the cluster
	PrimaryDomain string `json:"primaryDomain,omitempty" yaml:"primaryDomain"`
	// +optional
	// +kubebuilder:validation:Enum="";pipeline;deployment
	// pipeline or deployment, when the cluster usage is 'worker', the WorkType is required.
	WorkerType     ClusterWorkType `json:"workerType,omitempty" yaml:"workerType"`
	ComponentsList ComponentsList  `json:"componentsList"`
	// +optional
	// +nullable
	// ReservedNamespacesAllowedProducts key is namespace name, value is the product name list witch can use namespace.
	ReservedNamespacesAllowedProducts map[string][]string `json:"reservedNamespacesAllowedProducts,omitempty"`
	// +optional
	// +nullable
	// ReservedNamespacesAllowedProducts key is product name, value is the list of cluster resources.
	ProductAllowedClusterResources map[string][]ClusterResourceInfo `json:"productAllowedClusterResources,omitempty"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions"`
	// +optional
	MgtAuthStatus *MgtClusterAuthStatus `json:"mgtAuthStatus,omitempty" yaml:"mgtAuthStatus"`
	// +optional
	Sync2ArgoStatus *SyncCluster2ArgoStatus `json:"sync2ArgoStatus,omitempty" yaml:"sync2ArgoStatus"`
	// +optional
	EntryPoints map[string]ClusterEntryPoint `json:"entryPoints,omitempty" yaml:"entryPoints"`
	// +optional
	Warnings []Warning `json:"warnings"`
	// +optional
	// ProductIDMap records the corresponding relationship between product name and product in kubernetes.
	ProductIDMap map[string]string `json:"productIDMap"`
	// +optional
	// AllocatedResources stores the usage of unique resources in the cluster.
	AllocatedResources *runtime.RawExtension `json:"allocatedResources,omitempty"`
	// +optional
	// ComponentsStatus is the status where components are stored.
	ComponentsStatus map[string]runtime.RawExtension `json:"componentsStatus,omitempty"`
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

func (*ClusterStatus) GetConditions

func (status *ClusterStatus) GetConditions(conditionTypes map[string]bool) []metav1.Condition

func (*ClusterStatus) SetConditions

func (status *ClusterStatus) SetConditions(conditions []metav1.Condition, evaluatedTypes map[string]bool)

type ClusterSyncStatus

type ClusterSyncStatus string

type ClusterType

type ClusterType string
const (
	CLUSTER_TYPE_PHYSICAL ClusterType = "physical"
	CLUSTER_TYPE_VIRTUAL  ClusterType = "virtual"
)

type ClusterUsage

type ClusterUsage string
const (
	CLUSTER_USAGE_HOST   ClusterUsage = "host"
	CLUSTER_USAGE_WORKER ClusterUsage = "worker"
)

type ClusterWorkType

type ClusterWorkType string
const (
	ClusterWorkTypeDeployment ClusterWorkType = "deployment"
	ClusterWorkTypePipeline   ClusterWorkType = "pipeline"
)

type CodeRepo

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

	Spec   CodeRepoSpec   `json:"spec,omitempty"`
	Status CodeRepoStatus `json:"status,omitempty"`
}

CodeRepo is the Schema for the coderepoes API

func (*CodeRepo) Compare

func (c *CodeRepo) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*CodeRepo) DeepCopy

func (in *CodeRepo) DeepCopy() *CodeRepo

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

func (*CodeRepo) DeepCopyInto

func (in *CodeRepo) DeepCopyInto(out *CodeRepo)

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

func (*CodeRepo) DeepCopyObject

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

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

func (*CodeRepo) Default

func (r *CodeRepo) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*CodeRepo) GetDependencies

func (r *CodeRepo) GetDependencies(ctx context.Context, client ValidateClient) ([]string, error)

func (*CodeRepo) GetURL

func (r *CodeRepo) GetURL(spec CodeRepoSpec) (string, error)

GetURL Get the address of the repository address corresponding to CodeRepo If the CodeRepo spec URL is not empty, return it directly, Otherwise, the repository address will be spliced through the information of CodeRepoProvider and Product resources.

func (*CodeRepo) IsDeletable

func (r *CodeRepo) IsDeletable(ctx context.Context, client ValidateClient) error

func (*CodeRepo) SetupWebhookWithManager

func (r *CodeRepo) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*CodeRepo) Validate

func (r *CodeRepo) Validate() error

func (*CodeRepo) ValidateCreate

func (r *CodeRepo) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*CodeRepo) ValidateDelete

func (r *CodeRepo) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*CodeRepo) ValidateUpdate

func (r *CodeRepo) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type CodeRepoBinding

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

	Spec   CodeRepoBindingSpec   `json:"spec,omitempty"`
	Status CodeRepoBindingStatus `json:"status,omitempty"`
}

CodeRepoBinding is the Schema for the coderepobindings API

func (*CodeRepoBinding) DeepCopy

func (in *CodeRepoBinding) DeepCopy() *CodeRepoBinding

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

func (*CodeRepoBinding) DeepCopyInto

func (in *CodeRepoBinding) DeepCopyInto(out *CodeRepoBinding)

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

func (*CodeRepoBinding) DeepCopyObject

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

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

type CodeRepoBindingList

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

CodeRepoBindingList contains a list of CodeRepoBinding

func (*CodeRepoBindingList) DeepCopy

func (in *CodeRepoBindingList) DeepCopy() *CodeRepoBindingList

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

func (*CodeRepoBindingList) DeepCopyInto

func (in *CodeRepoBindingList) DeepCopyInto(out *CodeRepoBindingList)

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

func (*CodeRepoBindingList) DeepCopyObject

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

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

type CodeRepoBindingSpec

type CodeRepoBindingSpec struct {
	// Authorized Code Repository.
	CodeRepo string `json:"codeRepo,omitempty"`
	// The Code repo is authorized to this product or projects under it.
	Product string `json:"product,omitempty"`
	// If the project list is empty, it means that the code repo is authorized to the product.
	// If the project list has values, it means that the code repo is authorized to the specified projects.
	// +optional
	Projects []string `json:"projects,omitempty"`
	// Authorization Permissions, readwrite or readonly.
	Permissions string `json:"permissions,omitempty"`
}

CodeRepoBindingSpec defines the desired state of CodeRepoBinding

func (*CodeRepoBindingSpec) DeepCopy

func (in *CodeRepoBindingSpec) DeepCopy() *CodeRepoBindingSpec

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

func (*CodeRepoBindingSpec) DeepCopyInto

func (in *CodeRepoBindingSpec) DeepCopyInto(out *CodeRepoBindingSpec)

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

type CodeRepoBindingStatus

type CodeRepoBindingStatus struct {
}

CodeRepoBindingStatus defines the observed state of CodeRepoBinding

func (*CodeRepoBindingStatus) DeepCopy

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

func (*CodeRepoBindingStatus) DeepCopyInto

func (in *CodeRepoBindingStatus) DeepCopyInto(out *CodeRepoBindingStatus)

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

type CodeRepoConditionType

type CodeRepoConditionType string

type CodeRepoList

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

CodeRepoList contains a list of CodeRepo

func (*CodeRepoList) DeepCopy

func (in *CodeRepoList) DeepCopy() *CodeRepoList

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

func (*CodeRepoList) DeepCopyInto

func (in *CodeRepoList) DeepCopyInto(out *CodeRepoList)

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

func (*CodeRepoList) DeepCopyObject

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

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

type CodeRepoProvider

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

	Spec   CodeRepoProviderSpec   `json:"spec,omitempty"`
	Status CodeRepoProviderStatus `json:"status,omitempty"`
}

CodeRepoProvider is the Schema for the coderepoproviders API

func (*CodeRepoProvider) Compare

func (c *CodeRepoProvider) Compare(obj client.Object) (bool, error)

func (*CodeRepoProvider) DeepCopy

func (in *CodeRepoProvider) DeepCopy() *CodeRepoProvider

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

func (*CodeRepoProvider) DeepCopyInto

func (in *CodeRepoProvider) DeepCopyInto(out *CodeRepoProvider)

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

func (*CodeRepoProvider) DeepCopyObject

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

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

type CodeRepoProviderList

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

CodeRepoProviderList contains a list of CodeRepoProvider

func (*CodeRepoProviderList) DeepCopy

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

func (*CodeRepoProviderList) DeepCopyInto

func (in *CodeRepoProviderList) DeepCopyInto(out *CodeRepoProviderList)

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

func (*CodeRepoProviderList) DeepCopyObject

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

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

type CodeRepoProviderSpec

type CodeRepoProviderSpec struct {
	HttpAddress string `json:"httpAddress"`
	SSHAddress  string `json:"sshAddress"`
	// +kubebuilder:validation:Type=string
	ApiServer string `json:"apiServer"`
	// +kubebuilder:validation:Enum=gitlab;github
	ProviderType string `json:"providerType"`
}

CodeRepoProviderSpec defines the desired state of CodeRepoProvider

func (*CodeRepoProviderSpec) DeepCopy

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

func (*CodeRepoProviderSpec) DeepCopyInto

func (in *CodeRepoProviderSpec) DeepCopyInto(out *CodeRepoProviderSpec)

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

type CodeRepoProviderStatus

type CodeRepoProviderStatus struct {
}

CodeRepoProviderStatus defines the observed state of CodeRepoProvider

func (*CodeRepoProviderStatus) DeepCopy

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

func (*CodeRepoProviderStatus) DeepCopyInto

func (in *CodeRepoProviderStatus) DeepCopyInto(out *CodeRepoProviderStatus)

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

type CodeRepoSpec

type CodeRepoSpec struct {
	// +optional
	CodeRepoProvider string `json:"codeRepoProvider" yaml:"codeRepoProvider"`
	// +optional
	Product string `json:"product" yaml:"product"`
	// +optional
	Project string `json:"project" yaml:"project"`
	// +optional
	RepoName string `json:"repoName" yaml:"repoName"`
	// +optional
	URL string `json:"url,omitempty" yaml:"url"`
	// +optional
	DeploymentRuntime bool `json:"deploymentRuntime" yaml:"deploymentRuntime"`
	// +optional
	PipelineRuntime bool `json:"pipelineRuntime" yaml:"pipelineRuntime"`
	// +nullable
	// +optional
	Webhook *Webhook `json:"webhook" yaml:"webhook"`
}

CodeRepoSpec defines the desired state of CodeRepo

func (*CodeRepoSpec) DeepCopy

func (in *CodeRepoSpec) DeepCopy() *CodeRepoSpec

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

func (*CodeRepoSpec) DeepCopyInto

func (in *CodeRepoSpec) DeepCopyInto(out *CodeRepoSpec)

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

type CodeRepoStatus

type CodeRepoStatus struct {
	// +optional
	Conditions []metav1.Condition `json:"conditions" yaml:"conditions"`
	// +optional
	Sync2ArgoStatus *SyncCodeRepo2ArgoStatus `json:"sync2ArgoStatus,omitempty" yaml:"sync2ArgoStatus"`
}

CodeRepoStatus defines the observed state of CodeRepo

func (*CodeRepoStatus) DeepCopy

func (in *CodeRepoStatus) DeepCopy() *CodeRepoStatus

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

func (*CodeRepoStatus) DeepCopyInto

func (in *CodeRepoStatus) DeepCopyInto(out *CodeRepoStatus)

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

func (*CodeRepoStatus) GetConditions

func (status *CodeRepoStatus) GetConditions(conditionTypes map[string]bool) []metav1.Condition

func (*CodeRepoStatus) SetConditions

func (status *CodeRepoStatus) SetConditions(conditions []metav1.Condition, evaluatedTypes map[string]bool)

type Component

type Component struct {
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// +kubebuilder:validation:MinLength=1
	Namespace string `json:"namespace"`
	// +optional
	// +nullable
	Additions map[string]string `json:"additions,omitempty"`
}

func (*Component) DeepCopy

func (in *Component) DeepCopy() *Component

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

func (*Component) DeepCopyInto

func (in *Component) DeepCopyInto(out *Component)

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

type ComponentsList

type ComponentsList struct {
	// +optional
	// +nullable
	CertManagement *Component `json:"certManagement,omitempty" componentName:"certManagement"`
	// +optional
	// +nullable
	Deployment *Component `json:"deployment,omitempty" componentName:"deployment"`
	// +optional
	// +nullable
	EventListener *Component `json:"eventListener,omitempty" componentName:"eventListener"`
	// +optional
	// +nullable
	Gateway *Component `json:"gateway,omitempty" componentName:"gateway"`
	// +optional
	// +nullable
	MultiTenant *Component `json:"multiTenant,omitempty" componentName:"multiTenant"`
	// +optional
	// +nullable
	Pipeline *Component `json:"pipeline,omitempty" componentName:"pipeline"`
	// +optional
	// +nullable
	ProgressiveDelivery *Component `json:"progressiveDelivery,omitempty" componentName:"progressiveDelivery"`
	// +optional
	// +nullable
	SecretManagement *Component `json:"secretManagement,omitempty" componentName:"secretManagement"`
	// +optional
	// +nullable
	SecretSync *Component `json:"secretSync,omitempty" componentName:"secretSync"`
	// +optional
	// +nullable
	OauthProxy *Component `json:"oauthProxy,omitempty" componentName:"oauthProxy"`
}

ComponentsList declares the specific components used by the cluster

func (*ComponentsList) DeepCopy

func (in *ComponentsList) DeepCopy() *ComponentsList

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

func (*ComponentsList) DeepCopyInto

func (in *ComponentsList) DeepCopyInto(out *ComponentsList)

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

func (ComponentsList) GetNamespaces

func (c ComponentsList) GetNamespaces() []string

func (ComponentsList) GetNamespacesMap

func (c ComponentsList) GetNamespacesMap() map[string]bool

type DeployHistory

type DeployHistory struct {
	ManifestSource ManifestSource                `json:"manifestSource"`
	Destination    DeploymentRuntimesDestination `json:"destination"`
	// The URL of the coderepo in the last successfully deployed runtime
	Source string `json:"source"`
}

func (*DeployHistory) DeepCopy

func (in *DeployHistory) DeepCopy() *DeployHistory

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

func (*DeployHistory) DeepCopyInto

func (in *DeployHistory) DeepCopyInto(out *DeployHistory)

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

type DeploymentRuntime

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

	Spec   DeploymentRuntimeSpec   `json:"spec,omitempty"`
	Status DeploymentRuntimeStatus `json:"status,omitempty"`
}

DeploymentRuntime is the Schema for the deploymentruntimes API

func (*DeploymentRuntime) Compare

func (d *DeploymentRuntime) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*DeploymentRuntime) DeepCopy

func (in *DeploymentRuntime) DeepCopy() *DeploymentRuntime

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

func (*DeploymentRuntime) DeepCopyInto

func (in *DeploymentRuntime) DeepCopyInto(out *DeploymentRuntime)

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

func (*DeploymentRuntime) DeepCopyObject

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

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

func (*DeploymentRuntime) GetAccount added in v0.4.1

func (r *DeploymentRuntime) GetAccount() string

func (*DeploymentRuntime) GetDestination

func (r *DeploymentRuntime) GetDestination() string

func (*DeploymentRuntime) GetNamespaces

func (r *DeploymentRuntime) GetNamespaces() []string

func (*DeploymentRuntime) GetProduct

func (r *DeploymentRuntime) GetProduct() string

func (*DeploymentRuntime) GetRuntimeType added in v0.4.0

func (r *DeploymentRuntime) GetRuntimeType() RuntimeType

func (*DeploymentRuntime) SetupWebhookWithManager

func (r *DeploymentRuntime) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*DeploymentRuntime) Validate

func (r *DeploymentRuntime) Validate(ctx context.Context, validateClient ValidateClient) ([]IllegalProjectRef, error)

Validate used to check deployment runtime is legal

func (*DeploymentRuntime) ValidateCreate

func (r *DeploymentRuntime) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DeploymentRuntime) ValidateDelete

func (r *DeploymentRuntime) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DeploymentRuntime) ValidateProjectRef

func (r *DeploymentRuntime) ValidateProjectRef(ctx context.Context, validateClient ValidateClient) ([]IllegalProjectRef, error)

func (*DeploymentRuntime) ValidateUpdate

func (r *DeploymentRuntime) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DeploymentRuntimeList

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

DeploymentRuntimeList contains a list of DeploymentRuntime

func (*DeploymentRuntimeList) DeepCopy

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

func (*DeploymentRuntimeList) DeepCopyInto

func (in *DeploymentRuntimeList) DeepCopyInto(out *DeploymentRuntimeList)

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

func (*DeploymentRuntimeList) DeepCopyObject

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

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

type DeploymentRuntimeSpec

type DeploymentRuntimeSpec struct {
	Product string `json:"product,omitempty" yaml:"product"`
	// +optional
	ProjectsRef    []string                      `json:"projectsRef,omitempty" yaml:"projectsRef"`
	ManifestSource ManifestSource                `json:"manifestSource" yaml:"manifestSource"`
	Destination    DeploymentRuntimesDestination `json:"destination" yaml:"destination"`
	// +optional
	Account string `json:"account,omitempty" yaml:"account"`
}

DeploymentRuntimeSpec defines the desired state of DeploymentRuntime

func (*DeploymentRuntimeSpec) DeepCopy

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

func (*DeploymentRuntimeSpec) DeepCopyInto

func (in *DeploymentRuntimeSpec) DeepCopyInto(out *DeploymentRuntimeSpec)

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

type DeploymentRuntimeStatus

type DeploymentRuntimeStatus struct {
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions"`
	// +optional
	Cluster string `json:"cluster,omitempty"`
	// +optional
	// +nullable
	IllegalProjectRefs []IllegalProjectRef `json:"illegalProjectRefs,omitempty"`
	// +nullable
	DeployHistory *DeployHistory `json:"deployHistory,omitempty" yaml:"deployHistory"`
	// +optional
	// +nullable
	DeployStatus *runtime.RawExtension `json:"deployStatus,omitempty" yaml:"deployStatus"`
}

DeploymentRuntimeStatus defines the observed state of DeploymentRuntime

func (*DeploymentRuntimeStatus) DeepCopy

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

func (*DeploymentRuntimeStatus) DeepCopyInto

func (in *DeploymentRuntimeStatus) DeepCopyInto(out *DeploymentRuntimeStatus)

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

type DeploymentRuntimesDestination

type DeploymentRuntimesDestination struct {
	Environment string `json:"environment"`
	// +optional
	Namespaces []string `json:"namespaces"`
}

func (*DeploymentRuntimesDestination) DeepCopy

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

func (*DeploymentRuntimesDestination) DeepCopyInto

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

type Environment

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

	Spec   EnvironmentSpec   `json:"spec,omitempty"`
	Status EnvironmentStatus `json:"status,omitempty"`
}

Environment is the Schema for the environments API

func (*Environment) Compare

func (e *Environment) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

func (*Environment) GetDependencies

func (r *Environment) GetDependencies(ctx context.Context, validateClient ValidateClient) ([]string, error)

func (*Environment) IsDeletable

func (r *Environment) IsDeletable(ctx context.Context, validateClient ValidateClient) error

func (*Environment) SetupWebhookWithManager

func (r *Environment) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Environment) ValidateCreate

func (r *Environment) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Environment) ValidateDelete

func (r *Environment) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Environment) ValidateUpdate

func (r *Environment) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type EnvironmentList

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

EnvironmentList contains a list of Environment

func (*EnvironmentList) DeepCopy

func (in *EnvironmentList) DeepCopy() *EnvironmentList

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

func (*EnvironmentList) DeepCopyInto

func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList)

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

func (*EnvironmentList) DeepCopyObject

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

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

type EnvironmentSpec

type EnvironmentSpec struct {
	Product string `json:"product"`
	Cluster string `json:"cluster"`
	EnvType string `json:"envType"`
}

EnvironmentSpec defines the desired state of Environment

func (*EnvironmentSpec) DeepCopy

func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec

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

func (*EnvironmentSpec) DeepCopyInto

func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)

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

type EnvironmentStatus

type EnvironmentStatus struct {
}

EnvironmentStatus defines the observed state of Environment

func (*EnvironmentStatus) DeepCopy

func (in *EnvironmentStatus) DeepCopy() *EnvironmentStatus

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

func (*EnvironmentStatus) DeepCopyInto

func (in *EnvironmentStatus) DeepCopyInto(out *EnvironmentStatus)

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

type EventSource

type EventSource struct {
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// +optional
	Gitlab *Gitlab `json:"gitlab,omitempty"`
	// +optional
	Calendar *Calendar `json:"calendar,omitempty"`
}

func (*EventSource) DeepCopy

func (in *EventSource) DeepCopy() *EventSource

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

func (*EventSource) DeepCopyInto

func (in *EventSource) DeepCopyInto(out *EventSource)

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

type GetClusterSubResources

type GetClusterSubResources func(ctx context.Context, k8sClient client.Client, clusterName string) ([]string, error)

+kubebuilder:object:generate=false

type GetCodeRepoSubResources

type GetCodeRepoSubResources func(ctx context.Context, client ValidateClient, CodeRepoName string) ([]string, error)

+kubebuilder:object:generate=false

type GetEnvironmentSubResources

type GetEnvironmentSubResources func(ctx context.Context, validateClient ValidateClient, productName, envName string) ([]string, error)

+kubebuilder:object:generate=false

type GetUsedNamespacesOptions added in v0.3.9

type GetUsedNamespacesOptions func(*getUsedNamespacesOptions)

+kubebuilder:object:generate=false

func GetUsedNamespaceWithOutRuntimes added in v0.3.9

func GetUsedNamespaceWithOutRuntimes(runtimes []Runtime) GetUsedNamespacesOptions

func GetUsedNamespacesInCluster added in v0.3.9

func GetUsedNamespacesInCluster(cluster string) GetUsedNamespacesOptions

type Gitlab

type Gitlab struct {
	// Gitlab project name.
	// +kubebuilder:validation:MinLength=1
	RepoName string `json:"repoName"`
	// +optional
	// Supports regular expressions.
	Revision string `json:"revision,omitempty"`
	// Gitlab webhook events: push_events, tag_push_events, etc.
	Events []string `json:"events"`
}

func (*Gitlab) DeepCopy

func (in *Gitlab) DeepCopy() *Gitlab

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

func (*Gitlab) DeepCopyInto

func (in *Gitlab) DeepCopyInto(out *Gitlab)

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

type Hook added in v0.4.2

type Hook struct {
	// Name is the name of the hook to be executed.
	Name string `json:"name"`
	// Alias is the alias given by the user for the hook.
	// If the user does not enter this value, the name of the hook will be obtained from 'name'.
	// When the hook appears in both PreHooks and PostHooks, it is necessary to specify the name to prevent conflicts.
	// +optional
	Alias *string `json:"alias,omitempty"`
	// Vars is the parameter that the user wants to pass to the hook,
	// and the input items are determined based on the pipeline component in cluster.
	// +optional
	Vars map[string]string `json:"vars,omitempty"`
}

Hook is a record of information about a runnable hook.

func (*Hook) DeepCopy added in v0.4.2

func (in *Hook) DeepCopy() *Hook

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

func (*Hook) DeepCopyInto added in v0.4.2

func (in *Hook) DeepCopyInto(out *Hook)

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

type Hooks added in v0.4.2

type Hooks struct {
	// +optional
	// PreHooks is a set of hooks to be executed before running the user pipeline.
	PreHooks []Hook `json:"preHooks,omitempty"`
	// +optional
	// PostHooks is a set of hooks that will run after the user pipeline starts executing.
	PostHooks []Hook `json:"postHooks,omitempty"`
}

Hooks are hooks will to add before or after the user pipeline.

func (*Hooks) DeepCopy added in v0.4.2

func (in *Hooks) DeepCopy() *Hooks

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

func (*Hooks) DeepCopyInto added in v0.4.2

func (in *Hooks) DeepCopyInto(out *Hooks)

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

type IllegalEventSource

type IllegalEventSource struct {
	EventSource EventSource `json:"eventSource"`
	Reason      string      `json:"reason"`
}

func (*IllegalEventSource) DeepCopy

func (in *IllegalEventSource) DeepCopy() *IllegalEventSource

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

func (*IllegalEventSource) DeepCopyInto

func (in *IllegalEventSource) DeepCopyInto(out *IllegalEventSource)

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

type IllegalProjectRef

type IllegalProjectRef struct {
	ProjectName string `json:"projectName"`
	Reason      string `json:"reason"`
}

func (*IllegalProjectRef) DeepCopy

func (in *IllegalProjectRef) DeepCopy() *IllegalProjectRef

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

func (*IllegalProjectRef) DeepCopyInto

func (in *IllegalProjectRef) DeepCopyInto(out *IllegalProjectRef)

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

type ManifestSource

type ManifestSource struct {
	CodeRepo       string `json:"codeRepo,omitempty"`
	TargetRevision string `json:"targetRevision,omitempty"`
	Path           string `json:"path"`
}

func (*ManifestSource) DeepCopy

func (in *ManifestSource) DeepCopy() *ManifestSource

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

func (*ManifestSource) DeepCopyInto

func (in *ManifestSource) DeepCopyInto(out *ManifestSource)

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

type MgtClusterAuthStatus

type MgtClusterAuthStatus struct {
	LastSuccessSpec string      `json:"lastSuccessSpec" yaml:"lastSuccessSpec"`
	LastSuccessTime metav1.Time `json:"lastSuccessTime" yaml:"lastSuccessTime"`
	SecretID        string      `json:"secretID" yaml:"secretID"`
}

func (*MgtClusterAuthStatus) DeepCopy

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

func (*MgtClusterAuthStatus) DeepCopyInto

func (in *MgtClusterAuthStatus) DeepCopyInto(out *MgtClusterAuthStatus)

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

type Pipeline

type Pipeline struct {
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Optional
	// Default is 'default'
	Label string `json:"label,omitempty"`
	// Pipeline manifest path, wildcard support.
	Path string `json:"path"`
}

The definition of a multi-branch pipeline.One pipeline corresponds to one declaration file in the Git repository.

func (*Pipeline) DeepCopy

func (in *Pipeline) DeepCopy() *Pipeline

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

func (*Pipeline) DeepCopyInto

func (in *Pipeline) DeepCopyInto(out *Pipeline)

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

type PipelineTrigger

type PipelineTrigger struct {
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	// +kubebuilder:validation:MinLength=1
	EventSource string `json:"eventSource"`
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
	// +kubebuilder:validation:MinLength=1
	Pipeline string `json:"pipeline"`
	// +optional
	// Regular expressions are not supported, If it is empty, the trigger will determine the revision of the pipeline based on the revision of the event source
	Revision string `json:"revision,omitempty"`
	// +optional
	// +nullable
	// Inputs is a list of parameters that need to be passed to the user pipeline.
	Inputs []UserPipelineInput `json:"inputs,omitempty"`
}

The definition of event source triggered pipeline mode.

func (*PipelineTrigger) DeepCopy

func (in *PipelineTrigger) DeepCopy() *PipelineTrigger

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

func (*PipelineTrigger) DeepCopyInto

func (in *PipelineTrigger) DeepCopyInto(out *PipelineTrigger)

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

type Product

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

	Spec   ProductSpec   `json:"spec,omitempty"`
	Status ProductStatus `json:"status,omitempty"`
}

Product is the Schema for the products API

func (*Product) Compare

func (p *Product) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*Product) DeepCopy

func (in *Product) DeepCopy() *Product

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

func (*Product) DeepCopyInto

func (in *Product) DeepCopyInto(out *Product)

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

func (*Product) DeepCopyObject

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

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

type ProductList

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

ProductList contains a list of Product

func (*ProductList) DeepCopy

func (in *ProductList) DeepCopy() *ProductList

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

func (*ProductList) DeepCopyInto

func (in *ProductList) DeepCopyInto(out *ProductList)

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

func (*ProductList) DeepCopyObject

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

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

type ProductProvider

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

	Spec   ProductProviderSpec   `json:"spec,omitempty"`
	Status ProductProviderStatus `json:"status,omitempty"`
}

ProductProvider is the Schema for the productproviders API

func (*ProductProvider) Compare

func (p *ProductProvider) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*ProductProvider) DeepCopy

func (in *ProductProvider) DeepCopy() *ProductProvider

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

func (*ProductProvider) DeepCopyInto

func (in *ProductProvider) DeepCopyInto(out *ProductProvider)

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

func (*ProductProvider) DeepCopyObject

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

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

func (*ProductProvider) IsDeletable

func (r *ProductProvider) IsDeletable(ctx context.Context, k8sClient client.Client) error

func (*ProductProvider) SetupWebhookWithManager

func (r *ProductProvider) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ProductProvider) ValidateCreate

func (r *ProductProvider) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ProductProvider) ValidateDelete

func (r *ProductProvider) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ProductProvider) ValidateUpdate

func (r *ProductProvider) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ProductProviderList

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

ProductProviderList contains a list of ProductProvider

func (*ProductProviderList) DeepCopy

func (in *ProductProviderList) DeepCopy() *ProductProviderList

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

func (*ProductProviderList) DeepCopyInto

func (in *ProductProviderList) DeepCopyInto(out *ProductProviderList)

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

func (*ProductProviderList) DeepCopyObject

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

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

type ProductProviderSpec

type ProductProviderSpec struct {
	Type string `json:"type" yaml:"type"`
	Name string `json:"name" yaml:"name"`
}

ProductProviderSpec defines the desired state of ProductProvider

func (*ProductProviderSpec) DeepCopy

func (in *ProductProviderSpec) DeepCopy() *ProductProviderSpec

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

func (*ProductProviderSpec) DeepCopyInto

func (in *ProductProviderSpec) DeepCopyInto(out *ProductProviderSpec)

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

type ProductProviderStatus

type ProductProviderStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions"`
}

ProductProviderStatus defines the observed state of ProductProvider

func (*ProductProviderStatus) DeepCopy

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

func (*ProductProviderStatus) DeepCopyInto

func (in *ProductProviderStatus) DeepCopyInto(out *ProductProviderStatus)

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

func (*ProductProviderStatus) GetConditions

func (status *ProductProviderStatus) GetConditions(conditionTypes map[string]bool) []metav1.Condition

func (*ProductProviderStatus) SetConditions

func (status *ProductProviderStatus) SetConditions(conditions []metav1.Condition, evaluatedTypes map[string]bool)

type ProductSpec

type ProductSpec struct {
	Name         string `json:"name" yaml:"name"`
	MetaDataPath string `json:"metaDataPath" yaml:"metaDataPath"`
}

ProductSpec defines the desired state of Product

func (*ProductSpec) DeepCopy

func (in *ProductSpec) DeepCopy() *ProductSpec

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

func (*ProductSpec) DeepCopyInto

func (in *ProductSpec) DeepCopyInto(out *ProductSpec)

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

type ProductStatus

type ProductStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions"`
}

ProductStatus defines the observed state of Product

func (*ProductStatus) DeepCopy

func (in *ProductStatus) DeepCopy() *ProductStatus

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

func (*ProductStatus) DeepCopyInto

func (in *ProductStatus) DeepCopyInto(out *ProductStatus)

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

func (*ProductStatus) GetConditions

func (status *ProductStatus) GetConditions(conditionTypes map[string]bool) []metav1.Condition

func (*ProductStatus) SetConditions

func (status *ProductStatus) SetConditions(conditions []metav1.Condition, evaluatedTypes map[string]bool)

type Project

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

	Spec   ProjectSpec   `json:"spec,omitempty"`
	Status ProjectStatus `json:"status,omitempty"`
}

Project is the Schema for the projects API

func (*Project) Compare

func (p *Project) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*Project) DeepCopy

func (in *Project) DeepCopy() *Project

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

func (*Project) DeepCopyInto

func (in *Project) DeepCopyInto(out *Project)

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

func (*Project) DeepCopyObject

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

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

type ProjectArtifactRepo

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

	Spec   ProjectArtifactRepoSpec   `json:"spec,omitempty"`
	Status ProjectArtifactRepoStatus `json:"status,omitempty"`
}

ProjectArtifactRepo is the Schema for the projectartifactrepoes API

func (*ProjectArtifactRepo) Compare

func (p *ProjectArtifactRepo) Compare(obj client.Object) (bool, error)

Compare If true is returned, it means that the resource is duplicated

func (*ProjectArtifactRepo) DeepCopy

func (in *ProjectArtifactRepo) DeepCopy() *ProjectArtifactRepo

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

func (*ProjectArtifactRepo) DeepCopyInto

func (in *ProjectArtifactRepo) DeepCopyInto(out *ProjectArtifactRepo)

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

func (*ProjectArtifactRepo) DeepCopyObject

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

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

type ProjectArtifactRepoList

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

ProjectArtifactRepoList contains a list of ProjectArtifactRepo

func (*ProjectArtifactRepoList) DeepCopy

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

func (*ProjectArtifactRepoList) DeepCopyInto

func (in *ProjectArtifactRepoList) DeepCopyInto(out *ProjectArtifactRepoList)

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

func (*ProjectArtifactRepoList) DeepCopyObject

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

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

type ProjectArtifactRepoSpec

type ProjectArtifactRepoSpec struct {
	Project      string `json:"project"`
	ArtifactRepo string `json:"artifactRepo"`
}

ProjectArtifactRepoSpec defines the desired state of ProjectArtifactRepo

func (*ProjectArtifactRepoSpec) DeepCopy

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

func (*ProjectArtifactRepoSpec) DeepCopyInto

func (in *ProjectArtifactRepoSpec) DeepCopyInto(out *ProjectArtifactRepoSpec)

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

type ProjectArtifactRepoStatus

type ProjectArtifactRepoStatus struct{}

ProjectArtifactRepoStatus defines the observed state of ProjectArtifactRepo

func (*ProjectArtifactRepoStatus) DeepCopy

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

func (*ProjectArtifactRepoStatus) DeepCopyInto

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

type ProjectList

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

ProjectList contains a list of Project

func (*ProjectList) DeepCopy

func (in *ProjectList) DeepCopy() *ProjectList

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

func (*ProjectList) DeepCopyInto

func (in *ProjectList) DeepCopyInto(out *ProjectList)

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

func (*ProjectList) DeepCopyObject

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

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

type ProjectPipelineDestination

type ProjectPipelineDestination struct {
	Environment string `json:"environment"`
	Namespace   string `json:"namespace"`
}

func (*ProjectPipelineDestination) DeepCopy

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

func (*ProjectPipelineDestination) DeepCopyInto

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

type ProjectPipelineRuntime

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

	Spec   ProjectPipelineRuntimeSpec   `json:"spec,omitempty"`
	Status ProjectPipelineRuntimeStatus `json:"status,omitempty"`
}

ProjectPipelineRuntime is the Schema for the projectpipelineruntimes API

func (*ProjectPipelineRuntime) Compare

func (r *ProjectPipelineRuntime) Compare(obj client.Object) (bool, error)

Compare will check whether the pipeline already exists in the runtime.

func (*ProjectPipelineRuntime) DeepCopy

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

func (*ProjectPipelineRuntime) DeepCopyInto

func (in *ProjectPipelineRuntime) DeepCopyInto(out *ProjectPipelineRuntime)

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

func (*ProjectPipelineRuntime) DeepCopyObject

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

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

func (*ProjectPipelineRuntime) GetAccount added in v0.4.1

func (r *ProjectPipelineRuntime) GetAccount() string

func (*ProjectPipelineRuntime) GetDestination

func (r *ProjectPipelineRuntime) GetDestination() string

func (*ProjectPipelineRuntime) GetEventSource

func (r *ProjectPipelineRuntime) GetEventSource(name string) (*EventSource, error)

func (*ProjectPipelineRuntime) GetNamespaces

func (r *ProjectPipelineRuntime) GetNamespaces() []string

func (*ProjectPipelineRuntime) GetPipeline

func (r *ProjectPipelineRuntime) GetPipeline(name string) (*Pipeline, error)

func (*ProjectPipelineRuntime) GetProduct

func (r *ProjectPipelineRuntime) GetProduct() string

func (*ProjectPipelineRuntime) GetRuntimeType added in v0.4.0

func (r *ProjectPipelineRuntime) GetRuntimeType() RuntimeType

func (*ProjectPipelineRuntime) SetupWebhookWithManager

func (r *ProjectPipelineRuntime) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ProjectPipelineRuntime) StaticCheck

func (r *ProjectPipelineRuntime) StaticCheck() error

StaticCheck check resource is legal without connecting kubernetes

func (*ProjectPipelineRuntime) Validate

func (r *ProjectPipelineRuntime) Validate(ctx context.Context, validateClient ValidateClient, k8sClient client.Client) ([]IllegalEventSource, error)

Validate use to verify pipeline runtime is legal, it will check the following things - runtime has permission to use repo in event sources if runtime has no permission to use code repo, it return them in the first var.

func (*ProjectPipelineRuntime) ValidateCreate

func (r *ProjectPipelineRuntime) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ProjectPipelineRuntime) ValidateDelete

func (r *ProjectPipelineRuntime) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ProjectPipelineRuntime) ValidateUpdate

func (r *ProjectPipelineRuntime) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ProjectPipelineRuntimeAdditionalResources added in v0.3.9

type ProjectPipelineRuntimeAdditionalResources struct {
	// Optional
	Git *ProjectPipelineRuntimeAdditionalResourcesGit `json:"git,omitempty"`
}

ProjectPipelineRuntimeAdditionalResources defines the additional resources witch runtime needed

func (*ProjectPipelineRuntimeAdditionalResources) DeepCopy added in v0.3.9

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

func (*ProjectPipelineRuntimeAdditionalResources) DeepCopyInto added in v0.3.9

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

type ProjectPipelineRuntimeAdditionalResourcesGit added in v0.3.9

type ProjectPipelineRuntimeAdditionalResourcesGit struct {
	// Optional
	CodeRepo string `json:"codeRepo,omitempty"`
	// Optional
	// If git repo is a public repo, use url instead
	URL      string `json:"url,omitempty"`
	Revision string `json:"revision"`
	Path     string `json:"path"`
}

ProjectPipelineRuntimeAdditionalResourcesGit defines the additional resources if it comes from git

func (*ProjectPipelineRuntimeAdditionalResourcesGit) DeepCopy added in v0.3.9

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

func (*ProjectPipelineRuntimeAdditionalResourcesGit) DeepCopyInto added in v0.3.9

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

type ProjectPipelineRuntimeDestination added in v0.3.9

type ProjectPipelineRuntimeDestination struct {
	Environment string `json:"environment"`
	Namespace   string `json:"namespace"`
}

ProjectPipelineRuntimeDestination defines where pipeline runtime will run

func (*ProjectPipelineRuntimeDestination) DeepCopy added in v0.3.9

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

func (*ProjectPipelineRuntimeDestination) DeepCopyInto added in v0.3.9

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

type ProjectPipelineRuntimeList

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

ProjectPipelineRuntimeList contains a list of ProjectPipelineRuntime

func (*ProjectPipelineRuntimeList) DeepCopy

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

func (*ProjectPipelineRuntimeList) DeepCopyInto

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

func (*ProjectPipelineRuntimeList) DeepCopyObject

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

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

type ProjectPipelineRuntimeSpec

type ProjectPipelineRuntimeSpec struct {
	Project string `json:"project"`
	// The code repo for pipeline manifests.
	PipelineSource string `json:"pipelineSource"`
	// The definition of pipeline.
	Pipelines []Pipeline `json:"pipelines"`
	// The target environment for running the pipeline.
	Destination ProjectPipelineDestination `json:"destination"`
	// Events source that may trigger the pipeline.
	EventSources []EventSource `json:"eventSources"`
	// Isolation definition of pipeline runtime related resources: shared(default) or exclusive
	Isolation        string            `json:"isolation"`
	PipelineTriggers []PipelineTrigger `json:"pipelineTriggers"`
	// optional
	AdditionalResources *ProjectPipelineRuntimeAdditionalResources `json:"additionalResources,omitempty"`
	// +optional
	// Hooks are hooks that users need to add before or after the user pipeline.
	Hooks *Hooks `json:"hooks,omitempty"`
	// +optional
	Account string `json:"account,omitempty" yaml:"account"`
}

ProjectPipelineRuntimeSpec defines the desired state of ProjectPipelineRuntime

func (*ProjectPipelineRuntimeSpec) DeepCopy

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

func (*ProjectPipelineRuntimeSpec) DeepCopyInto

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

type ProjectPipelineRuntimeStatus

type ProjectPipelineRuntimeStatus struct {
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions"`
	// +optional
	Cluster string `json:"cluster,omitempty"`
	// +optional
	// +nullable
	// IllegalEventSources records event sources that will not be synchronized to the environment,
	// and why it will not be synchronized to the past
	IllegalEventSources []IllegalEventSource `json:"illegalEventSources"`
	// +optional
	// +nullable
	DeployStatus *runtime.RawExtension `json:"deployStatus,omitempty" yaml:"deployStatus"`
}

ProjectPipelineRuntimeStatus defines the observed state of ProjectPipelineRuntime

func (*ProjectPipelineRuntimeStatus) DeepCopy

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

func (*ProjectPipelineRuntimeStatus) DeepCopyInto

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

type ProjectSpec

type ProjectSpec struct {
	Product  string `json:"product"`
	Language string `json:"language"`
}

ProjectSpec defines the desired state of Project

func (*ProjectSpec) DeepCopy

func (in *ProjectSpec) DeepCopy() *ProjectSpec

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

func (*ProjectSpec) DeepCopyInto

func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)

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

type ProjectStatus

type ProjectStatus struct {
}

ProjectStatus defines the observed state of Project

func (*ProjectStatus) DeepCopy

func (in *ProjectStatus) DeepCopy() *ProjectStatus

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

func (*ProjectStatus) DeepCopyInto

func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)

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

type Runtime

type Runtime interface {
	client.Object
	GetProduct() string
	GetName() string
	GetDestination() string
	GetNamespaces() []string
	GetRuntimeType() RuntimeType
	GetAccount() string
}

+kubebuilder:object:generate=false

func GetRuntimes added in v0.3.9

func GetRuntimes(ctx context.Context, client ValidateClient) ([]Runtime, error)

type RuntimeType added in v0.4.0

type RuntimeType string

type ServiceType

type ServiceType string
const (
	ServiceTypeNodePort     ServiceType = "NodePort"
	ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
	ServiceTypeExternalName ServiceType = "ExternalName"
)

type SyncCluster2ArgoStatus

type SyncCluster2ArgoStatus struct {
	LastSuccessSpec string      `json:"lastSuccessSpec" yaml:"lastSuccessSpec"`
	LastSuccessTime metav1.Time `json:"lastSuccessTime" yaml:"lastSuccessTime"`
	SecretID        string      `json:"secretID" yaml:"secretID"`
}

func (*SyncCluster2ArgoStatus) DeepCopy

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

func (*SyncCluster2ArgoStatus) DeepCopyInto

func (in *SyncCluster2ArgoStatus) DeepCopyInto(out *SyncCluster2ArgoStatus)

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

type SyncCodeRepo2ArgoStatus

type SyncCodeRepo2ArgoStatus struct {
	LastSuccessSpec string      `json:"lastSuccessSpec" yaml:"lastSuccessSpec"`
	LastSuccessTime metav1.Time `json:"lastSuccessTime" yaml:"lastSuccessTime"`
	Url             string      `json:"url" yaml:"url"`
	SecretID        string      `json:"secretID" yaml:"secretID"`
}

func (*SyncCodeRepo2ArgoStatus) DeepCopy

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

func (*SyncCodeRepo2ArgoStatus) DeepCopyInto

func (in *SyncCodeRepo2ArgoStatus) DeepCopyInto(out *SyncCodeRepo2ArgoStatus)

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

type TransmissionMethod added in v0.4.2

type TransmissionMethod struct {
	// Kustomization defines how users can pass data to the pipeline file through the kustomize.
	Kustomization *TransmissionMethodKustomization `json:"kustomization,omitempty"`
}

TransmissionMethod defines the method for transmitting variables to the user pipeline.

func (*TransmissionMethod) DeepCopy added in v0.4.2

func (in *TransmissionMethod) DeepCopy() *TransmissionMethod

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

func (*TransmissionMethod) DeepCopyInto added in v0.4.2

func (in *TransmissionMethod) DeepCopyInto(out *TransmissionMethod)

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

type TransmissionMethodKustomization added in v0.4.2

type TransmissionMethodKustomization struct {
	// Path is the path to be replaced in the pipeline file.
	Path string `json:"path"`
}

func (*TransmissionMethodKustomization) DeepCopy added in v0.4.2

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

func (*TransmissionMethodKustomization) DeepCopyInto added in v0.4.2

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

type UserPipelineInput added in v0.4.2

type UserPipelineInput struct {
	Source UserPipelineInputSource `json:"source"`
	// TransmissionMethod is the method passed to the user pipeline.
	TransmissionMethod TransmissionMethod `json:"transmissionMethod"`
}

UserPipelineInput defines the parameters to be passed to the user pipeline.

func (*UserPipelineInput) DeepCopy added in v0.4.2

func (in *UserPipelineInput) DeepCopy() *UserPipelineInput

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

func (*UserPipelineInput) DeepCopyInto added in v0.4.2

func (in *UserPipelineInput) DeepCopyInto(out *UserPipelineInput)

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

type UserPipelineInputSource added in v0.4.2

type UserPipelineInputSource struct {
	// BuiltInVar defines how to get the data associated with the pipeline runtime.
	BuiltInVar *string `json:"builtInVar,omitempty"`
	// FromEvent defines how to get data from the data source.
	FromEvent *string `json:"fromEvent,omitempty"`
}

UserPipelineInputSource defines the source of the user pipeline input.

func (*UserPipelineInputSource) DeepCopy added in v0.4.2

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

func (*UserPipelineInputSource) DeepCopyInto added in v0.4.2

func (in *UserPipelineInputSource) DeepCopyInto(out *UserPipelineInputSource)

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

type ValidateClient

type ValidateClient interface {
	GetCodeRepo(ctx context.Context, name string) (*CodeRepo, error)
	GetEnvironment(ctx context.Context, productName, name string) (*Environment, error)
	ListEnvironments(ctx context.Context) ([]Environment, error)
	GetCluster(ctx context.Context, name string) (*Cluster, error)
	ListCodeRepoBindings(ctx context.Context, productName, repoName string) ([]CodeRepoBinding, error)
	// ListDeploymentRuntime will return deployment runtimes in specified product. If product is empty, it will return all deployment runtimes.
	ListDeploymentRuntimes(ctx context.Context, productName string) ([]DeploymentRuntime, error)
	ListProjectPipelineRuntimes(ctx context.Context, productName string) ([]ProjectPipelineRuntime, error)
}

+kubebuilder:object:generate=false

func NewValidateClientFromK8s

func NewValidateClientFromK8s(client client.Client) ValidateClient

type ValidateClientFromK8s

type ValidateClientFromK8s struct {
	client.Client
}

ValidateClientFromK8s is the k8s implementation of interface ValidateClient. It's creation requires an implementation of client.Client. This implementation requires adding the following indexes:

metadata.name in resource Cluster.
metadata.name in resource CodeRepo.
productAndRepo in resource CodeRepoBinding. The format of the index value should be like "Product/CodeRepo".

+kubebuilder:object:generate=false

func (*ValidateClientFromK8s) GetCluster

func (c *ValidateClientFromK8s) GetCluster(ctx context.Context, name string) (*Cluster, error)

func (*ValidateClientFromK8s) GetCodeRepo

func (c *ValidateClientFromK8s) GetCodeRepo(ctx context.Context, name string) (*CodeRepo, error)

func (*ValidateClientFromK8s) GetEnvironment

func (c *ValidateClientFromK8s) GetEnvironment(ctx context.Context, productName, name string) (*Environment, error)

func (*ValidateClientFromK8s) ListCodeRepoBindings

func (c *ValidateClientFromK8s) ListCodeRepoBindings(ctx context.Context, productName, repoName string) ([]CodeRepoBinding, error)

func (*ValidateClientFromK8s) ListDeploymentRuntimes

func (c *ValidateClientFromK8s) ListDeploymentRuntimes(ctx context.Context, productName string) ([]DeploymentRuntime, error)

func (*ValidateClientFromK8s) ListEnvironments added in v0.3.9

func (c *ValidateClientFromK8s) ListEnvironments(ctx context.Context) ([]Environment, error)

func (*ValidateClientFromK8s) ListProjectPipelineRuntimes

func (c *ValidateClientFromK8s) ListProjectPipelineRuntimes(ctx context.Context, productName string) ([]ProjectPipelineRuntime, error)

type Warning

type Warning struct {
	Type string `json:"type"`
	// From is which operator recorded this warning.
	From string `json:"from"`
	// ID records the unique identifier of the warning.
	ID      string `json:"id"`
	Message string `json:"message"`
}

func (*Warning) DeepCopy

func (in *Warning) DeepCopy() *Warning

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

func (*Warning) DeepCopyInto

func (in *Warning) DeepCopyInto(out *Warning)

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

type Webhook

type Webhook struct {
	Events []string `json:"events" yaml:"events"`
}

func (*Webhook) DeepCopy

func (in *Webhook) DeepCopy() *Webhook

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

func (*Webhook) DeepCopyInto

func (in *Webhook) DeepCopyInto(out *Webhook)

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