v1alpha1

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "devops.kubesphere.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
)

Functions

This section is empty.

Types

type Action

type Action string

Action indicates the action once the request phase to be ready

const (
	ActionAuto       Action = "auto"
	ActionTag        Action = "tag"
	ActionPreRelease Action = "pre-release"
	ActionRelease    Action = "release"
)

type Condition

type Condition struct {
	ConditionType ConditionType   `json:"conditionType"`
	Status        ConditionStatus `json:"status"`
	Message       string          `json:"message"`
}

Condition indicates the status of each git repositories

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionStatus added in v0.0.5

type ConditionStatus string

ConditionStatus is the status of a condition

const (
	ConditionStatusSuccess ConditionStatus = "success"
	ConditionStatusFailed  ConditionStatus = "failed"
)

type ConditionType added in v0.0.5

type ConditionType string

ConditionType is the type of condition

const (
	ConditionTypeRelease ConditionType = "release"
	ConditionTypeOther   ConditionType = "other"
)

type GitOps added in v0.0.2

type GitOps struct {
	Enable     bool               `json:"enable,omitempty"`
	Repository Repository         `json:"repository,omitempty"`
	Secret     v1.SecretReference `json:"secret,omitempty"`
}

GitOps indicates to integrate with GitOps

func (*GitOps) DeepCopy added in v0.0.2

func (in *GitOps) DeepCopy() *GitOps

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

func (*GitOps) DeepCopyInto added in v0.0.2

func (in *GitOps) DeepCopyInto(out *GitOps)

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

type Phase

type Phase string

Phase is the stage of release request

const (
	// PhaseDraft allows user to modify
	PhaseDraft Phase = "draft"
	// PhaseReady indicates this request is ready to release
	PhaseReady Phase = "ready"
	// PhaseDone indicates this request was done
	PhaseDone Phase = "done"
)

func (Phase) IsValid added in v0.0.3

func (p Phase) IsValid() bool

IsValid checks if this is valid

type Provider

type Provider string

Provider represents a git provider, such as: GitHub, Gitlab

const (
	ProviderGitHub    Provider = "github"
	ProviderGitlab    Provider = "gitlab"
	ProviderBitbucket Provider = "bitbucket"
	ProviderGitee     Provider = "gitee"
	ProviderGitea     Provider = "gitea"
	ProviderUnknown   Provider = "unknown"
)

func GetDefaultProvider added in v0.0.12

func GetDefaultProvider(r *Repository) Provider

GetDefaultProvider returns the default git provider

type Releaser

type Releaser struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ReleaserSpec `json:"spec,omitempty"`
	// +optional
	Status ReleaserStatus `json:"status,omitempty"`
}

Releaser is the Schema for the releasers API

func (*Releaser) DeepCopy

func (in *Releaser) DeepCopy() *Releaser

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

func (*Releaser) DeepCopyInto

func (in *Releaser) DeepCopyInto(out *Releaser)

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

func (*Releaser) DeepCopyObject

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

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

func (*Releaser) Default

func (r *Releaser) Default()

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

func (*Releaser) GetGitOpsSecret added in v0.0.14

func (r *Releaser) GetGitOpsSecret() v1.SecretReference

func (*Releaser) SetupWebhookWithManager

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

func (*Releaser) ValidateCreate

func (r *Releaser) ValidateCreate() error

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

func (*Releaser) ValidateDelete

func (r *Releaser) ValidateDelete() error

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

func (*Releaser) ValidateUpdate

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

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

type ReleaserList

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

ReleaserList contains a list of Releaser

func (*ReleaserList) DeepCopy

func (in *ReleaserList) DeepCopy() *ReleaserList

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

func (*ReleaserList) DeepCopyInto

func (in *ReleaserList) DeepCopyInto(out *ReleaserList)

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

func (*ReleaserList) DeepCopyObject

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

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

type ReleaserSpec

type ReleaserSpec struct {

	// Phase is the stage of a release request
	Phase        Phase              `json:"phase,omitempty"`
	Version      string             `json:"version,omitempty"`
	Repositories []Repository       `json:"repositories,omitempty"`
	GitOps       *GitOps            `json:"gitOps,omitempty"`
	Secret       v1.SecretReference `json:"secret,omitempty"`
}

ReleaserSpec defines the desired state of Releaser

func (*ReleaserSpec) DeepCopy

func (in *ReleaserSpec) DeepCopy() *ReleaserSpec

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

func (*ReleaserSpec) DeepCopyInto

func (in *ReleaserSpec) DeepCopyInto(out *ReleaserSpec)

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

type ReleaserStatus

type ReleaserStatus struct {
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
	Conditions     []Condition  `json:"conditions,omitempty"`
}

ReleaserStatus defines the observed state of Releaser

func (*ReleaserStatus) DeepCopy

func (in *ReleaserStatus) DeepCopy() *ReleaserStatus

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

func (*ReleaserStatus) DeepCopyInto

func (in *ReleaserStatus) DeepCopyInto(out *ReleaserStatus)

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

type Repository

type Repository struct {
	// +optional
	Name string `json:"name"`
	// +optional
	Provider Provider `json:"provider,omitempty"`
	Address  string   `json:"address"`
	// +optional
	Branch string `json:"branch,omitempty"`
	// +optional
	Version string `json:"version,omitempty"`
	// +optional
	Message string `json:"message,omitempty"`
	// +optional
	Action Action `json:"action,omitempty"`
}

Repository represents a git repository

func (*Repository) DeepCopy

func (in *Repository) DeepCopy() *Repository

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

func (*Repository) DeepCopyInto

func (in *Repository) DeepCopyInto(out *Repository)

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