v1alpha1

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +kubebuilder:object:generate=true +groupName=core.kubebb.k8s.com.cn

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +kubebuilder:object:generate=true +groupName=core.kubebb.k8s.com.cn

Copyright 2023 The Kubebb Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// DisplayNameAnnotationKey is the key of the annotation used to set the display name of the resource
	DisplayNameAnnotationKey = Group + "/displayname"
	// Finalizer is the key of the finalizer
	Finalizer = Group + "/finalizer"
)
View Source
const (
	AddEventMsgTemplate    = "add new component %s"
	DelEventMsgTemplate    = "delete component %s"
	UpdateEventMsgTemplate = "update component %s. %d new,  %d deleted,  %d deprecated"
	OCIPullURLAnnotation   = Group + "/oci-pull-url"
	ValuesConfigMapLabel   = Group + "/component-name"
	ValuesConfigMapKey     = "values.yaml"
	ImagesConfigMapKey     = "images"
	READMEConfigMapKey     = "readme"
)
View Source
const (
	ComponentPlanReleaseNameLabel     = Group + "/componentplan-release"
	ComponentPlanRetryTimesAnnotation = Group + "/componentplan-retry"
	ComponentPlanRollBackLabel        = Group + "/rollback"
)
View Source
const (
	Group   = "core.kubebb.k8s.com.cn"
	Version = "v1alpha1"
)
View Source
const (
	RatingComponentLabel  = "rating.component"
	RatingRepositoryLabel = "rating.repository"

	PipelineRun2RatingLabel     = "rating.pipelinerun"
	PipelineRun2ComponentLabel  = "rating.pipelinerun.component"
	PipelineRun2RepositoryLabel = "rating.pipelinerun.repository"
	PipelineRunDimensionLabel   = Group + "/dimension"
)
View Source
const (
	Username = "username"
	Password = "password"
	CAData   = "cadata"
	CertData = "certdata"
	KeyData  = "keydata"

	ComponentRepositoryLabel = "kubebb.component.repository"
	RepositoryTypeLabel      = "kubebb.repository.type"
	RepositorySourceLabel    = "kubebb.repository.source"

	// RepositoryRestartLabel change should trigger a restart of the repository
	RepositoryRestartLabel = "kubebb.repository.restart"

	RatingServiceAccountEnv     = "RATING_SERVICEACCOUNT"
	RatingClusterRoleEnv        = "RATING_CLUSTERROLE"
	RatingClusterRoleBindingEnv = "RATING_CLUSTERROLEBINDING"
	RatingEnableEnv             = "RATING_ENABLE"

	DefaultRatingServiaceAccount    = "rating-serviceaccount"
	DefaultRatingClusterRole        = "rating-clusterrole"
	DefaultRatingClusterRoleBinding = "rating-clusterrolebinding"
)
View Source
const (
	SubscriptionNameLabel   = Group + "/subscription-name"
	ComponentNameLabel      = Group + "/component-name"
	ComponentNamespaceLabel = Group + "/component-namespace"
)
View Source
const (
	SubscriptionReasonAvailable        = ReasonAvailable
	SubscriptionReasonUnavailable      = ReasonUnavailable
	SubscriptionReasonReconcileSuccess = ReasonReconcileSuccess
	SubscriptionReasonReconcileError   = ReasonReconcileError
)

Condition resons for Subscription

Variables

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

	// 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 (
	ErrDecode              = errors.New("decode error")
	ErrCreatorChange       = errors.New("creator (spec.creator) should not change")
	ErrReleaseNameChange   = errors.New("release name (spec.name) should not change")
	ErrComponentChange     = errors.New("component name and namespace (spec.component) should not change")
	ErrComponentMissing    = errors.New("component name and namespace (spec.component) should have values")
	ErrUnParseableSchedule = errors.New("unparseable subscription schedule")
)
View Source
var ComponentPlanDiffIgnorePaths = []string{
	"metadata.generation",
	"metadata.resourceVersion",
	"metadata.labels.helm.sh/chart",
	"spec.template.metadata.labels.helm.sh/chart",
}

ComponentPlanDiffIgnorePaths is the list of paths to ignore when comparing These fields will almost certainly change when componentplan is updated, and displaying these changes will only result in more invalid information, so they need to be ignored

View Source
var ImageOverridePath = []string{"spec/containers/image", "spec/initContainers/image", "spec/template/spec/containers/image", "spec/template/spec/initContainers/image"}

ImageOverridePath is the manifest path to detect kustomize image overrides can be replaced by environment variables IMAGEOVERRIDE_PATH, for example IMAGEOVERRIDE_PATH=spec/template/spec/initContainers/image:spec/initContainers/image

Functions

func AddSubjectToClusterRoleBinding added in v0.1.4

func AddSubjectToClusterRoleBinding(ctx context.Context, c client.Client, namespace string) error

func AppendTask added in v0.1.4

func AppendTask(tasks *[]Task, task Task)

func ComponentVersionDiff added in v0.1.2

func ComponentVersionDiff(o, n Component) ([]string, []string, []string)

ComponentVersionDiff When the version of a component changes, we need to give information about the event change, and we need to be clear about the versions that were added, the versions that were removed, and the versions that were deprecated.

func EnsureRatingResources added in v0.1.4

func EnsureRatingResources()

func FilterMatchVersion

func FilterMatchVersion(cond FilterCond, version string) bool

func FilterMatchVersionConstraint

func FilterMatchVersionConstraint(cond FilterCond, version string) bool

func FilterMatchVersionRegexp

func FilterMatchVersionRegexp(cond FilterCond, version string) bool

func GenerateComponentPlanManifestConfigMapName

func GenerateComponentPlanManifestConfigMapName(plan *ComponentPlan) string

GenerateComponentPlanManifestConfigMapName generates the name of the configmap of the component plan

func GenerateComponentPlanName

func GenerateComponentPlanName(sub *Subscription, version string) string

GenerateComponentPlanName generates the name of the component plan for a given subscription

func GetComponentChartValuesConfigmapName added in v0.1.6

func GetComponentChartValuesConfigmapName(componentName, version string) string

func GetImageOverridePath

func GetImageOverridePath() []string

func GetPipelineName added in v0.1.4

func GetPipelineName(pipelinerun *v1beta1.PipelineRun) string

func GetPipelineRunDimension added in v0.1.5

func GetPipelineRunDimension(pipelinerun *v1beta1.PipelineRun) string

func GetRatingClusterRole added in v0.1.4

func GetRatingClusterRole() string

func GetRatingClusterRoleBinding added in v0.1.4

func GetRatingClusterRoleBinding() string

func GetRatingServiceAccount added in v0.1.4

func GetRatingServiceAccount() string

func IsCondSame

func IsCondSame(c1, c2 FilterCond) bool

func IsFilterSame

func IsFilterSame(cond1, cond2 map[string]FilterCond) bool

func IsPullStrategySame

func IsPullStrategySame(a, b *PullStategy) bool

IsPullStrategySame Determine whether the contents of two structures are the same

func IsTaskSame added in v0.1.4

func IsTaskSame(a, b Task) bool

func Match

func Match(fc map[string]FilterCond, filter Filter, funcs ...FilterFunc) ([]int, bool)

Match determines if this component is retained, and if so, filters for conforming versions.

func Params2PipelinrunParams added in v0.1.4

func Params2PipelinrunParams(params []Param) []v1beta1.Param

func ParseRepoSecret added in v0.1.5

func ParseRepoSecret(c client.Client, instance *Repository) (username, password, capath, certpath, keypath string, err error)

func PipelineRunName added in v0.1.4

func PipelineRunName(ratingName, dimension string) string

func RatingEnabled added in v0.1.4

func RatingEnabled() bool

func RemoveSubjectFromClusterRoleBinding added in v0.1.4

func RemoveSubjectFromClusterRoleBinding(ctx context.Context, c client.Client, namespace string) error

