Documentation ¶
Index ¶
- Constants
- Variables
- func ParseChartName(name string) (repo, chart string)
- func Resource(resource string) schema.GroupResource
- type Chart
- type ChartList
- type ChartRepo
- type ChartRepoList
- type ChartRepoPhase
- type ChartRepoSpec
- type ChartRepoStatus
- type ChartSpec
- type ChartVersion
- type HelmRequest
- func (in *HelmRequest) DeepCopy() *HelmRequest
- func (in *HelmRequest) DeepCopyInto(out *HelmRequest)
- func (in *HelmRequest) DeepCopyObject() runtime.Object
- func (in *HelmRequest) Default()
- func (in *HelmRequest) GetReleaseName() string
- func (in *HelmRequest) GetReleaseNamespace() string
- func (in *HelmRequest) IsClusterSynced(name string) bool
- func (in *HelmRequest) ValidateCreate() error
- func (in *HelmRequest) ValidateDelete() error
- func (in *HelmRequest) ValidateUpdate(old runtime.Object) error
- type HelmRequestCondition
- type HelmRequestConditionType
- type HelmRequestList
- type HelmRequestPhase
- type HelmRequestSpec
- type HelmRequestStatus
- type HelmValues
- type Release
- type ReleaseList
- type ReleaseSpec
- type ReleaseStatus
- type ValuesFromSource
Constants ¶
const (
// FinalizerName is the finalizer name we append to each HelmRequest resource
FinalizerName = "captain.cpaas.io"
)
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{
Group: "app.alauda.io",
Version: "v1alpha1",
}
Define your schema name and the version
Functions ¶
func ParseChartName ¶
ParseChartName is a simple function that parse chart name
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Chart ¶
type Chart struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ChartSpec `json:"spec"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Chart) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chart.
func (*Chart) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Chart) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChartList ¶
type ChartList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []Chart `json:"items"` }
func (*ChartList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartList.
func (*ChartList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChartList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChartRepo ¶
type ChartRepo struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ChartRepoSpec `json:"spec"` Status ChartRepoStatus `json:"status"` }
func (*ChartRepo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRepo.
func (*ChartRepo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChartRepo) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ChartRepo) ValidateCreate ¶
func (*ChartRepo) ValidateDelete ¶
type ChartRepoList ¶
type ChartRepoList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []ChartRepo `json:"items"` }
func (*ChartRepoList) DeepCopy ¶
func (in *ChartRepoList) DeepCopy() *ChartRepoList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRepoList.
func (*ChartRepoList) DeepCopyInto ¶
func (in *ChartRepoList) DeepCopyInto(out *ChartRepoList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChartRepoList) DeepCopyObject ¶
func (in *ChartRepoList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChartRepoPhase ¶
type ChartRepoPhase string
const ( // ChartRepoSynced means is successfully recognized by captain ChartRepoSynced ChartRepoPhase = "Synced" // ChartRepoFailed means captain is unable to retrieve index info from this repo ChartRepoFailed ChartRepoPhase = "Failed" // ChartRepoPending means this chartrepo is syncing or pending ChartRepoPending ChartRepoPhase = "Pending" )
type ChartRepoSpec ¶
type ChartRepoSpec struct { // URL is the repo's url URL string `json:"url"` // Secret contains information about how to auth to this repo Secret *v1.SecretReference `json:"secret,omitempty"` }
func (*ChartRepoSpec) DeepCopy ¶
func (in *ChartRepoSpec) DeepCopy() *ChartRepoSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRepoSpec.
func (*ChartRepoSpec) DeepCopyInto ¶
func (in *ChartRepoSpec) DeepCopyInto(out *ChartRepoSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartRepoStatus ¶
type ChartRepoStatus struct { // Phase ... // After create, this phase will be updated to indicate it's sync status // If receive update event, and some field in spec changed, sync agagin. Phase ChartRepoPhase `json:"phase,omitempty"` // Reason is the failed reason Reason string `json:"reason,omitempty"` }
func (*ChartRepoStatus) DeepCopy ¶
func (in *ChartRepoStatus) DeepCopy() *ChartRepoStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRepoStatus.
func (*ChartRepoStatus) DeepCopyInto ¶
func (in *ChartRepoStatus) DeepCopyInto(out *ChartRepoStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartSpec ¶
type ChartSpec struct {
Versions []*ChartVersion `json:"versions,omitempty"`
}
func (*ChartSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSpec.
func (*ChartSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartVersion ¶
type ChartVersion struct {
repo.ChartVersion
}
func (*ChartVersion) DeepCopy ¶
func (in *ChartVersion) DeepCopy() *ChartVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartVersion.
func (*ChartVersion) DeepCopyInto ¶
func (in *ChartVersion) DeepCopyInto(out *ChartVersion)
type HelmRequest ¶
type HelmRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HelmRequestSpec `json:"spec"` Status HelmRequestStatus `json:"status"` }
func (*HelmRequest) DeepCopy ¶
func (in *HelmRequest) DeepCopy() *HelmRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRequest.
func (*HelmRequest) DeepCopyInto ¶
func (in *HelmRequest) DeepCopyInto(out *HelmRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HelmRequest) DeepCopyObject ¶
func (in *HelmRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HelmRequest) Default ¶
func (in *HelmRequest) Default()
Default makes HelmRequest an mutating webhook When delete, if error occurs, finalizer is a good options for us to retry and record the events.
func (*HelmRequest) GetReleaseName ¶
func (in *HelmRequest) GetReleaseName() string
GetReleaseName get release name. If it's empty in spec, use hr's name
func (*HelmRequest) GetReleaseNamespace ¶
func (in *HelmRequest) GetReleaseNamespace() string
GetReleaseName get release namespace. If it's not set, use hr's namespace
func (*HelmRequest) IsClusterSynced ¶
func (in *HelmRequest) IsClusterSynced(name string) bool
IsClusterSynced check if this HelmRequest has been synced to cluster
func (*HelmRequest) ValidateCreate ¶
func (in *HelmRequest) ValidateCreate() error
ValidateCreate implements webhook.Validator 1. check filed regex
func (*HelmRequest) ValidateDelete ¶
func (in *HelmRequest) ValidateDelete() error
func (*HelmRequest) ValidateUpdate ¶
func (in *HelmRequest) ValidateUpdate(old runtime.Object) error
ValidateUpdate validate HelmRequest update request immutable fields: 1. clusterName 2. installToAllCluster 3. releaseName 4. chart 5. namespace
type HelmRequestCondition ¶
type HelmRequestCondition struct { // Type is the type of the condition. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Type HelmRequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HelmRequestConditionType"` // Status is the status of the condition. // Can be True, False, Unknown. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // Last time we probed the condition. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` }
func (*HelmRequestCondition) DeepCopy ¶
func (in *HelmRequestCondition) DeepCopy() *HelmRequestCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRequestCondition.
func (*HelmRequestCondition) DeepCopyInto ¶
func (in *HelmRequestCondition) DeepCopyInto(out *HelmRequestCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmRequestConditionType ¶
type HelmRequestConditionType string
HelmRequestConditionType is a valid value for HelmRequestCondition.Type
const ( // ConditionReady indicates than this hr is synced. ConditionReady HelmRequestConditionType = "Ready" // ConditionValidated means target chart has been downloaded, and permission check passed ConditionValidated HelmRequestConditionType = "Validated" // ConditionInitialized means this helmrequest has been initialized (chart processed) ConditionInitialized HelmRequestConditionType = "Initialized" )
These are valid conditions of HelmRequestConditionType.
type HelmRequestList ¶
type HelmRequestList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []HelmRequest `json:"items"` }
func (*HelmRequestList) DeepCopy ¶
func (in *HelmRequestList) DeepCopy() *HelmRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRequestList.
func (*HelmRequestList) DeepCopyInto ¶
func (in *HelmRequestList) DeepCopyInto(out *HelmRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HelmRequestList) DeepCopyObject ¶
func (in *HelmRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HelmRequestPhase ¶
type HelmRequestPhase string
HelmRequestPhase is a label for the condition of a HelmRequest at the current time.
const ( HelmRequestSynced HelmRequestPhase = "Synced" // HelmRequestPartialSynced means the HelmRequest is partial synced to target clusters HelmRequestPartialSynced HelmRequestPhase = "PartialSynced" HelmRequestFailed HelmRequestPhase = "Failed" // HelmRequestPending is when helm request is syncing... HelmRequestPending HelmRequestPhase = "Pending" HelmRequestUnknown HelmRequestPhase = "Unknown" )
These are the valid statuses of pods.
type HelmRequestSpec ¶
type HelmRequestSpec struct { // ClusterName is the cluster where the chart will be installed. If InstallToAllClusters=true, // this field will be ignored ClusterName string `json:"clusterName,omitempty"` // InstallToAllClusters will install this chart to all available clusters, even the cluster was // created after this chart. If this field is true, ClusterName will be ignored(useless) InstallToAllClusters bool `json:"installToAllClusters,omitempty"` // Dependencies is the dependencies of this HelmRequest, it's a list of there names // THe dependencies must lives in the same namespace, and each of them must be in Synced status // before we sync this HelmRequest Dependencies []string `json:"dependencies,omitempty"` // ReleaseName is the Release name to be generated, default to HelmRequest.Name. If we want to manually // install this chart to multi clusters, we may have different HelmRequest name(with cluster prefix or suffix) // and same release name ReleaseName string `json:"releaseName,omitempty"` Chart string `json:"chart,omitempty"` Version string `json:"version,omitempty"` // Namespace is the namespace where the Release object will be lived in. Notes this should be used with // the values defined in the chart, otherwise the install will failed Namespace string `json:"namespace,omitempty"` // ValuesFrom represents values from ConfigMap/Secret... ValuesFrom []ValuesFromSource `json:"valuesFrom,omitempty"` // values is a map HelmValues `json:",inline"` }
func (*HelmRequestSpec) DeepCopy ¶
func (in *HelmRequestSpec) DeepCopy() *HelmRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRequestSpec.
func (*HelmRequestSpec) DeepCopyInto ¶
func (in *HelmRequestSpec) DeepCopyInto(out *HelmRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmRequestStatus ¶
type HelmRequestStatus struct { Phase HelmRequestPhase `json:"phase,omitempty"` // LastSpecHash store the has value of the synced spec, if this value not equal to the current one, // means we need to do a update for the chart LastSpecHash string `json:"lastSpecHash,omitempty"` // SyncedClusters will store the synced clusters if InstallToAllClusters is true SyncedClusters []string `json:"syncedClusters,omitempty"` // Notes is the contents from helm (after helm install successfully it will be printed to the console Notes string `json:"notes,omitempty"` Conditions []HelmRequestCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // Verions is the real version that installed Version string `json:"version,omitempty"` // Reason will store the reason why the HelmRequest deploy failed Reason string `json:"reason,omitempty"` }
func (*HelmRequestStatus) DeepCopy ¶
func (in *HelmRequestStatus) DeepCopy() *HelmRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRequestStatus.
func (*HelmRequestStatus) DeepCopyInto ¶
func (in *HelmRequestStatus) DeepCopyInto(out *HelmRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmValues ¶
HelmValues embeds helm values so we can add deepcopy on it
func (*HelmValues) DeepCopy ¶
func (in *HelmValues) DeepCopy() *HelmValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmValues.
func (*HelmValues) DeepCopyInto ¶
func (in *HelmValues) DeepCopyInto(out *HelmValues)
type Release ¶
type Release struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ReleaseSpec `json:"spec"` Status ReleaseStatus `json:"status"` }
func (*Release) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Release.
func (*Release) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Release) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReleaseList ¶
type ReleaseList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []Release `json:"items"` }
func (*ReleaseList) DeepCopy ¶
func (in *ReleaseList) DeepCopy() *ReleaseList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseList.
func (*ReleaseList) DeepCopyInto ¶
func (in *ReleaseList) DeepCopyInto(out *ReleaseList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReleaseList) DeepCopyObject ¶
func (in *ReleaseList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReleaseSpec ¶
type ReleaseSpec struct { // ChartData is the chart that was released. ChartData string `json:"chartData,omitempty"` // ConfigData is the set of extra Values added to the chart. // These values override the default values inside of the chart. ConfigData string `json:"configData,omitempty"` // ManifestData is the string representation of the rendered template. ManifestData string `json:"manifestData,omitempty"` // Hooks are all of the hooks declared for this release. HooksData string `json:"hooksData,omitempty"` // Version is an int which represents the version of the release. Version int `json:"version,omitempty"` Name string `json:"name,omitempty"` }
ReleaseSpec describes a deployment of a chart, together with the chart and the variables used to deploy that chart.
func (*ReleaseSpec) DeepCopy ¶
func (in *ReleaseSpec) DeepCopy() *ReleaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseSpec.
func (*ReleaseSpec) DeepCopyInto ¶
func (in *ReleaseSpec) DeepCopyInto(out *ReleaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleaseStatus ¶
type ReleaseStatus struct { // FirstDeployed is when the release was first deployed. FirstDeployed metav1.Time `json:"first_deployed,omitempty"` // LastDeployed is when the release was last deployed. LastDeployed metav1.Time `json:"last_deployed,omitempty"` // Deleted tracks when this object was deleted. Deleted metav1.Time `json:"deleted,omitempty"` // Description is human-friendly "log entry" about this release. Description string `json:"Description,omitempty"` // Status is the current state of the release Status release.Status `json:"status,omitempty"` // Contains the rendered templates/NOTES.txt if available Notes string `json:"notes,omitempty"` }
func (*ReleaseStatus) CopyFromReleaseInfo ¶
func (in *ReleaseStatus) CopyFromReleaseInfo(info *release.Info)
func (*ReleaseStatus) DeepCopy ¶
func (in *ReleaseStatus) DeepCopy() *ReleaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseStatus.
func (*ReleaseStatus) DeepCopyInto ¶
func (in *ReleaseStatus) DeepCopyInto(out *ReleaseStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReleaseStatus) ToReleaseInfo ¶
func (in *ReleaseStatus) ToReleaseInfo() *release.Info
type ValuesFromSource ¶
type ValuesFromSource struct { // ConfigMapKeyRef selects a key of a ConfigMap ConfigMapKeyRef *v1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` // SecretKeyRef selects a key of a Secret SecretKeyRef *v1.SecretKeySelector `json:"secretKeyRef,omitempty"` }
ValuesFromSource represents a source of values, only one of it's fields may be set
func (*ValuesFromSource) DeepCopy ¶
func (in *ValuesFromSource) DeepCopy() *ValuesFromSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesFromSource.
func (*ValuesFromSource) DeepCopyInto ¶
func (in *ValuesFromSource) DeepCopyInto(out *ValuesFromSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.