Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the Orkestra v1alpha1 API group. +kubebuilder:object:generate=true +groupName=orkestra.azure.microsoft.com
Package v1alpha1 contains API Schema definitions for the orkestra v1alpha1 API group +kubebuilder:object:generate=true +groupName=orkestra.azure.microsoft.com
Index ¶
- Constants
- Variables
- func GetInterval(appGroup *ApplicationGroup) time.Duration
- func GetJSON(values map[string]interface{}) (*apiextensionsv1.JSON, error)
- type Application
- type ApplicationGroup
- func (in *ApplicationGroup) ChartPullFailed(message string)
- func (in *ApplicationGroup) DeepCopy() *ApplicationGroup
- func (in *ApplicationGroup) DeepCopyInto(out *ApplicationGroup)
- func (in *ApplicationGroup) DeepCopyObject() runtime.Object
- func (in *ApplicationGroup) GetLastSuccessful() *ApplicationGroupSpec
- func (in *ApplicationGroup) GetReadyCondition() string
- func (in *ApplicationGroup) GetStatusConditions() *[]metav1.Condition
- func (in *ApplicationGroup) GetWorkflowCondition(wfType WorkflowType) string
- func (in *ApplicationGroup) ReadyProgressing()
- func (in *ApplicationGroup) ReadySucceeded()
- func (in *ApplicationGroup) ReadyTerminating()
- func (in *ApplicationGroup) SetLastSuccessful()
- func (in *ApplicationGroup) WorkflowFailed(message string)
- func (in *ApplicationGroup) WorkflowTemplateGenerationFailed(message string)
- type ApplicationGroupList
- type ApplicationGroupSpec
- type ApplicationGroupStatus
- type ApplicationSpec
- type ApplicationStatus
- type ChartRef
- type ChartStatus
- type DAG
- type Executor
- type ExecutorType
- type Release
- type WorkflowType
Constants ¶
const ( DefaultProgressingRequeue = 5 * time.Second DefaultSucceededRequeue = 5 * time.Minute AppGroupNameKey = "appgroup" AppGroupFinalizer = "orkestra.azure.microsoft.com/finalizer" LastSuccessfulAnnotation = "orkestra.azure.microsoft.com/last-successful-appgroup" ParentChartAnnotation = "orkestra.azure.microsoft.com/parent-chart" HeritageLabel = "orkestra.azure.microsoft.com/heritage" HeritageValue = "orkestra" OwnershipLabel = "orkestra.azure.microsoft.com/owner" WorkflowTypeLabel = "orkestra.azure.microsoft.com/workflow-type" WorkflowAppGroupGenerationLabel = "orkestra.azure.microsoft.com/appgroup-generation" ChartLabel = "orkestra.azure.microsoft.com/chart" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "orkestra.azure.microsoft.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var WorkflowConditionMap = map[WorkflowType]string{ Forward: meta.ForwardWorkflowSucceededCondition, Reverse: meta.ReverseWorkflowSucceededCondition, Rollback: meta.RollbackWorkflowSucceededCondition, }
Functions ¶
func GetInterval ¶ added in v0.4.1
func GetInterval(appGroup *ApplicationGroup) time.Duration
GetInterval returns the interval if specified in the application group Otherwise, it returns the default requeue time for the appGroup
Types ¶
type Application ¶
type Application struct {
// DAG contains the dependency information
DAG `json:",inline"`
// Spec contains the application spec including the chart info and overlay values
Spec ApplicationSpec `json:"spec,omitempty"`
}
Application spec and dependency on other applications
func (*Application) DeepCopy ¶
func (in *Application) DeepCopy() *Application
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Application.
func (*Application) DeepCopyInto ¶
func (in *Application) DeepCopyInto(out *Application)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Application) GetValues ¶ added in v0.5.0
func (in *Application) GetValues() map[string]interface{}
GetValues unmarshals the raw values to a map[string]interface{} and returns the result.
type ApplicationGroup ¶
type ApplicationGroup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationGroupSpec `json:"spec,omitempty"`
Status ApplicationGroupStatus `json:"status,omitempty"`
}
ApplicationGroup is the Schema for the applicationgroups API
func (*ApplicationGroup) ChartPullFailed ¶ added in v0.7.0
func (in *ApplicationGroup) ChartPullFailed(message string)
ChartPullFailed sets the meta.ReadyCondition to 'False' and meta.ChartPullFailedReason reason and message
func (*ApplicationGroup) DeepCopy ¶
func (in *ApplicationGroup) DeepCopy() *ApplicationGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationGroup.
func (*ApplicationGroup) DeepCopyInto ¶
func (in *ApplicationGroup) DeepCopyInto(out *ApplicationGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationGroup) DeepCopyObject ¶
func (in *ApplicationGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ApplicationGroup) GetLastSuccessful ¶ added in v0.6.0
func (in *ApplicationGroup) GetLastSuccessful() *ApplicationGroupSpec
func (*ApplicationGroup) GetReadyCondition ¶ added in v0.4.1
func (in *ApplicationGroup) GetReadyCondition() string
GetReadyCondition gets the string condition.Reason of the meta.ReadyCondition type
func (*ApplicationGroup) GetStatusConditions ¶ added in v0.4.1
func (in *ApplicationGroup) GetStatusConditions() *[]metav1.Condition
GetStatusConditions gets the status conditions from the ApplicationGroup status
func (*ApplicationGroup) GetWorkflowCondition ¶ added in v0.7.0
func (in *ApplicationGroup) GetWorkflowCondition(wfType WorkflowType) string
GetWorkflowCondition gets the string condition.Reason of the given workflow type
func (*ApplicationGroup) ReadyProgressing ¶ added in v0.8.0
func (in *ApplicationGroup) ReadyProgressing()
ReadyProgressing sets the meta.ReadyCondition to 'Unknown', with the given meta.Progressing reason and message
func (*ApplicationGroup) ReadySucceeded ¶ added in v0.4.1
func (in *ApplicationGroup) ReadySucceeded()
ReadySucceeded sets the meta.ReadyCondition to 'True', with the given meta.Succeeded reason and message
func (*ApplicationGroup) ReadyTerminating ¶ added in v0.8.0
func (in *ApplicationGroup) ReadyTerminating()
ReadyTerminating sets the meta.ReadyCondition to 'Unknown', with the given meta.Progressing reason and message
func (*ApplicationGroup) SetLastSuccessful ¶ added in v0.6.0
func (in *ApplicationGroup) SetLastSuccessful()
func (*ApplicationGroup) WorkflowFailed ¶ added in v0.7.0
func (in *ApplicationGroup) WorkflowFailed(message string)
WorkflowFailed sets the meta.ReadyCondition to 'False' and meta.ReadyWorkflowFailed reason and message
func (*ApplicationGroup) WorkflowTemplateGenerationFailed ¶ added in v0.7.0
func (in *ApplicationGroup) WorkflowTemplateGenerationFailed(message string)
WorkflowTemplateGenerationFailed sets the meta.ReadyCondition to 'False' and meta.TemplateGenerationFailed reason and message
type ApplicationGroupList ¶
type ApplicationGroupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationGroup `json:"items"`
}
ApplicationGroupList contains a list of ApplicationGroup
func (*ApplicationGroupList) DeepCopy ¶
func (in *ApplicationGroupList) DeepCopy() *ApplicationGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationGroupList.
func (*ApplicationGroupList) DeepCopyInto ¶
func (in *ApplicationGroupList) DeepCopyInto(out *ApplicationGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplicationGroupList) DeepCopyObject ¶
func (in *ApplicationGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ApplicationGroupSpec ¶
type ApplicationGroupSpec struct {
// Applications that make up the application group
// +kubebuilder:validation:MinItems:=1
// +required
Applications []Application `json:"applications,omitempty"`
// Interval specifies the between reconciliations of the ApplicationGroup
// Defaults to 5s for short requeue and 30s for long requeue
// +optional
Interval *metav1.Duration `json:"interval,omitempty"`
}
ApplicationGroupSpec defines the desired state of ApplicationGroup
func (*ApplicationGroupSpec) DeepCopy ¶
func (in *ApplicationGroupSpec) DeepCopy() *ApplicationGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationGroupSpec.
func (*ApplicationGroupSpec) DeepCopyInto ¶
func (in *ApplicationGroupSpec) DeepCopyInto(out *ApplicationGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationGroupStatus ¶
type ApplicationGroupStatus struct {
// Applications status
// +optional
Applications []ApplicationStatus `json:"applications,omitempty"`
// ObservedGeneration captures the last generation
// that was captured and completed by the reconciler
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// LastSucceededGeneration captures the last generation
// that has successfully completed a full workflow rollout of the application group
// +optional
LastSucceededGeneration int64 `json:"lastSucceededGeneration,omitempty"`
// Conditions holds the conditions of the ApplicationGroup
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ApplicationGroupStatus defines the observed state of ApplicationGroup
func (*ApplicationGroupStatus) DeepCopy ¶
func (in *ApplicationGroupStatus) DeepCopy() *ApplicationGroupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationGroupStatus.
func (*ApplicationGroupStatus) DeepCopyInto ¶
func (in *ApplicationGroupStatus) DeepCopyInto(out *ApplicationGroupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationSpec ¶
type ApplicationSpec struct {
// Chart holds the values needed to pull the chart
// +required
Chart *ChartRef `json:"chart"`
// Release holds the values to apply to the helm release
// +required
Release *Release `json:"release"`
// Subcharts provides the dependency order among the subcharts of the application
// +optional
Subcharts []DAG `json:"subcharts,omitempty"`
// Workflow provides an option to specify one or more workflow executors to run
// as a DAG
// +optional
Workflow []Executor `json:"workflow,omitempty"`
}
ApplicationSpec defines the desired state of Application
func (*ApplicationSpec) DeepCopy ¶
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationStatus ¶
type ApplicationStatus struct {
// Name of the application
// +optional
Name string `json:"name"`
// ChartStatus for the application helm chart
// +optional
ChartStatus `json:",inline"`
// Subcharts contains the subchart chart status
// +optional
Subcharts map[string]ChartStatus `json:"subcharts,omitempty"`
}
ApplicationStatus shows the current status of the application helm release
func (*ApplicationStatus) DeepCopy ¶
func (in *ApplicationStatus) DeepCopy() *ApplicationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationStatus.
func (*ApplicationStatus) DeepCopyInto ¶
func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartRef ¶ added in v0.4.0
type ChartRef struct {
// The Helm repository URL, a valid URL contains at least a protocol and host.
// +required
URL string `json:"url"`
// The name or path the Helm chart is available at in the SourceRef.
// +required
Name string `json:"name"` //nolint: golint
// Version semver expression, ignored for charts from v1beta1.GitRepository and
// v1beta1.Bucket sources. Defaults to latest when omitted.
// +kubebuilder:default:=*
// +optional
Version string `json:"version,omitempty"`
// AuthSecretRef is a reference to the auth secret
// to access a private helm repository
// +optional
AuthSecretRef *corev1.ObjectReference `json:"authSecretRef,omitempty"`
}
func (*ChartRef) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRef.
func (*ChartRef) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartStatus ¶
type ChartStatus struct {
// Error string from the error during reconciliation (if any)
// +optional
Error string `json:"error,omitempty"`
// Version of the chart/subchart
// +optional
Version string `json:"version,omitempty"`
// Staged if true denotes that the chart/subchart has been pushed to the
// staging helm repo
// +optional
Staged bool `json:"staged,omitempty"`
// +optional
// Conditions holds the conditions for the ChartStatus
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ChartStatus shows the current status of the Application Reconciliation process
func (*ChartStatus) DeepCopy ¶
func (in *ChartStatus) DeepCopy() *ChartStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartStatus.
func (*ChartStatus) DeepCopyInto ¶
func (in *ChartStatus) DeepCopyInto(out *ChartStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChartStatus) GetStatusConditions ¶ added in v0.5.0
func (in *ChartStatus) GetStatusConditions() *[]metav1.Condition
GetStatusConditions gets the status conditions from the ChartStatus status
type DAG ¶
type DAG struct {
// Name of the application
// +required
Name string `json:"name"`
// Dependencies on other applications by name
// +optional
Dependencies []string `json:"dependencies,omitempty"`
}
DAG contains the dependency information
func (*DAG) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DAG.
func (*DAG) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Executor ¶ added in v0.8.0
type Executor struct {
// DAG contains the dependency information
// +required
DAG `json:",inline"`
// Type specifies the executor type to be run
// +kubebuilder:validation:Enum=helmrelease;keptn;custom
// +required
Type ExecutorType `json:"type,omitempty"`
// Image allows the end user to specify the docker image name and tag
// to be executed by the workflow node
// +optional
Image *corev1.Container `json:"image,omitempty"`
// Params hold executor specific properties
// +optional
Params *apiextensionsv1.JSON `json:"params,omitempty"`
}
func (*Executor) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Executor.
func (*Executor) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutorType ¶ added in v0.8.0
type ExecutorType string
ExecutorType can either refer to a native executor (helmrelease and/or keptn) or be a custom executor defined by the end-user
const ( // HelmReleaseExecutor type is a "deployment" executor native to Orkestra that is responsible for // deploying the application through the `HelmRelease` custom resource for the fluxcd helm-controller HelmReleaseExecutor ExecutorType = "helmrelease" // KeptnExecutor type is a "evaluation" executor native to Orkestra that is respnsible for running // evaluations tests and quality gates based rollouts and promotions. // Important : A testing executor may not be used as a standalone executor and must always // be executed after a deployment executor (i.e. must depend on a deployment executor) . KeptnExecutor ExecutorType = "keptn" // CustomExecutor lets the user specify their own executor template to be used either as a deployment // executor, a testing executor or for any other action to be taken on behalf of the application node. CustomExecutor ExecutorType = "custom" )
type Release ¶ added in v0.4.0
type Release struct {
// Interval at which to reconcile the Helm release.
// +kubebuilder:default:="5m"
// +optional
Interval metav1.Duration `json:"interval,omitempty"`
// TargetNamespace to target when performing operations for the HelmRelease.
// Defaults to the namespace of the HelmRelease.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Optional
// +optional
TargetNamespace string `json:"targetNamespace,omitempty"`
// Timeout is the time to wait for any individual Kubernetes operation (like Jobs
// for hooks) during the performance of a Helm action. Defaults to '5m0s'.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Values holds the values for this Helm release.
// +optional
Values *apiextensionsv1.JSON `json:"values,omitempty"`
// Install holds the configuration for Helm install actions for this HelmRelease.
// +optional
Install *fluxhelmv2beta1.Install `json:"install,omitempty"`
// Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.
// +optional
Upgrade *fluxhelmv2beta1.Upgrade `json:"upgrade,omitempty"`
// Rollback holds the configuration for Helm rollback actions for this HelmRelease.
// +optional
Rollback *fluxhelmv2beta1.Rollback `json:"rollback,omitempty"`
// Rollback holds the configuration for Helm uninstall actions for this HelmRelease.
// +optional
Uninstall *fluxhelmv2beta1.Uninstall `json:"uninstall,omitempty"`
}
func (*Release) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Release.
func (*Release) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowType ¶ added in v0.7.0
type WorkflowType string
const ( Forward WorkflowType = "forward" Reverse WorkflowType = "reverse" Rollback WorkflowType = "rollback" )