func UpdateCondWithFixedLen

func UpdateCondWithFixedLen(l int, conds *ConditionedStatus, cond Condition)

UpdateCondWithFixedLen updates the Conditions of the resource and limits the length of the Conditions field to l. If l is less than or equal to 0, it means that the length is not limited.

Example:

conds.Conditions=[a, b, c], l=2, cond=d -> conds.Conditions=[c, d]

func WhenRunningOrSucceeded added in v0.1.4

func WhenRunningOrSucceeded(pipelinerun *v1beta1.PipelineRun, instance *Rating, ratingState string)

Types

type Component

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

	Spec   ComponentSpec   `json:"spec,omitempty"`
	Status ComponentStatus `json:"status,omitempty"`
}

Component is the Schema for the components API In general, Component will be automatically generated by the controller without user creation to display the content of the component in the Repository, Spec should add the necessary configuration if possible (currently left blank), and Status should display as much information about this component as possible. Displaying information in Status ensures that it cannot be unintentionally modified by users. Used to management components - kubebb-system: public - user-namespace: private

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.

func (*Component) DeepCopyObject

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

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

func (*Component) Default added in v0.1.5

func (c *Component) Default(ctx context.Context, obj runtime.Object) error

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

func (*Component) SetupWebhookWithManager added in v0.1.5

func (c *Component) SetupWebhookWithManager(mgr ctrl.Manager) error

type ComponentList

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

ComponentList contains a list of Component

func (*ComponentList) DeepCopy

func (in *ComponentList) DeepCopy() *ComponentList

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

func (*ComponentList) DeepCopyInto

func (in *ComponentList) DeepCopyInto(out *ComponentList)

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

func (*ComponentList) DeepCopyObject

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

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

type ComponentPlan

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

	Spec   ComponentPlanSpec   `json:"spec,omitempty"`
	Status ComponentPlanStatus `json:"status,omitempty"`
}

ComponentPlan is the Schema for the componentplans API

func (*ComponentPlan) DeepCopy

func (in *ComponentPlan) DeepCopy() *ComponentPlan

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

func (*ComponentPlan) DeepCopyInto

func (in *ComponentPlan) DeepCopyInto(out *ComponentPlan)

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

func (*ComponentPlan) DeepCopyObject

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

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

func (*ComponentPlan) Default added in v0.1.3

func (c *ComponentPlan) Default(ctx context.Context, obj runtime.Object) error

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

func (*ComponentPlan) GetReleaseName added in v0.1.1

func (c *ComponentPlan) GetReleaseName() string

func (*ComponentPlan) InitCondition added in v0.1.2

func (c *ComponentPlan) InitCondition() []Condition

func (*ComponentPlan) IsActionedReason added in v0.1.4

func (c *ComponentPlan) IsActionedReason(cr ConditionReason) bool

func (*ComponentPlan) SetupWebhookWithManager added in v0.1.3

func (c *ComponentPlan) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ComponentPlan) ValidateCreate added in v0.1.3

func (c *ComponentPlan) ValidateCreate(ctx context.Context, obj runtime.Object) error

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

func (*ComponentPlan) ValidateDelete added in v0.1.3

func (c *ComponentPlan) ValidateDelete(ctx context.Context, obj runtime.Object) error

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

func (*ComponentPlan) ValidateUpdate added in v0.1.3

func (c *ComponentPlan) ValidateUpdate(ctx context.Context, oldObj runtime.Object, newObj runtime.Object) error

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

type ComponentPlanList

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

ComponentPlanList contains a list of ComponentPlan

func (*ComponentPlanList) DeepCopy

func (in *ComponentPlanList) DeepCopy() *ComponentPlanList

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

func (*ComponentPlanList) DeepCopyInto

func (in *ComponentPlanList) DeepCopyInto(out *ComponentPlanList)

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

func (*ComponentPlanList) DeepCopyObject

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

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

type ComponentPlanSpec

type ComponentPlanSpec struct {
	// ComponentRef is a reference to the Component
	// +kubebuilder:validation:Required
	ComponentRef *corev1.ObjectReference `json:"component"`
	// InstallVersion represents the version that is to be installed by this ComponentPlan
	InstallVersion string `json:"version"`
	// Approved indicates whether the ComponentPlan has been approved
	Approved bool `json:"approved"`
	// Config is the configuration of the Componentplan
	Config `json:",inline"`
}

ComponentPlanSpec defines the desired state of ComponentPlan

func (*ComponentPlanSpec) DeepCopy

func (in *ComponentPlanSpec) DeepCopy() *ComponentPlanSpec

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

func (*ComponentPlanSpec) DeepCopyInto

func (in *ComponentPlanSpec) DeepCopyInto(out *ComponentPlanSpec)

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

type ComponentPlanStatus

type ComponentPlanStatus struct {
	// observedGeneration is the most recent metadata.generation
	// when this ComponentPlan installed successfully or failed and reached the max retry times.
	// When the ComponentPlan is Done (Succeeded or Failed), update spec will change metadata.generation
	// We can compare metadata.generation and status.observedgeneration to determine whether to Reconcile again.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
	// InstalledRevision represents the helm release Revision that is installed by this ComponentPlan
	// +optional
	InstalledRevision int `json:"installedRevision,omitempty"`
	// Latest indicates whether the ComponentPlan corresponds to the latest helm release Revision
	// +optional
	// FIXME rethink this field
	Latest *bool `json:"latest,omitempty"`
	// Portal only use for kubebb, FIXME: parse it
	// +optional
	Portal Router `json:"portal,omitempty"`

	ConditionedStatus `json:",inline"`
	// +optional
	Resources []Resource `json:"resources,omitempty"`
	// +optional
	Images []string `json:"images,omitempty"`
}

ComponentPlanStatus defines the observed state of ComponentPlan

func (*ComponentPlanStatus) DeepCopy

func (in *ComponentPlanStatus) DeepCopy() *ComponentPlanStatus

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

func (*ComponentPlanStatus) DeepCopyInto

func (in *ComponentPlanStatus) DeepCopyInto(out *ComponentPlanStatus)

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

type ComponentSpec

type ComponentSpec struct {
	Creator string `json:"creator,omitempty"`
}

ComponentSpec defines the desired state of Component

func (*ComponentSpec) DeepCopy

func (in *ComponentSpec) DeepCopy() *ComponentSpec

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

func (*ComponentSpec) DeepCopyInto

func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)

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

type ComponentStatus

type ComponentStatus struct {
	// RepositoryRef is a reference to the Repository
	RepositoryRef *corev1.ObjectReference `json:"repository"`
	// The name of the component may come from helm chart name
	Name string `json:"name"`
	// DisplayName of the component that comes from the helm chart's latest annotation
	DisplayName string `json:"displayName,omitempty"`
	// versions contains all version of one component.
	Versions []ComponentVersion `json:"versions,omitempty"`
	// FIXME: some fields(like description) may change when version update, how to deal with it?
	// A one-sentence description of the chart
	Description string `json:"description,omitempty"`
	// Maintainers is a list of maintainers
	Maintainers []Maintainer `json:"maintainers,omitempty"`
	// The URL to a relevant project page, git repo, or contact person
	Home string `json:"home,omitempty"`
	// Source is the URL to the source code of this Component
	Sources []string `json:"sources,omitempty"`
	// A list of string keywords
	Keywords []string `json:"keywords,omitempty"`
	// The URL to an icon file.
	Icon string `json:"icon,omitempty"`
	// The current component is not in the return list of URLs
	// and will not be deleted but marked as deprecated by this field.
	Deprecated bool `json:"deprecated,omitempty"`
}

ComponentStatus defines the observed state of Component

func (*ComponentStatus) DeepCopy

func (in *ComponentStatus) DeepCopy() *ComponentStatus

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

func (*ComponentStatus) DeepCopyInto

func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)

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

type ComponentVersion

