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
Index ¶
- Constants
- Variables
- func AddComponentPlanLabel(target *unstructured.Unstructured, planName string) error
- func FilterMatchVersion(cond FilterCond, version string) bool
- func FilterMatchVersionConstraint(cond FilterCond, version string) bool
- func FilterMatchVersionRegexp(cond FilterCond, version string) bool
- func GenerateComponentPlanManifestConfigMapName(plan *ComponentPlan) string
- func GenerateComponentPlanName(sub *Subscription, version string) string
- func GetImageOverridePath() []string
- func IsCondSame(c1, c2 FilterCond) bool
- func IsFilterSame(cond1, cond2 map[string]FilterCond) bool
- func IsPullStrategySame(a, b *PullStategy) bool
- func Match(fc map[string]FilterCond, filter Filter, funcs ...FilterFunc) ([]int, bool)
- func UpdateCondWithFixedLen(l int, conds *ConditionedStatus, cond Condition)
- type Component
- type ComponentList
- type ComponentPlan
- type ComponentPlanList
- type ComponentPlanSpec
- type ComponentPlanStatus
- type ComponentSpec
- type ComponentStatus
- type ComponentVersion
- type Condition
- func ComponentPlanAppreoved() Condition
- func ComponentPlanInstallFailed(err error) Condition
- func ComponentPlanInstallSuccess() Condition
- func ComponentPlanInstalling() Condition
- func ComponentPlanSucceeded() Condition
- func ComponentPlanUnAppreoved() Condition
- func ComponentPlanUnSucceeded(err error) Condition
- func ComponentPlanWaitInstall() Condition
- func SubscriptionAvailable() Condition
- func SubscriptionReconcileError(ct ConditionType, err error) Condition
- func SubscriptionReconcileSuccess(ct ConditionType) Condition
- func SubscriptionUnavailable() Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition
- func (s *ConditionedStatus) SetConditions(c ...Condition)
- type Config
- type Filter
- type FilterCond
- type FilterFunc
- type FilterOp
- type ImageOverride
- type InstallMethod
- type Installed
- type Maintainer
- type NameConfig
- type Override
- type PathOverride
- type PullStategy
- type Repository
- type RepositoryHealth
- type RepositoryList
- type RepositorySpec
- type RepositoryStatus
- type Resource
- type Subscription
- type SubscriptionList
- type SubscriptionSpec
- type SubscriptionStatus
- type ValuesReference
- type VersionedFilterCond
Constants ¶
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" )
const ( ComponentPlanKey = Group + "/componentplan" ComponentPlanConfigMapRetryLabelKey = "retry" )
const ( Group = "core.kubebb.k8s.com.cn" Version = "v1alpha1" )
const ( Username = "username" Password = "password" CAData = "cadata" CertData = "certdata" KeyData = "keydata" ComponentRepositoryLabel = "kubebb.component.repository" )
const ( SubscriptionReasonAvailable = ReasonAvailable SubscriptionReasonReconcileSuccess = ReasonReconcileSuccess SubscriptionReasonReconcileError = ReasonReconcileError )
Condition resons for Subscription
Variables ¶
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 )
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 AddComponentPlanLabel ¶
func AddComponentPlanLabel(target *unstructured.Unstructured, planName string) error
AddComponentPlanLabel add label against an unstructured object and derived resource. inspire by https://github.com/argoproj/argo-cd/blob/50b2f03657026a0987e4910eca4778e8950e6d87/util/kube/kube.go#L20
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 GetImageOverridePath ¶
func GetImageOverridePath() []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 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 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]
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.
func (*Component) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Component) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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.
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
ComponentRef *corev1.ObjectReference `json:"component"`
// RepositoryRef is a reference to the Repository
RepositoryRef *corev1.ObjectReference `json:"repository,omitempty"`
// 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 {
ConditionedStatus `json:",inline"`
Resources []Resource `json:"resources,omitempty"`
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 {
}
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"`
// versions contains all version of one component.
Versions []ComponentVersion `json:"versions"`
// 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 {
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"`
}
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 ¶
func (c ComponentVersion) Equal(v *ComponentVersion) bool
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"`
// 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 ComponentPlanAppreoved ¶
func ComponentPlanAppreoved() Condition
func ComponentPlanInstallSuccess ¶
func ComponentPlanInstallSuccess() Condition
func ComponentPlanInstalling ¶
func ComponentPlanInstalling() Condition
func ComponentPlanSucceeded ¶
func ComponentPlanSucceeded() Condition
func ComponentPlanUnAppreoved ¶
func ComponentPlanUnAppreoved() Condition
func ComponentPlanWaitInstall ¶
func ComponentPlanWaitInstall() 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
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 ( ComponentPlanReasonWaitInstall ConditionReason = "WaitInstall" ComponentPlanReasonInstalling ConditionReason = "Installing" ComponentPlanReasonInstallSuccess ConditionReason = "InstallSuccess" ComponentPlanReasonInstallFailed ConditionReason = "InstallFailed" )
Condition resons for ComponentPlan
const ( ReasonAvailable ConditionReason = "Available" ReasonCreating ConditionReason = "Creating" ReasonDeleting ConditionReason = "Deleting" ReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ReasonReconcileError ConditionReason = "ReconcileError" ReasonReconcilePaused ConditionReason = "ReconcilePaused" )
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" ComponentPlanTypeInstalled ConditionType = "Installed" )
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 {
Override Override `json:"override,omitempty"`
NameConfig `json:",inline"`
// FIXME reconsider there config because we will use helm template not helm install
// Force is pass to helm install/upgrade --force
// force resource updates through a replacement strategy
Force bool `json:"force,omitempty"`
// Replace is pass to helm install --replace
// re-use the given name, only if that name is a deleted release which remains in the history. This is unsafe in production
Replace bool `json:"replace,omitempty"`
// TimeoutSeconds is pass to helm install/upgrade --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 --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 --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"`
// Devel is pass to helm install/upgrade --devel
// use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored
Devel bool `json:"devel,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"`
// 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"`
// Recreate is pass to helm upgrade --recreate-pods
// performs pods restart for the resource if applicable
Recreate bool `json:"recreate-pods,omitempty"`
// MaxRetry
MaxRetry *int64 `json:"maxRetry,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: helm release will be installed/upgraded in same namespace with ComponentPlan, So no args like --create-namespace Note: helm release will be installed/upgraded, so no args like --dry-run Note: helm release will be installed/upgraded without show notes, so no args like --render-subchart-notes Note: helm release will be upgraded with Override Config, so no args like --reset-values or --reuse-values TODO: we should consider hooks, --no-hooks helm template --hooks
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
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.
Deprecated bool `json:"deprecated,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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Installed.
func (*Installed) DeepCopyInto ¶
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 NameConfig ¶
type NameConfig struct {
// Name is pass to helm install <chart> <name>, name arg
Name string `json:"name,omitempty"`
// NameTemplate is pass to helm install --name-template
// FIXME add logic
NameTemplate string `json:"nameTemplate,omitempty"`
}
NameConfig defines the name of helm release If Name and NameTemplate are both set, will use Name first. If both not set, will use helm install --generate-name
func (*NameConfig) DeepCopy ¶
func (in *NameConfig) DeepCopy() *NameConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameConfig.
func (*NameConfig) DeepCopyInto ¶
func (in *NameConfig) DeepCopyInto(out *NameConfig)
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
// set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
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
SetString []string `json:"set-string,omitempty"`
// SetFile is passed to helm install --set-file
// set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
// https://github.com/helm/helm/pull/3758
SetFile []string `json:"set-file,omitempty"`
// SetJSON is passed to helm install --set-json
// set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2)
// https://github.com/helm/helm/pull/10693
SetJSON []string `json:"set-json,omitempty"`
// SetLiteral is passed to helm install --set-literal
// set a literal STRING value on the command line
// https://github.com/helm/helm/pull/9182
SetLiteral []string `json:"set-literal,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 FIXME fix comment
func (*Override) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Override.
func (*Override) DeepCopyInto ¶
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 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 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.
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 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"`
RepositoryType string `json:"repositoryType,omitempty"`
// PullStategy 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"`
}
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 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 (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
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.
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"`
// 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 install 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 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) GetValuesKey ¶
func (v ValuesReference) GetValuesKey() string
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.