type ComponentVersion struct {
	Annotations map[string]string `json:"annotations,omitempty"`
	Version     string            `json:"version"`
	AppVersion  string            `json:"appVersion"`
	UpdatedAt   metav1.Time       `json:"updatedAt"`
	CreatedAt   metav1.Time       `json:"createdAt"`
	Digest      string            `json:"digest"`
	Deprecated  bool              `json:"deprecated"`
	URLs        []string          `json:"urls,omitempty"`
}

ComponentVersion Indicates the fields required for a specific version of Component.

func (*ComponentVersion) DeepCopy

func (in *ComponentVersion) DeepCopy() *ComponentVersion

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

func (*ComponentVersion) DeepCopyInto

func (in *ComponentVersion) DeepCopyInto(out *ComponentVersion)

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

func (ComponentVersion) Equal

Equal compares two ComponetVersions, ignoring UpdatedAt and CreatedAt fields

type Condition

type Condition struct {
	// Type of this condition. At most one of each condition type may apply to
	// a resource at any point in time.
	Type ConditionType `json:"type"`

	// Status of this condition; is it currently True, False, or Unknown
	Status corev1.ConditionStatus `json:"status"`

	// LastTransitionTime is the last time this condition transitioned from one
	// status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// LastSuccessfulTime is repository Last Successful Update Time
	LastSuccessfulTime metav1.Time `json:"lastSuccessfulTime,omitempty"`

	// A Reason for this condition's last transition from one status to another.
	Reason ConditionReason `json:"reason"`

	// A Message containing details about this condition's last transition from
	// one status to another, if any.
	// +optional
	Message string `json:"message,omitempty"`
}

A Condition that may apply to a resource.

func ComponentPlanApproved added in v0.1.2

func ComponentPlanApproved() Condition

func ComponentPlanFailed added in v0.1.4

func ComponentPlanFailed(err error) Condition

func ComponentPlanInitSucceeded added in v0.1.4

func ComponentPlanInitSucceeded() Condition

func ComponentPlanInstallFailed

func ComponentPlanInstallFailed(err error) Condition

func ComponentPlanInstallSuccess

func ComponentPlanInstallSuccess() Condition

func ComponentPlanInstalling

func ComponentPlanInstalling() Condition

func ComponentPlanRollBackFailed added in v0.1.4

func ComponentPlanRollBackFailed(err error) Condition

func ComponentPlanRollBackSuccess added in v0.1.4

func ComponentPlanRollBackSuccess() Condition

func ComponentPlanRollingBack added in v0.1.4

func ComponentPlanRollingBack() Condition

func ComponentPlanSucceeded

func ComponentPlanSucceeded() Condition

func ComponentPlanUnapproved added in v0.1.4

func ComponentPlanUnapproved() Condition

func ComponentPlanUninstallFailed added in v0.1.4

func ComponentPlanUninstallFailed(err error) Condition

func ComponentPlanUninstallSuccess added in v0.1.4

func ComponentPlanUninstallSuccess() Condition

func ComponentPlanUninstalling added in v0.1.4

func ComponentPlanUninstalling() Condition

func ComponentPlanUpgradeFailed added in v0.1.2

func ComponentPlanUpgradeFailed(err error) Condition

func ComponentPlanUpgradeSuccess added in v0.1.2

func ComponentPlanUpgradeSuccess() Condition

func ComponentPlanUpgrading added in v0.1.2

func ComponentPlanUpgrading() Condition

func ComponentPlanWaitDo added in v0.1.2

func ComponentPlanWaitDo(err error) Condition

func ConvertPipelineRunCondition added in v0.1.4

func ConvertPipelineRunCondition(pipelinerun *v1beta1.PipelineRun) []Condition

func SubscriptionAvailable

func SubscriptionAvailable() Condition

SubscriptionAvailable returns a condition that indicates the subscription is currently observed to be available for use.

func SubscriptionReconcileError

func SubscriptionReconcileError(ct ConditionType, err error) Condition

SubscriptionReconcileError returns a condition indicating that controller encountered an error while reconciling the subscription. This could mean controller was unable to update the resource to reflect its desired state, or that controller was unable to determine the current actual state of the subscription.

func SubscriptionReconcileSuccess

func SubscriptionReconcileSuccess(ct ConditionType) Condition

SubscriptionReconcileSuccess returns a condition indicating that controller successfully completed the most recent reconciliation of the subscription.

func SubscriptionUnavailable

func SubscriptionUnavailable() Condition

SubscriptionUnavailable returns a condition that indicates the subscription is currently observed to be unavailable for use.

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.

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition

func (Condition) WithMessage

func (c Condition) WithMessage(msg string) Condition

WithMessage returns a condition by adding the provided message to existing condition.

type ConditionReason

type ConditionReason string

A ConditionReason represents the reason a resource is in a condition. Should be only one word

const (
	ComponentPlanReasonWaitDo           ConditionReason = "WaitDo"
	ComponentPlanReasonInstalling       ConditionReason = "Installing"
	ComponentPlanReasonUpgrading        ConditionReason = "Upgrading"
	ComponentPlanReasonUninstalling     ConditionReason = "Uninstalling"
	ComponentPlanReasonRollingBack      ConditionReason = "RollingBack"
	ComponentPlanReasonInstallSuccess   ConditionReason = "InstallSuccess"
	ComponentPlanReasonInstallFailed    ConditionReason = "InstallFailed"
	ComponentPlanReasonUninstallSuccess ConditionReason = "UninstallSuccess"
	ComponentPlanReasonUninstallFailed  ConditionReason = "UninstallFailed"
	ComponentPlanReasonUpgradeSuccess   ConditionReason = "UpgradeSuccess"
	ComponentPlanReasonUpgradeFailed    ConditionReason = "UpgradeFailed"
	ComponentPlanReasonRollBackSuccess  ConditionReason = "RollBackSuccess"
	ComponentPlanReasonRollBackFailed   ConditionReason = "RollBackFailed"
)

Condition resons for ComponentPlan

const (
	ReasonAvailable        ConditionReason = "Available"
	ReasonUnavailable      ConditionReason = "Unavailable"
	ReasonCreating         ConditionReason = "Creating"
	ReasonCreated          ConditionReason = "Created"
	ReasonDeleting         ConditionReason = "Deleting"
	ReasonReconcileSuccess ConditionReason = "ReconcileSuccess"
	ReasonReconcileError   ConditionReason = "ReconcileError"
	ReasonReconcilePaused  ConditionReason = "ReconcilePaused"

	RatingResolvingPipelineRef ConditionReason = "ResolvingPipelineRef"
	RatingResolvingTaskRef     ConditionReason = "ResolvingTaskRef"
	RatingRunning              ConditionReason = "Running"
	RatingSucceeded            ConditionReason = "Succeeded"
	RatingDidabled             ConditionReason = "Disabled"

	PipelineRunning      ConditionReason = "PipelineRunning"
	PipelineRunFailed    ConditionReason = "PipelineRunFailed"
	PipelineRunSucceeded ConditionReason = "PipelineRunSucceeded"
	EvaluationRunning    ConditionReason = "EvaluationRunning"
	EvaluationFailed     ConditionReason = "EvaluationFailed"
	EvaluationSucceeded  ConditionReason = "EvaluationSucceeded"
)

Some common Condition resons.

type ConditionType

type ConditionType string

A ConditionType represents a condition a resource could be in.

const (
	ComponentPlanTypeSucceeded ConditionType = "Succeeded"
	ComponentPlanTypeApproved  ConditionType = "Approved"
	ComponentPlanTypeActioned  ConditionType = "Actioned"
)

ConditionType for ComponentPlan

const (
	// TypeReady resources are believed to be ready to handle work.
	TypeReady ConditionType = "Ready"

	// TypeSynced resources are believed to be in sync with the
	// Kubernetes resources that manage their lifecycle.
	TypeSynced ConditionType = "Synced"

	TypeFailedSync ConditionType = "FailedSync"
)

Some common Condition types.

const (
	// SubscriptionTypeReady indicates that the subscription is ready to use
	SubscriptionTypeReady = TypeReady
	// SubscriptionTypeSourceSynced indicates that the component and the repository are synced
	SubscriptionTypeSourceSynced ConditionType = "SourceSynced"
	// SubscriptionTypePlanSynce indicates that the componentplan is synced
	SubscriptionTypePlanSynce ConditionType = "PlanSynced"
)

ConditionType for Subscription

type ConditionedStatus

type ConditionedStatus struct {
	// Conditions of the resource.
	// +optional
	Conditions []Condition `json:"conditions,omitempty"`
}

A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.

func NewConditionedStatus

func NewConditionedStatus(c ...Condition) *ConditionedStatus

NewConditionedStatus returns a stat with the supplied conditions set.

func (*ConditionedStatus) DeepCopy

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

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

func (*ConditionedStatus) DeepCopyInto

func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)

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

func (*ConditionedStatus) Equal

func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool

Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.

func (*ConditionedStatus) GetCondition

func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition

GetCondition returns the condition for the given ConditionType if exists, otherwise returns nil

func (*ConditionedStatus) SetConditions

func (s *ConditionedStatus) SetConditions(c ...Condition)

SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.

type Config

type Config struct {
	// creator is the name of crd creator, filled by webhook
	Creator string `json:"creator,omitempty"`

	Override Override `json:"override,omitempty"`

	// Name is pass to helm install <chart> <name>, name arg
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// Force is passed to helm upgrade/rollback --force
	// in upgrade, force resource updates through a replacement strategy
	// in rollback, force resource update through delete/recreate if needed
	Force bool `json:"force,omitempty"`

	// TimeoutSeconds is pass to helm install/upgrade/rollback --timeout, default is 300s
	// time to wait for any individual Kubernetes operation (like Jobs for hooks)
	TimeOutSeconds int `json:"timeoutSeconds,omitempty"`

	// Wait is pass to helm install/upgrade/rollback --wait
	// if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as --timeout
	Wait bool `json:"wait,omitempty"`

	// WaitForJobs is pass to helm install/upgrade/rollback --wait-for-jobs
	// if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout
	WaitForJobs bool `json:"waitForJobs,omitempty"`

	// Description is pass to helm install/upgrade --description
	// add a custom description
	Description string `json:"description,omitempty"`

	// DependencyUpdate is pass to helm install/upgrade --dependency-update
	// update dependencies if they are missing before installing the chart
	DependencyUpdate bool `json:"dependencyUpdate,omitempty"`

	// DisableHooks is pass to helm install/upgrade/rollback --no-hooks
	// if set, prevent hooks from running during install and disable pre/post upgrade hooks
	DisableHooks bool `json:"disableHooks,omitempty"`

	// DisableOpenAPIValidation is pass to helm install/upgrade --disable-openapi-validation
	// if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema
	DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`

	// Atomic is pass to helm install/upgrade --atomic
	// if set, the installation process deletes the installation on failure. The --wait flag will be set automatically if --atomic is used
	Atomic bool `json:"atomic,omitempty"`

	// SkipCRDs is pass to helm install/upgrade --skip-crds
	// if set, no CRDs will be installed. By default, CRDs are installed if not already present
	SkipCRDs bool `json:"skipCRDs,omitempty"`

	// EnableDNS is pass to helm install/upgrade --enable-dns
	// enable DNS lookups when rendering templates
	EnableDNS bool `json:"enableDNS,omitempty"`

	// CleanupOnFail is pass to helm upgrade/rollback --cleanup-on-fail
	// allow deletion of new resources created in this upgrade when upgrade fails
	CleanupOnFail bool `json:"cleanupOnFail,omitempty"`

	// KeepHistory is paas to helm uninstall/rollback --keep-history
	// remove all associated resources and mark the release as deleted, but retain the release history.
	KeepHistory bool `json:"keepHistory,omitempty"`

	// MaxHistory is pass to helm upgrade --history-max
	// limit the maximum number of revisions saved per release. Use 0 for no limit
	MaxHistory *int `json:"historyMax,omitempty"`

	// MaxRetry
	MaxRetry *int `json:"maxRetry,omitempty"`

	// RecreatePods is pass to helm rollback --recreate-pods
	// performs pods restart for the resource if applicable. default is false
	RecreatePods bool `json:"recreatePods,omitempty"`
}

Config defines the configuration of the ComponentPlan Greatly inspired by https://github.com/helm/helm/blob/2398830f183b6d569224ae693ae9215fed5d1372/cmd/helm/install.go#L161 And https://github.com/helm/helm/blob/2398830f183b6d569224ae693ae9215fed5d1372/cmd/helm/upgrade.go#L70 Note: we will helm INSTALL release if not exists or helm UPGRADE if exists.** Note: no --create-namespace, bacause helm relase will install in componentplan's namespace. Note: no --dry-run, bacause no need to config simulate. Note: no --replace, because re-use the given name is not safe in production Note: no --render-subchart-notes, bacause we do not show notes. Note: no --devel config, because it equivalent to version '>0.0.0-0'. Note: no --nameTemplate config, because we need a determined name, nameTemplate may produce different results when it is run multiple times. Note: no --generateName config with the same reason above. Note: no --reset-values or --reuse-values config, because we use Override config Note: other args like --username or --cert-file should setted in repo CRD. TODO: should we support --post-renderer and --post-renderer-args ? TODO: add --verify --keyring config after we handle keyring config

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) GetMaxHistory added in v0.1.1

func (c *Config) GetMaxHistory() int

func (*Config) GetMaxRetry added in v0.1.1

func (c *Config) GetMaxRetry() int

func (*Config) Timeout added in v0.1.1

func (c *Config) Timeout() time.Duration

type Evaluator added in v0.1.5

type Evaluator struct {
	// LLM defines the LLM to be used when evaluating the component
	LLM arcadiallms.LLMType `json:"llm,omitempty"`
}

func (*Evaluator) DeepCopy added in v0.1.5

func (in *Evaluator) DeepCopy() *Evaluator

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

func (*Evaluator) DeepCopyInto added in v0.1.5

func (in *Evaluator) DeepCopyInto(out *Evaluator)

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

type EvaluatorStatus added in v0.1.5

type EvaluatorStatus struct {
	Prompt                      string `json:"prompt,omitempty"`
	arcadiav1.ConditionedStatus `json:",inline"`

	// FinalRating from this evaluation
	// TODO: add the final rating
	FinalRating string `json:"finalRating,omitempty"`
}

func (*EvaluatorStatus) DeepCopy added in v0.1.5

func (in *EvaluatorStatus) DeepCopy() *EvaluatorStatus

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

func (*EvaluatorStatus) DeepCopyInto added in v0.1.5

func (in *EvaluatorStatus) DeepCopyInto(out *EvaluatorStatus)

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

type Filter

type Filter struct {
	Name     string
	Versions []*hrepo.ChartVersion
}

+kubebuilder:object:generate=false

type FilterCond

type FilterCond struct {
	// Name of the component
	Name string `json:"name,omitempty"`

	// default is keep
	// +kubebuilder:validation:Enum=keep;ignore
	// +kubebuilder:default:=keep
	Operation FilterOp `json:"operation,omitempty"`

	// If True, the current version will be retained even if it is deprecated.
	KeepDeprecated bool `json:"keepDeprecated,omitempty"`

	// VersionedFilterCond filters which version in component are pulled/ignored from the repository
	VersionedFilterCond *VersionedFilterCond `json:"versionedFilterCond,omitempty"`
}

func (*FilterCond) DeepCopy

func (in *FilterCond) DeepCopy() *FilterCond

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

func (*FilterCond) DeepCopyInto

func (in *FilterCond) DeepCopyInto(out *FilterCond)

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

type FilterFunc

type FilterFunc func(FilterCond, string) bool

+kubebuilder:object:generate=false

type FilterOp

type FilterOp string
const (
	FilterOpKeep   FilterOp = "keep"
	FilterOpIgnore FilterOp = "ignore"
)

type GetTitleForReplaceSider added in v0.1.1

type GetTitleForReplaceSider struct {
	// 方法
	Method string `json:"method,omitempty"`
	// 参数
	Params string `json:"params,omitempty"`
	// 获取数据的路径
	ResponseDataPath []string `json:"responseDataPath,omitempty"`
}

func (*GetTitleForReplaceSider) DeepCopy added in v0.1.1

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

func (*GetTitleForReplaceSider) DeepCopyInto added in v0.1.1

func (in *GetTitleForReplaceSider) DeepCopyInto(out *GetTitleForReplaceSider)

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

type ImageOverride

type ImageOverride struct {
	// Registry include host and port number, like `registry-1.docker.io` or `registry-1.docker.io:5000`
	Registry string `json:"registry,omitempty"`
	// NewRegistry means replaced one
	NewRegistry string `json:"newRegistry,omitempty"`
	// PathOverride means replaced path
	PathOverride *PathOverride `json:"pathOverride,omitempty"`
}

func (*ImageOverride) DeepCopy

func (in *ImageOverride) DeepCopy() *ImageOverride

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

func (*ImageOverride) DeepCopyInto

func (in *ImageOverride) DeepCopyInto(out *ImageOverride)

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

type InstallMethod

type InstallMethod string
const (
	// InstallMethodAuto means install directly without confirmation after detecting a new version.
	InstallMethodAuto InstallMethod = "auto"
	// InstallMethodManual means installation process requires user's permission to proceed.
	InstallMethodManual InstallMethod = "manual"
)

func (*InstallMethod) IsAuto

func (i *InstallMethod) IsAuto() bool

IsAuto returns true if InstallMethod is Auto, case-insensitivity.

type Installed

type Installed struct {
	// InstalledVersion is the version currently installed in cluster
	// +optional
	InstalledVersion ComponentVersion `json:"installedVersion"`

	// InstalledTime is the time that the version was installed in cluster
	// +optional
	InstalledTime metav1.Time `json:"installedTime"`

	// ComponentPlanRef is a reference to the latest ComponentPlan
	// +optional
	ComponentPlanRef *corev1.ObjectReference `json:"componentPlan"`
}

func (*Installed) DeepCopy

func (in *Installed) DeepCopy() *Installed

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

func (*Installed) DeepCopyInto

func (in *Installed) DeepCopyInto(out *Installed)

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

type Maintainer

type Maintainer struct {
	// Name is a user name or organization name
	Name string `json:"name,omitempty"`
	// Email is an optional email address to contact the named maintainer
	Email string `json:"email,omitempty"`
	// URL is an optional URL to an address for the named maintainer
	URL string `json:"url,omitempty"`
}

Maintainer describes a Chart maintainer. inspire by https://github.com/helm/helm/blob/2398830f183b6d569224ae693ae9215fed5d1372/pkg/chart/metadata.go#L26

func (*Maintainer) DeepCopy

func (in *Maintainer) DeepCopy() *Maintainer

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

func (*Maintainer) DeepCopyInto

func (in *Maintainer) DeepCopyInto(out *Maintainer)

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

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

	Spec   MenuSpec   `json:"spec,omitempty"`
	Status MenuStatus `json:"status,omitempty"`
}

Menu is the Schema for the menus API

func (in *Menu) DeepCopy() *Menu

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

func (in *Menu) DeepCopyInto(out *Menu)

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

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

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

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

MenuList contains a list of Menu

func (in *MenuList) DeepCopy() *MenuList

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

func (in *MenuList) DeepCopyInto(out *MenuList)

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

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

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

type MenuReference struct {
	// Name of the referent.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
}
func (in *MenuReference) DeepCopy() *MenuReference

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

func (in *MenuReference) DeepCopyInto(out *MenuReference)

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

type MenuSpec struct {
	// 菜单组中文名称
	ID string `json:"id,omitempty"`

	// 菜单中文名称
	// +kubebuilder:validation:MaxLength:=64
	Text string `json:"text,omitempty"`

	// 菜单英文名称
	// +kubebuilder:validation:MaxLength:=64
	TextEn string `json:"textEn"`
	/** 菜单组所在列序号 */
	// +optional
	Column uint32 `json:"column,omitempty"`
	// 菜单在当前组中的排序,数字越小越靠前
	// +optional
	RankingInColumn uint32 `json:"rankingInColumn,omitempty"`
	// 菜单图标
	// +optional
	Icon string `json:"icon,omitempty"`

	// 给替换菜单的返回按钮使用,当新的 pathname 是替换菜单,且替换菜单的返回按钮需要返回到当前 pathname 时,配置此属性;
	// 其值得为新的 pathname,同时需要注意⚠️,如果新的地址有多个,则应该取多个地址的公共部分,例如,/oidc/management/projects/:id/role
	// 和 /oidc/management/projects/:id/member 都需要支持,则应配置为/oidc/management/projects/:id
	// +optional
	ReplaceSiderBackNextPathnamePattern string `json:"replaceSiderBackNextPathnamePattern,omitempty"`
	// 菜单路由
	// +optional
	Pathname string `json:"pathname,omitempty"`
	// 跳转菜单路由,优先级高于 pathname,指定后点击菜单会跳转到 redirect 相应路由
	// +optional
	Redirect string `json:"redirect,omitempty"`
	// 同 a 标签的 target 属性
	// +optional
	Target string `json:"target,omitempty"`
	// 菜单可见需要的角色
	// +optional
	RequiredRoles []string `json:"requiredRoles,omitempty"`
	// 菜单可对应的 module 二进制位 (有一个满足即可见)
	// +optional
	RequiredModuleBits []int32 `json:"requiredModuleBits,omitempty"`
	// 菜单对应路由是否可以切换租户
	// +optional
	Tenant bool `json:"tenant,omitempty"`
	// 菜单对应路由是否可以切换项目
	// +optional
	Project bool `json:"project,omitempty"`
	// 菜单对应路由是否可以切换集群
	// +optional
	Cluster bool `json:"cluster,omitempty"`
	// 是否渲染选择项目、集群
	// +optional
	IsRenderSelectCurrent bool `json:"isRenderSelectCurrent,omitempty"`
	// 是否在进入子页面后将 sider 替换
	// +optional
	UseChildrenReplaceSider bool `json:"useChildrenReplaceSider,omitempty"`
	// 获取 title 的函数
	// +optional
	GetTitleForReplaceSider GetTitleForReplaceSider `json:"getTitleForReplaceSider,omitempty"`
	// 父菜单 ID
	// +optional
	Parent string `json:"parent,omitempty"`
	// +optional
	// FIXME: deprecate this when `AutoMenus` supported
	ParentOwnerReferences metav1.OwnerReference `json:"parentOwnerReferences,omitempty"`
	// menu 显示控制
	// +optional
	Disabled bool `json:"disabled,omitempty"`
}

MenuSpec defines the desired state of Menu

func (in *MenuSpec) DeepCopy() *MenuSpec

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

func (in *MenuSpec) DeepCopyInto(out *MenuSpec)

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

type MenuStatus struct {
}

MenuStatus defines the observed state of Menu

func (in *MenuStatus) DeepCopy() *MenuStatus

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

func (in *MenuStatus) DeepCopyInto(out *MenuStatus)

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

type Override

type Override struct {
	// Values is passed to helm install --values or -f
	// specify values in a YAML file or a URL (can specify multiple)
	// ValuesFrom holds references to resources containing Helm values for this HelmRelease,
	// and information about how they should be merged.
	ValuesFrom []*ValuesReference `json:"valuesFrom,omitempty"`
	// Values holds the values for this Helm release.
	// +optional
	Values *apiextensionsv1.JSON `json:"values,omitempty"`
	// Set is passed to helm install --set
	// can specify multiple or separate values with commas: key1=val1,key2=val2
	// Helm also provides other set options, such as --set-json or --set-literal,
	// which can be replaced by values or valuesFrom fields.
	Set []string `json:"set,omitempty"`
	// SetString is passed to helm install --set-string
	// set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
	// https://github.com/helm/helm/pull/3599
	// Helm also provides other set options, such as --set-json or --set-literal,
	// which can be replaced by values or valuesFrom fields.
	SetString []string `json:"set-string,omitempty"`

	// Images for replace old image
	// see https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/images
	// +optional
	Images []kustomize.Image `json:"images,omitempty"`
}

Override defines the override settings for the component

func (*Override) DeepCopy

func (in *Override) DeepCopy() *Override

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

func (*Override) DeepCopyInto

func (in *Override) DeepCopyInto(out *Override)

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

func (*Override) GetValueFileDir added in v0.1.1

func (v *Override) GetValueFileDir(helmCacheHome, namespace, name string) string

GetValueFileDir returns the dir path to Override.Value file, for example: $HOME/.cache/helm/embed.default.testone

type Param added in v0.1.4

type Param struct {
	Name  string     `json:"name"`
	Value ParamValue `json:"value"`
}

func (*Param) DeepCopy added in v0.1.4

func (in *Param) DeepCopy() *Param

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

func (*Param) DeepCopyInto added in v0.1.4

func (in *Param) DeepCopyInto(out *Param)

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

type ParamType added in v0.1.4

type ParamType string

ParamType indicates the type of an input parameter; Used to distinguish between a single string and an array of strings.

const (
	ParamTypeString ParamType = "string"
	ParamTypeArray  ParamType = "array"
	ParamTypeObject ParamType = "object"
)

Valid ParamTypes:

type ParamValue added in v0.1.4

type ParamValue struct {
	// +kubebuilder:validation:Enum:=string;array;object
	Type      ParamType `json:"type"` // Represents the stored type of ParamValues.
	StringVal string    `json:"stringVal,omitempty"`
	// +listType=atomic
	ArrayVal  []string          `json:"arrayVal,omitempty"`
	ObjectVal map[string]string `json:"objectVal,omitempty"`
}

ParamValue is a type that can hold a single string or string array. Used in JSON unmarshalling so that a single JSON field can accept either an individual string or an array of strings.

func (*ParamValue) DeepCopy added in v0.1.4

func (in *ParamValue) DeepCopy() *ParamValue

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

func (*ParamValue) DeepCopyInto added in v0.1.4

func (in *ParamValue) DeepCopyInto(out *ParamValue)

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

type PathOverride

type PathOverride struct {
	// The path consists of slash-separated components.
	// Each component may contain lowercase letters, digits and separators.
	// A separator is defined as a period, one or two underscores, or one or more hyphens.
	// A component may not start or end with a separator.
	// While the OCI Distribution Specification supports more than two slash-separated components, most registries only support two slash-separated components.
	// For Docker’s public registry, the path format is as follows: [NAMESPACE/]REPOSITORY:
	//   The first, optional component is typically a user’s or an organization’s namespace.
	//   The second, mandatory component is the repository name. When the namespace is not present, Docker uses library as the default namespace.
	Path    string `json:"path,omitempty"`
	NewPath string `json:"newPath,omitempty"`
}

func (*PathOverride) DeepCopy

func (in *PathOverride) DeepCopy() *PathOverride

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

func (*PathOverride) DeepCopyInto

func (in *PathOverride) DeepCopyInto(out *PathOverride)

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

type PipelineParam added in v0.1.4

type PipelineParam struct {
	// Dimension of this pipelinerun
	// +kubebuilder:validation:Pattern=`^[A-Za-z]+$`
	Dimension string `json:"dimension"`
	// PipelineName the name of pipeline
	PipelineName string `json:"pipelineName"`

	// Params List of parameters defined in the pipeline
	// +listType=atomic
	Params []Param `json:"params,omitempty"`
}

func (*PipelineParam) DeepCopy added in v0.1.4

func (in *PipelineParam) DeepCopy() *PipelineParam

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

func (*PipelineParam) DeepCopyInto added in v0.1.4

func (in *PipelineParam) DeepCopyInto(out *PipelineParam)

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

type PipelineRunStatus added in v0.1.4

type PipelineRunStatus struct {
	PipelineRunName string `json:"pipelinerunName"`
	PipelineName    string `json:"pipelineName"`

	Tasks             []Task `json:"tasks,omitempty"`
	ConditionedStatus `json:",inline"`
}

func (*PipelineRunStatus) DeepCopy added in v0.1.4

func (in *PipelineRunStatus) DeepCopy() *PipelineRunStatus

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

func (*PipelineRunStatus) DeepCopyInto added in v0.1.4

func (in *PipelineRunStatus) DeepCopyInto(out *PipelineRunStatus)

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

type Portal added in v0.1.3

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

	Spec   PortalSpec   `json:"spec,omitempty"`
	Status PortalStatus `json:"status,omitempty"`
}

Portal is the Schema for the portals API

func (*Portal) DeepCopy added in v0.1.3

func (in *Portal) DeepCopy() *Portal

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

func (*Portal) DeepCopyInto added in v0.1.3

func (in *Portal) DeepCopyInto(out *Portal)

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

func (*Portal) DeepCopyObject added in v0.1.3

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

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

func (*Portal) Default added in v0.1.4

func (p *Portal) Default(ctx context.Context, obj runtime.Object) error

func (*Portal) SetupWebhookWithManager added in v0.1.3

func (p *Portal) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Portal) ValidateCreate added in v0.1.3

func (p *Portal) ValidateCreate(ctx context.Context, obj runtime.Object) error

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

func (*Portal) ValidateDelete added in v0.1.3

func (p *Portal) ValidateDelete(ctx context.Context, obj runtime.Object) error

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

func (*Portal) ValidateUpdate added in v0.1.3

func (p *Portal) ValidateUpdate(ctx context.Context, oldObj runtime.Object, newObj runtime.Object) error

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

type PortalList added in v0.1.3

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

PortalList contains a list of Portal

func (*PortalList) DeepCopy added in v0.1.3

func (in *PortalList) DeepCopy() *PortalList

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

func (*PortalList) DeepCopyInto added in v0.1.3

func (in *PortalList) DeepCopyInto(out *PortalList)

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

func (*PortalList) DeepCopyObject added in v0.1.3

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

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

type PortalSpec added in v0.1.3

type PortalSpec struct {
	// the path for request acccessing
	Path string `json:"path"`
	// the path of the static file
	Entry string `json:"entry"`
}

PortalSpec defines the desired state of Portal

func (*PortalSpec) DeepCopy added in v0.1.3

func (in *PortalSpec) DeepCopy() *PortalSpec

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

func (*PortalSpec) DeepCopyInto added in v0.1.3

func (in *PortalSpec) DeepCopyInto(out *PortalSpec)

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

type PortalStatus added in v0.1.3

type PortalStatus struct {
	// conflicted portals with same Entry
	ConflictsInEntry []string `json:"conflictsInEntry,omitempty"`
	// conflicted portals with same Path
	ConflictsInPath []string `json:"conflictsInPath,omitempty"`
}

PortalStatus defines the observed state of Portal

func (*PortalStatus) DeepCopy added in v0.1.3

func (in *PortalStatus) DeepCopy() *PortalStatus

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

func (*PortalStatus) DeepCopyInto added in v0.1.3

func (in *PortalStatus) DeepCopyInto(out *PortalStatus)

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

type PullStategy

type PullStategy struct {
	// Interval for pulling
	IntervalSeconds int `json:"intervalSeconds,omitempty"`

	// Timeout for pulling
	TimeoutSeconds int `json:"timeoutSeconds,omitempty"`

	// Retry upon timeout
	Retry int `json:"retry,omitempty"`
}

PullStategy for pulling components in repository

func (*PullStategy) DeepCopy

func (in *PullStategy) DeepCopy() *PullStategy

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

func (*PullStategy) DeepCopyInto

func (in *PullStategy) DeepCopyInto(out *PullStategy)

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

type Rating added in v0.1.4

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

	Spec   RatingSpec   `json:"spec,omitempty"`
	Status RatingStatus `json:"status,omitempty"`
}

func (*Rating) DeepCopy added in v0.1.4

func (in *Rating) DeepCopy() *Rating

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

func (*Rating) DeepCopyInto added in v0.1.4

func (in *Rating) DeepCopyInto(out *Rating)

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

func (*Rating) DeepCopyObject added in v0.1.4

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

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

func (Rating) GetPipelineRunStatus added in v0.1.5

func (rating Rating) GetPipelineRunStatus(dimensionLabel string) PipelineRunStatus

type RatingList added in v0.1.4

type RatingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Rating `json:"items"`
}

func (*RatingList) DeepCopy added in v0.1.4

func (in *RatingList) DeepCopy() *RatingList

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

func (*RatingList) DeepCopyInto added in v0.1.4

func (in *RatingList) DeepCopyInto(out *RatingList)

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

func (*RatingList) DeepCopyObject added in v0.1.4

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

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

type RatingSpec added in v0.1.4

type RatingSpec struct {
	// ComponentName Each Rating corresponds to a component
	ComponentName string `json:"componentName"`

	// PipelineParams List of parameters defined in the pipeline
	// If mulitple PipelineParams contains same dimension,only the 1st one shall be used
	PipelineParams []PipelineParam `json:"pipelineParams"`

	// Evaluator defines the configuration when evaluating the component
	Evaluator `json:"evaluator"`
}

func (*RatingSpec) DeepCopy added in v0.1.4

func (in *RatingSpec) DeepCopy() *RatingSpec

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

func (*RatingSpec) DeepCopyInto added in v0.1.4

func (in *RatingSpec) DeepCopyInto(out *RatingSpec)

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

type RatingStatus added in v0.1.4

type RatingStatus struct {
	// PipelineRuns contains the pipelinerun status with the `Dimension` as the key
	PipelineRuns map[string]PipelineRunStatus `json:"pipelineRuns,omitempty"`
	// Evaluations contains the evaluator status with the `Dimension` as the key
	Evaluations map[string]EvaluatorStatus `json:"evaluations,omitempty"`

	ConditionedStatus `json:",inline"`
}

func (*RatingStatus) DeepCopy added in v0.1.4

func (in *RatingStatus) DeepCopy() *RatingStatus

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

func (*RatingStatus) DeepCopyInto added in v0.1.4

func (in *RatingStatus) DeepCopyInto(out *RatingStatus)

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

type Repository

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

	Spec   RepositorySpec   `json:"spec,omitempty"`
	Status RepositoryStatus `json:"status,omitempty"`
}

Repository is the Schema for the repositories API

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.

func (*Repository) DeepCopyObject

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

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

func (*Repository) Default added in v0.1.5

func (r *Repository) Default(ctx context.Context, obj runtime.Object) error

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

func (*Repository) GetRepoType added in v0.1.6

func (r *Repository) GetRepoType(c client.Client) RepositoryType

func (*Repository) IsChartmuseum added in v0.1.6

func (r *Repository) IsChartmuseum(c client.Client) bool

IsChartmuseum determines whether the repository is to be treated as a chartmuseum

func (*Repository) IsOCI added in v0.1.5

func (r *Repository) IsOCI() bool

IsOCI determines whether the repository is to be treated as an OCI repo

func (*Repository) NamespacedName added in v0.1.1

func (r *Repository) NamespacedName() string

NamespacedName return the namespaced name of the repository in string format

func (*Repository) SetupWebhookWithManager added in v0.1.5

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

type RepositoryHealth

type RepositoryHealth struct {
	// RepositoryRef is a reference to a Repository.
	RepositoryRef *corev1.ObjectReference `json:"repository"`

	// LastUpdated represents the last time that the RepositoryHealth changed
	LastUpdated *metav1.Time `json:"lastUpdated"`

	// Healthy is true if the Repository is healthy; false otherwise.
	Healthy *bool `json:"healthy"`
}

RepositoryHealth describes the health of a Repository the Subscription knows about.

func (*RepositoryHealth) DeepCopy

func (in *RepositoryHealth) DeepCopy() *RepositoryHealth

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

func (*RepositoryHealth) DeepCopyInto

func (in *RepositoryHealth) DeepCopyInto(out *RepositoryHealth)

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

type RepositoryList

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

RepositoryList contains a list of Repository

func (*RepositoryList) DeepCopy

func (in *RepositoryList) DeepCopy() *RepositoryList

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

func (*RepositoryList) DeepCopyInto

func (in *RepositoryList) DeepCopyInto(out *RepositoryList)

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

func (*RepositoryList) DeepCopyObject

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

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

type RepositorySource added in v0.1.5

type RepositorySource string

RepositorySource is the source of code repository

const (
	Official RepositorySource = "official"
	Unknown  RepositorySource = "unknown"
)

type RepositorySpec

type RepositorySpec struct {
	// URL chart repository address
	// +kubebuilder:validation:Required
	URL string `json:"url"`

	// AuthSecret if the chart repository requires auth authentication,
	// set the username and password to secret, with the fields user and password respectively.
	AuthSecret string `json:"authSecret,omitempty"`

	Insecure bool `json:"insecure,omitempty"`

	// +kubebuilder:default:=unknown
	RepositoryType string `json:"repositoryType,omitempty"`

	// PullStategy for this repository
	PullStategy *PullStategy `json:"pullStategy,omitempty"`

	Filter []FilterCond `json:"filter,omitempty"`
	// ImageOverride means replaced images rules for this repository
	ImageOverride []ImageOverride `json:"imageOverride,omitempty"`

	// KeywordLenLimit the keyword array length limit
	KeywordLenLimit int `json:"keywordLenLimit,omitempty"`

	// EnableRating enable component rating
	EnableRating bool `json:"enableRating,omitempty"`
}

RepositorySpec defines the desired state of Repository

func (*RepositorySpec) DeepCopy

func (in *RepositorySpec) DeepCopy() *RepositorySpec

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

func (*RepositorySpec) DeepCopyInto

func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec)

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

type RepositoryStatus

type RepositoryStatus struct {
	// URLHistory URL change history
	URLHistory []string `json:"urlHistory,omitempty"`
	// ConditionedStatus is the current status
	ConditionedStatus `json:",inline"`
}

RepositoryStatus defines the observed state of Repository

func (*RepositoryStatus) DeepCopy

func (in *RepositoryStatus) DeepCopy() *RepositoryStatus

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

func (*RepositoryStatus) DeepCopyInto

func (in *RepositoryStatus) DeepCopyInto(out *RepositoryStatus)

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

type RepositoryType added in v0.1.6

type RepositoryType string
const (
	RepositoryTypeOCI         RepositoryType = "oci"
	RepositoryTypeChartmuseum RepositoryType = "chartmuseum"
	RepositoryUnknown         RepositoryType = "unknown"
)

type Resource

type Resource struct {
	SpecDiffwithExist *string `json:"specDiffwithExist,omitempty"`
	NewCreated        *bool   `json:"NewCreated,omitempty"`
	Kind              string  `json:"kind"`
	Name              string  `json:"name"`
	APIVersion        string  `json:"apiVersion"`
}

Resource represents one single resource in the ComponentPlan because the resource, if namespaced, is the same namepsace as the ComponentPlan, it is either a cluster and does not have namespace, so the namespace field is not needed.

func GetResourcesAndImages added in v0.1.3

func GetResourcesAndImages(ctx context.Context, logger logr.Logger, c client.Client, data, namespace string) (resources []Resource, images []string, err error)

GetResourcesAndImages get resource slices, image lists from manifests

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

type Router added in v0.1.1

type Router struct {
	// the path for request acccessing
	Path string `json:"path,omitempty"`
	// the path of the static file
	Entry string `json:"entry,omitempty"`
}

func (*Router) DeepCopy added in v0.1.1

func (in *Router) DeepCopy() *Router

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

func (*Router) DeepCopyInto added in v0.1.1

func (in *Router) DeepCopyInto(out *Router)

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

type Subscription

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

	Spec   SubscriptionSpec   `json:"spec,omitempty"`
	Status SubscriptionStatus `json:"status,omitempty"`
}

Subscription is the Schema for the subscriptions API

func (*Subscription) DeepCopy

func (in *Subscription) DeepCopy() *Subscription

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

func (*Subscription) DeepCopyInto

func (in *Subscription) DeepCopyInto(out *Subscription)

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

func (*Subscription) DeepCopyObject

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

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

func (*Subscription) Default added in v0.1.3

func (r *Subscription) Default(ctx context.Context, obj runtime.Object) error

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

func (*Subscription) MostRecentScheduleTime added in v0.1.4

func (r *Subscription) MostRecentScheduleTime(now time.Time, schedule cron.Schedule) (time.Time, *time.Time, bool, error)

MostRecentScheduleTime returns:

  • CronJob's creation time,
  • the most recent time a Job should be created or nil, if that's after now,
  • boolean indicating an excessive number of missed schedules,
  • error in an edge case where the schedule specification is grammatically correct, but logically doesn't make sense (31st day for months with only 30 days, for example).

inspire by https://github.com/kubernetes/kubernetes/blob/2fe38f93e53201b0c9e58aa6e3d37b8a61d2ca23/pkg/controller/cronjob/utils.go#L81

func (*Subscription) SetupWebhookWithManager added in v0.1.3

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

func (*Subscription) ValidateCreate added in v0.1.3

func (r *Subscription) ValidateCreate(ctx context.Context, obj runtime.Object) error

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

func (*Subscription) ValidateDelete added in v0.1.3

func (r *Subscription) ValidateDelete(ctx context.Context, obj runtime.Object) error

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

func (*Subscription) ValidateUpdate added in v0.1.3

func (r *Subscription) ValidateUpdate(ctx context.Context, oldObj runtime.Object, newObj runtime.Object) error

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

type SubscriptionList

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

SubscriptionList contains a list of Subscription

func (*SubscriptionList) DeepCopy

func (in *SubscriptionList) DeepCopy() *SubscriptionList

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

func (*SubscriptionList) DeepCopyInto

func (in *SubscriptionList) DeepCopyInto(out *SubscriptionList)

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

func (*SubscriptionList) DeepCopyObject

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

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

type SubscriptionSpec

type SubscriptionSpec struct {
	// ComponentRef is a reference to the Component
	ComponentRef *corev1.ObjectReference `json:"component"`

	// RepositoryRef is a reference to the Repository
	RepositoryRef *corev1.ObjectReference `json:"repository,omitempty"`

	// ComponentPlanInstallMethod is the method used to install the component
	ComponentPlanInstallMethod InstallMethod `json:"componentPlanInstallMethod,omitempty"`

	// The installation schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	// ComponentPlanInstallMethod must be auto.
	// +optional
	Schedule string `json:"schedule,omitempty"`

	// Config is the configuration of the subscription's componentplan
	Config `json:",inline"`
}

SubscriptionSpec defines the desired state of Subscription

func (*SubscriptionSpec) DeepCopy

func (in *SubscriptionSpec) DeepCopy() *SubscriptionSpec

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

func (*SubscriptionSpec) DeepCopyInto

func (in *SubscriptionSpec) DeepCopyInto(out *SubscriptionSpec)

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

type SubscriptionStatus

type SubscriptionStatus struct {
	ConditionedStatus `json:",inline"`

	// Installed records all componentplans installed, ordered by installation time.
	// +optional
	Installed []Installed `json:"installed,omitempty"`

	// RepositoryHealth contains the Subscription's view of its relevant Repository' status.
	// It is used to determine SubscriptionStatusConditions related to Repository
	// +optional
	RepositoryHealth RepositoryHealth `json:"repositoryHealth,omitempty"`
}

SubscriptionStatus defines the state of Subscription

func (*SubscriptionStatus) DeepCopy

func (in *SubscriptionStatus) DeepCopy() *SubscriptionStatus

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

func (*SubscriptionStatus) DeepCopyInto

func (in *SubscriptionStatus) DeepCopyInto(out *SubscriptionStatus)

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

type Task added in v0.1.4

type Task struct {
	Name        string `json:"name"`
	Description string `json:"description"`

	TaskRunName string `json:"taskRunName,omitempty"`

	Type string `json:"type,omitempty"`

	ConditionedStatus `json:",inline"`
}

func (*Task) DeepCopy added in v0.1.4

func (in *Task) DeepCopy() *Task

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

func (*Task) DeepCopyInto added in v0.1.4

func (in *Task) DeepCopyInto(out *Task)

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

type ValuesReference

type ValuesReference struct {
	// Kind of the values referent, valid values are ('Secret', 'ConfigMap').
	// +kubebuilder:validation:Enum=Secret;ConfigMap
	// +required
	Kind string `json:"kind"`

	// Name of the values' referent. Should reside in the same namespace as the
	// referring resource.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +required
	Name string `json:"name"`

	// ValuesKey is the data key where the values.yaml or a specific value can be
	// found at. Defaults to 'values.yaml'.
	// When set, must be a valid Data Key, consisting of alphanumeric characters,
	// '-', '_' or '.'.
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^[\-._a-zA-Z0-9]+$`
	// +optional
	ValuesKey string `json:"valuesKey,omitempty"`

	// TargetPath is the YAML dot notation path the value should be merged at. When
	// set, the ValuesKey is expected to be a single flat value. Defaults to 'None',
	// which results in the values getting merged at the root.
	// +kubebuilder:validation:MaxLength=250
	// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
	// +optional
	TargetPath string `json:"targetPath,omitempty"`
}

ValuesReference contains a reference to a resource containing Helm values, and optionally the key they can be found at.

func (*ValuesReference) DeepCopy

func (in *ValuesReference) DeepCopy() *ValuesReference

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

func (*ValuesReference) DeepCopyInto

func (in *ValuesReference) DeepCopyInto(out *ValuesReference)

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

func (*ValuesReference) GetValuesFileDir added in v0.1.1

func (v *ValuesReference) GetValuesFileDir(helmCacheHome, namespace string) string

GetValuesFileDir returns the dir path to this ValuesReference file, for example: $HOME/.cache/helm/secret.default.testone

func (*ValuesReference) GetValuesKey

func (v *ValuesReference) GetValuesKey() string

func (*ValuesReference) Parse added in v0.1.3

func (v *ValuesReference) Parse(ctx context.Context, cli client.Client, ns, dir string) (fileName string, err error)

Parse parses ValuesReference

type VersionedFilterCond

type VersionedFilterCond struct {
	// Accurately match each item in the versions
	Versions []string `json:"versions,omitempty"`
	// Filter version by regexp
	VersionRegexp string `json:"regexp,omitempty"`
	// VersionConstraint Support for user-defined version ranges, etc.
	// Refer to the documentation for more details
	// https://github.com/Masterminds/semver#semver
	VersionConstraint string `json:"versionConstraint,omitempty"`
}

func (*VersionedFilterCond) DeepCopy

func (in *VersionedFilterCond) DeepCopy() *VersionedFilterCond

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

func (*VersionedFilterCond) DeepCopyInto

func (in *VersionedFilterCond) DeepCopyInto(out *VersionedFilterCond)

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