v1alpha1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.kurator.dev +k8s:deepcopy-gen=package

Index

Constants

View Source
const GroupName = "apps.kurator.dev"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Application

type Application struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ApplicationSpec   `json:"spec,omitempty"`
	Status            ApplicationStatus `json:"status,omitempty"`
}

Application is the schema for the application's API.

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) DeepCopyObject

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

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

type ApplicationDestination

type ApplicationDestination struct {
	// Fleet defines the fleet to dispatch the artifact.
	// +required
	Fleet string `json:"fleet"`
	// ClusterSelector specifies the selectors to select the clusters within the fleet.
	// If unspecified, all clusters in the fleet will be selected.
	// +optional
	ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
}

ApplicationDestination defines the configuration to dispatch an artifact to a fleet or specific clusters.

func (*ApplicationDestination) DeepCopy

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

func (*ApplicationDestination) DeepCopyInto

func (in *ApplicationDestination) DeepCopyInto(out *ApplicationDestination)

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

type ApplicationList

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

ApplicationList contains a list of Application. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ApplicationList) DeepCopy

func (in *ApplicationList) DeepCopy() *ApplicationList

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

func (*ApplicationList) DeepCopyInto

func (in *ApplicationList) DeepCopyInto(out *ApplicationList)

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

func (*ApplicationList) DeepCopyObject

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

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

type ApplicationSource

type ApplicationSource struct {
	// +optional
	GitRepository *sourcev1beta2.GitRepositorySpec `json:"gitRepository,omitempty"`
	// +optional
	HelmRepository *sourcev1beta2.HelmRepositorySpec `json:"helmRepository,omitempty"`
	// +optional
	OCIRepository *sourcev1beta2.OCIRepositorySpec `json:"ociRepository,omitempty"`
}

ApplicationSource defines the configuration to produce an artifact for git, helm or oci repository. Note only one source can be specified.

func (*ApplicationSource) DeepCopy

func (in *ApplicationSource) DeepCopy() *ApplicationSource

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

func (*ApplicationSource) DeepCopyInto

func (in *ApplicationSource) DeepCopyInto(out *ApplicationSource)

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

type ApplicationSourceStatus

type ApplicationSourceStatus struct {
	GitRepoStatus  *sourcev1beta2.GitRepositoryStatus  `json:"gitRepoStatus,omitempty"`
	HelmRepoStatus *sourcev1beta2.HelmRepositoryStatus `json:"helmRepoStatus,omitempty"`
	OCIRepoStatus  *sourcev1beta2.OCIRepositoryStatus  `json:"ociRepoStatus,omitempty"`
}

applicationSourceStatus defines the observed state of the artifact source.

func (*ApplicationSourceStatus) DeepCopy

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

func (*ApplicationSourceStatus) DeepCopyInto

func (in *ApplicationSourceStatus) DeepCopyInto(out *ApplicationSourceStatus)

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

type ApplicationSpec

type ApplicationSpec struct {
	// Source defines the artifact source.
	Source ApplicationSource `json:"source"`
	// SyncPolicies controls how the artifact will be customized and where it will be synced.
	SyncPolicies []*ApplicationSyncPolicy `json:"syncPolicies"`
	// Destination defines the destination clusters where the artifacts will be synced.
	// It can be overriden by the syncPolicies' destination.
	// +optional
	Destination *ApplicationDestination `json:"destination,omitempty"`
}

ApplicationSpec defines the configuration to produce an artifact and how to dispatch it.

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 {
	SourceStatus *ApplicationSourceStatus `json:"sourceStatus,omitempty"`
	SyncStatus   []*ApplicationSyncStatus `json:"syncStatus,omitempty"`
}

ApplicationStatus defines the observed state of Application.

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 ApplicationSyncPolicy

type ApplicationSyncPolicy struct {
	// Name defines the name of the sync policy.
	// If unspecified, a name of format `<application name>-<index>` will be generated.
	// +optional
	Name string `json:"name,omitempty"`

	// Kustomization defines the configuration to calculate the desired state
	// from a source using kustomize.
	// +optional
	Kustomization *Kustomization `json:"kustomization,omitempty"`
	// HelmRelease defines the desired state of a Helm release.
	// +optional
	Helm *HelmRelease `json:"helm,omitempty"`

	// Destination defines the destination for the artifact.
	// If specified, it will override the destination specified at Application level.
	// +optional
	Destination *ApplicationDestination `json:"destination"`

	// Rollout defines the rollout configurations to be used.
	// If specified, a uniform rollout policy is configured for this installed object.
	// +optional
	Rollout *RolloutConfig `json:"rollout,omitempty"`
}

ApplicationSyncPolicy defines the configuration to sync an artifact. Only oneof `kustomization` or `helm` can be specified to manage application sync.

func (*ApplicationSyncPolicy) DeepCopy

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

func (*ApplicationSyncPolicy) DeepCopyInto

func (in *ApplicationSyncPolicy) DeepCopyInto(out *ApplicationSyncPolicy)

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

type ApplicationSyncStatus

type ApplicationSyncStatus struct {
	Name                string                                `json:"name,omitempty"`
	KustomizationStatus *kustomizev1beta2.KustomizationStatus `json:"kustomizationStatus,omitempty"`
	HelmReleaseStatus   *helmv2beta1.HelmReleaseStatus        `json:"HelmReleaseStatus,omitempty"`
	RolloutStatus       *RolloutStatus                        `json:"rolloutStatus,omitempty"`
}

ApplicationSyncStatus defines the observed state of Application sync.

func (*ApplicationSyncStatus) DeepCopy

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

func (*ApplicationSyncStatus) DeepCopyInto

func (in *ApplicationSyncStatus) DeepCopyInto(out *ApplicationSyncStatus)

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

type CanaryConfig added in v0.6.0

type CanaryConfig struct {
	// Max traffic weight routed to preview service.
	// If empty and no stepweights are set, 100 will be used by default.
	// +optional
	MaxWeight int `json:"maxWeight,omitempty"`

	// StepWeight defines the incremental traffic weight step for analysis phase
	// If set stepWeight: 10 and set maxWeight: 50
	// The flow ratio between PREVIEW and PRIMARY at each step is
	// (10:90) (20:80) (30:70) (40:60) (50:50)
	// +optional
	StepWeight int `json:"stepWeight,omitempty"`

	// StepWeights defines the incremental traffic weight steps for analysis phase
	// Note: Cannot configure stepWeights and stepWeight at the same time.
	// If both stepWeights and maxWeight are configured, the traffic
	// will be scaled according to the settings in stepWeights only.
	// If set stepWeights: [1, 10, 20, 80]
	// The flow ratio between PREVIEW and PRIMARY at each step is
	// (1:99) (10:90) (20:80) (80:20)
	// +optional
	StepWeights []int `json:"stepWeights,omitempty"`

	// StepWeightPromotion defines the incremental traffic weight step for promotion phase
	// If maxWeight: 50 and set stepWeightPromotion: 20
	// After a successful test, traffic to the PRIMARY version changes as follows: 50 70 90 100.
	// +optional
	StepWeightPromotion int `json:"stepWeightPromotion,omitempty"`
}

func (*CanaryConfig) DeepCopy added in v0.6.0

func (in *CanaryConfig) DeepCopy() *CanaryConfig

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

func (*CanaryConfig) DeepCopyInto added in v0.6.0

func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig)

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

type CanaryThresholdRange added in v0.6.0

type CanaryThresholdRange struct {
	// Minimum value
	// +optional
	Min *float64 `json:"min,omitempty"`

	// Maximum value
	// +optional
	Max *float64 `json:"max,omitempty"`
}

CanaryThresholdRange defines the range used for metrics validation

func (*CanaryThresholdRange) DeepCopy added in v0.6.0

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

func (*CanaryThresholdRange) DeepCopyInto added in v0.6.0

func (in *CanaryThresholdRange) DeepCopyInto(out *CanaryThresholdRange)

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

type ClusterSelector

type ClusterSelector struct {
	// MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value".
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	// +optional
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

func (*ClusterSelector) DeepCopy

func (in *ClusterSelector) DeepCopy() *ClusterSelector

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

func (*ClusterSelector) DeepCopyInto

func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector)

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

type CommonMetadata

type CommonMetadata struct {
	// Annotations to be added to the object's metadata.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels to be added to the object's metadata.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

func (*CommonMetadata) DeepCopy

func (in *CommonMetadata) DeepCopy() *CommonMetadata

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

func (*CommonMetadata) DeepCopyInto

func (in *CommonMetadata) DeepCopyInto(out *CommonMetadata)

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

type CrossNamespaceObjectReference added in v0.6.0

type CrossNamespaceObjectReference struct {
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent
	// +optional
	Kind string `json:"kind,omitempty"`

	// Name of the referent
	Name string `json:"name"`

	// Namespace of the referent
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level

func (*CrossNamespaceObjectReference) DeepCopy added in v0.6.0

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

func (*CrossNamespaceObjectReference) DeepCopyInto added in v0.6.0

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

type CustomMetadata added in v0.6.0

type CustomMetadata struct {
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

CustomMetadata holds labels and annotations to set on generated objects.

func (*CustomMetadata) DeepCopy added in v0.6.0

func (in *CustomMetadata) DeepCopy() *CustomMetadata

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

func (*CustomMetadata) DeepCopyInto added in v0.6.0

func (in *CustomMetadata) DeepCopyInto(out *CustomMetadata)

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

type HelmChartTemplate

type HelmChartTemplate struct {
	// ObjectMeta holds the template for metadata like labels and annotations.
	// +optional
	ObjectMeta *HelmChartTemplateObjectMeta `json:"metadata,omitempty"`

	// Spec holds the template for the v1beta2.HelmChartSpec for this HelmRelease.
	// +required
	Spec HelmChartTemplateSpec `json:"spec"`
}

HelmChartTemplate defines the template from which the controller will generate a v1beta2.HelmChart object in the same namespace as the referenced v1beta2.Source.

func (*HelmChartTemplate) DeepCopy

func (in *HelmChartTemplate) DeepCopy() *HelmChartTemplate

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

func (*HelmChartTemplate) DeepCopyInto

func (in *HelmChartTemplate) DeepCopyInto(out *HelmChartTemplate)

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

type HelmChartTemplateObjectMeta

type HelmChartTemplateObjectMeta struct {
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

HelmChartTemplateObjectMeta defines the template for the ObjectMeta of a v1beta2.HelmChart.

func (*HelmChartTemplateObjectMeta) DeepCopy

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

func (*HelmChartTemplateObjectMeta) DeepCopyInto

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

type HelmChartTemplateSpec

type HelmChartTemplateSpec struct {
	// The name or path the Helm chart is available at in the SourceRef.
	// +required
	Chart string `json:"chart"`

	// Version semver expression, ignored for charts from v1beta2.GitRepository and
	// v1beta2.Bucket sources. Defaults to latest when omitted.
	// +kubebuilder:default:=*
	// +optional
	Version string `json:"version,omitempty"`

	// Interval at which to check the v1beta2.Source for updates. Defaults to
	// 'HelmReleaseSpec.Interval'.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +optional
	Interval *metav1.Duration `json:"interval,omitempty"`

	// Determines what enables the creation of a new artifact. Valid values are
	// ('ChartVersion', 'Revision').
	// See the documentation of the values for an explanation on their behavior.
	// Defaults to ChartVersion when omitted.
	// +kubebuilder:validation:Enum=ChartVersion;Revision
	// +kubebuilder:default:=ChartVersion
	// +optional
	ReconcileStrategy string `json:"reconcileStrategy,omitempty"`

	// Alternative list of values files to use as the chart values (values.yaml
	// is not included by default), expected to be a relative path in the SourceRef.
	// Values files are merged in the order of this list with the last file overriding
	// the first. Ignored when omitted.
	// +optional
	ValuesFiles []string `json:"valuesFiles,omitempty"`
}

HelmChartTemplateSpec defines the template from which the controller will generate a v1beta2.HelmChartSpec object.

func (*HelmChartTemplateSpec) DeepCopy

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

func (*HelmChartTemplateSpec) DeepCopyInto

func (in *HelmChartTemplateSpec) DeepCopyInto(out *HelmChartTemplateSpec)

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

type HelmRelease

type HelmRelease struct {
	// Chart defines the template of the v1beta2.HelmChart that should be created
	// for this HelmRelease.
	// +required
	Chart HelmChartTemplate `json:"chart"`

	// Interval at which to reconcile the Helm release.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +required
	Interval metav1.Duration `json:"interval"`

	// Suspend tells the controller to suspend reconciliation for this HelmRelease,
	// it does not apply to already started reconciliations. Defaults to false.
	// +optional
	Suspend bool `json:"suspend,omitempty"`

	// ReleaseName used for the Helm release. Defaults to a composition of
	// '[TargetNamespace-]Name'.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=53
	// +kubebuilder:validation:Optional
	// +optional
	ReleaseName string `json:"releaseName,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"`

	// DependsOn may contain a meta.NamespacedObjectReference slice with
	// references to HelmRelease resources that must be ready before this HelmRelease
	// can be reconciled.
	// +optional
	DependsOn []meta.NamespacedObjectReference `json:"dependsOn,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'.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// MaxHistory is the number of revisions saved by Helm for this HelmRelease.
	// Use '0' for an unlimited number of revisions; defaults to '10'.
	// +optional
	MaxHistory *int `json:"maxHistory,omitempty"`

	// The name of the Kubernetes service account to impersonate
	// when reconciling this HelmRelease.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// PersistentClient tells the controller to use a persistent Kubernetes
	// client for this release. When enabled, the client will be reused for the
	// duration of the reconciliation, instead of being created and destroyed
	// for each (step of a) Helm action.
	//
	// This can improve performance, but may cause issues with some Helm charts
	// that for example do create Custom Resource Definitions during installation
	// outside Helm's CRD lifecycle hooks, which are then not observed to be
	// available by e.g. post-install hooks.
	//
	// If not set, it defaults to true.
	//
	// +optional
	PersistentClient *bool `json:"persistentClient,omitempty"`

	// Install holds the configuration for Helm install actions for this HelmRelease.
	// +optional
	Install *helmv2b1.Install `json:"install,omitempty"`

	// Upgrade holds the configuration for Helm upgrade actions for this HelmRelease.
	// +optional
	Upgrade *helmv2b1.Upgrade `json:"upgrade,omitempty"`

	// Rollback holds the configuration for Helm rollback actions for this HelmRelease.
	// +optional
	Rollback *helmv2b1.Rollback `json:"rollback,omitempty"`

	// Uninstall holds the configuration for Helm uninstall actions for this HelmRelease.
	// +optional
	Uninstall *helmv2b1.Uninstall `json:"uninstall,omitempty"`

	// ValuesFrom holds references to resources containing Helm values for this HelmRelease,
	// and information about how they should be merged.
	ValuesFrom []helmv2b1.ValuesReference `json:"valuesFrom,omitempty"`

	// Values holds the values for this Helm release.
	// +optional
	Values *apiextensionsv1.JSON `json:"values,omitempty"`
}

Note: copied from https://github.com/fluxcd/helm-controller/blob/main/api/v2beta1/helmrelease_types.go HelmRelease defines the desired state of a Helm release.

func (*HelmRelease) DeepCopy

func (in *HelmRelease) DeepCopy() *HelmRelease

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

func (*HelmRelease) DeepCopyInto

func (in *HelmRelease) DeepCopyInto(out *HelmRelease)

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

type Kustomization

type Kustomization struct {
	// CommonMetadata specifies the common labels and annotations that are
	// applied to all resources. Any existing label or annotation will be
	// overridden if its key matches a common one.
	// +optional
	CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty"`

	// DependsOn may contain a meta.NamespacedObjectReference slice
	// with references to Kustomization resources that must be ready before this
	// Kustomization can be reconciled.
	// +optional
	DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`

	// The interval at which to reconcile the Kustomization.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +required
	Interval metav1.Duration `json:"interval"`

	// The interval at which to retry a previously failed reconciliation.
	// When not specified, the controller uses the KustomizationSpec.Interval
	// value to retry failures.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +optional
	RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`

	// Path to the directory containing the kustomization.yaml file, or the
	// set of plain YAMLs a kustomization.yaml should be generated for.
	// Defaults to 'None', which translates to the root path of the SourceRef.
	// +optional
	Path string `json:"path,omitempty"`

	// Prune enables garbage collection.
	// +required
	Prune bool `json:"prune"`

	// Strategic merge and JSON patches, defined as inline YAML objects,
	// capable of targeting objects based on kind, label and annotation selectors.
	// +optional
	Patches []kustomize.Patch `json:"patches,omitempty"`

	// Images is a list of (image name, new name, new tag or digest)
	// for changing image names, tags or digests. This can also be achieved with a
	// patch, but this operator is simpler to specify.
	// +optional
	Images []kustomize.Image `json:"images,omitempty"`

	// This flag tells the controller to suspend subsequent kustomize executions,
	// it does not apply to already started executions. Defaults to false.
	// +optional
	Suspend bool `json:"suspend,omitempty"`

	// TargetNamespace sets or overrides the namespace in the
	// kustomization.yaml file.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Optional
	// +optional
	TargetNamespace string `json:"targetNamespace,omitempty"`

	// Timeout for validation, apply and health checking operations.
	// Defaults to 'Interval' duration.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// Force instructs the controller to recreate resources
	// when patching fails due to an immutable field change.
	// +kubebuilder:default:=false
	// +optional
	Force bool `json:"force,omitempty"`

	// Components specifies relative paths to specifications of other Components.
	// +optional
	Components []string `json:"components,omitempty"`
}

Note: copied from https://github.com/fluxcd/kustomize-controller/blob/main/api/v1/kustomization_types.go Kustomization defines the configuration to calculate the desired state from a Source using Kustomize.

func (*Kustomization) DeepCopy

func (in *Kustomization) DeepCopy() *Kustomization

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

func (*Kustomization) DeepCopyInto

func (in *Kustomization) DeepCopyInto(out *Kustomization)

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

type Metric added in v0.6.0

type Metric struct {
	// Name of the metric.
	// Currently supported metric are `request-success-rate` and `request-duration`.
	Name MetricName `json:"name"`

	// IntervalSeconds defines metrics query interval.
	// Defaults to 60.
	IntervalSeconds *int `json:"intervalSeconds,omitempty"`

	// ThresholdRange defines valid value accepted for this metric.
	// If no thresholdRange are set, Kurator will default every check is successful.
	// +optional
	ThresholdRange *CanaryThresholdRange `json:"thresholdRange,omitempty"`
}

func (*Metric) DeepCopy added in v0.6.0

func (in *Metric) DeepCopy() *Metric

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

func (*Metric) DeepCopyInto added in v0.6.0

func (in *Metric) DeepCopyInto(out *Metric)

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

type MetricName added in v0.6.0

type MetricName string
const (
	// `request-success-rate` indicates the successful request ratio during this checking intervalSeconds.
	// It returns a value from 0 to 100.
	RequestSuccessRate MetricName = "request-success-rate"
	// `request-duration` indicates P99 latency of the requests during the check interval.
	// `request-duration` returns in milliseconds.
	RequestDuration MetricName = "request-duration"
)

type RolloutConfig added in v0.6.0

type RolloutConfig struct {
	// Testloader defines whether to install a private testloader for Kurator.
	// Testloader generates traffic during rollout analysis.
	// Default is false. Because Kurator will installs a public testloader with the flagger installation.
	// If set it to true, Kurator will install a private testloader dedicated to requesting the workload.
	// +optional
	TestLoader *bool `json:"testLoader,omitempty"`

	// TrafficRoutingProvider defines traffic routing provider.
	// Kurator only supports istio for now.
	// Other provider will be added later.
	// +optional
	TrafficRoutingProvider string `json:"trafficRoutingProvider,omitempty"`

	// Workload specifies what workload to deploy the test to.
	// Workload of type Deployment or DaemonSet.
	Workload *CrossNamespaceObjectReference `json:"workload"`

	// ServiceName holds the name of a service which matches the workload.
	ServiceName string `json:"serviceName"`

	// Port exposed by the service.
	Port int32 `json:"port"`

	// Primary is the labels and annotations are added to the primary service.
	// Primary service is stable service. The name of the primary service in the cluster is <service name>-primary
	// +optional
	Primary *CustomMetadata `json:"primary,omitempty"`

	// Preview is the labels and annotations are added to the preview service.
	// The name of the preview service in the cluster is <service name>-canary
	// +optional
	Preview *CustomMetadata `json:"preview,omitempty"`

	// RolloutPolicy defines the release strategy of workload.
	RolloutPolicy *RolloutPolicy `json:"rolloutPolicy"`
}

func (*RolloutConfig) DeepCopy added in v0.6.0

func (in *RolloutConfig) DeepCopy() *RolloutConfig

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

func (*RolloutConfig) DeepCopyInto added in v0.6.0

func (in *RolloutConfig) DeepCopyInto(out *RolloutConfig)

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

type RolloutPolicy added in v0.6.0

type RolloutPolicy struct {
	// TrafficRouting defines the configuration of the gateway, traffic routing rules, and so on.
	TrafficRouting *TrafficRoutingConfig `json:"trafficRouting,omitempty"`

	// TrafficAnalysis defines the validation process of a release
	TrafficAnalysis *TrafficAnalysis `json:"trafficAnalysis,omitempty"`

	// RolloutTimeoutSeconds represents the maximum time in seconds for a
	// preview deployment to make progress before it is considered to be failed.
	// Defaults to 600.
	// +optional
	RolloutTimeoutSeconds *int32 `json:"rolloutTimeoutSeconds,omitempty"`

	// SkipTrafficAnalysis promotes the preview release without analyzing it.
	// +optional
	SkipTrafficAnalysis bool `json:"skipTrafficAnalysis,omitempty"`

	// RevertOnDeletion defines whether to revert a resource to its initial state when deleting rollout resource.
	// Use of the revertOnDeletion property should be enabled
	// when you no longer plan to rely on Kurator for deployment management.
	// Kurator will install the Flagger to the specified cluster via a fleet plugin.
	// If RevertOnDeletion is set to true, the Flagger will revert a resource to its initial state
	// when the deleting Application.Spec.ApplicationSyncPolicy.Rollout or
	// the Application.
	// +optional
	RevertOnDeletion bool `json:"revertOnDeletion,omitempty"`

	// Suspend, if set to true will suspend the rollout, disabling any rollout runs
	// regardless of any changes to its target, services, etc. Note that if the
	// rollout is suspended during an analysis, its paused until the rollout is uninterrupted.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

func (*RolloutPolicy) DeepCopy added in v0.6.0

func (in *RolloutPolicy) DeepCopy() *RolloutPolicy

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

func (*RolloutPolicy) DeepCopyInto added in v0.6.0

func (in *RolloutPolicy) DeepCopyInto(out *RolloutPolicy)

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

type RolloutStatus added in v0.6.0

type RolloutStatus struct {
	// ClusterName is the Name of the cluster where the rollout is being performed.
	// +optional
	ClusterName string `json:"clusterName,omitempty"`

	// RolloutNameInCluster is the name of the rollout being performed within this cluster.
	// +optional
	RolloutNameInCluster string `json:"rolloutNameInCluster,omitempty"`

	// RolloutStatusInCluster is the current status of the Rollout performed within this cluster.
	// +optional
	RolloutStatusInCluster *flaggerv1b1.CanaryStatus `json:"rolloutStatusInCluster,omitempty"`
}

RolloutStatus defines the observed state of Rollout.

func (*RolloutStatus) DeepCopy added in v0.6.0

func (in *RolloutStatus) DeepCopy() *RolloutStatus

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

func (*RolloutStatus) DeepCopyInto added in v0.6.0

func (in *RolloutStatus) DeepCopyInto(out *RolloutStatus)

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

type SessionAffinity added in v0.6.0

type SessionAffinity struct {
	// CookieName is the key that will be used for the session affinity cookie.
	CookieName string `json:"cookieName,omitempty"`
	// MaxAge indicates the number of seconds until the session affinity cookie will expire.
	// ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
	// The default value is 86,400 seconds, i.e. a day.
	// +optional
	MaxAge int `json:"maxAge,omitempty"`
}

func (*SessionAffinity) DeepCopy added in v0.6.0

func (in *SessionAffinity) DeepCopy() *SessionAffinity

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

func (*SessionAffinity) DeepCopyInto added in v0.6.0

func (in *SessionAffinity) DeepCopyInto(out *SessionAffinity)

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

type TrafficAnalysis added in v0.6.0

type TrafficAnalysis struct {
	// CheckIntervalSeconds defines the schedule interval for this traffic analysis.
	// Interval is the time interval between each test.
	// Kurator changes the traffic distribution rules (if they need to be changed)
	// and performs a traffic analysis every so often.
	// Defaults to 60.
	CheckIntervalSeconds *int `json:"checkIntervalSeconds"`

	// CheckFailedTimes defines the max number of failed checks before the traffic analysis is terminated
	// If set "checkFailedTimes: 2". It means Kurator will rollback when check failed 2 times.
	// +kubebuilder:validation:Minimum=0
	CheckFailedTimes *int `json:"checkFailedTimes"`

	// Metric check list for this traffic analysis
	// Flagger comes with two builtin metric checks: HTTP request success rate and duration.
	// Can use either built-in metric checks or custom checks.
	// If you want use custom checks, you can refer to https://docs.flagger.app/usage/metrics#custom-metrics.
	// +optional
	Metrics []Metric `json:"metrics,omitempty"`

	// Webhook list for this traffic analysis
	// +optional
	Webhooks Webhook `json:"webhooks,omitempty"`

	// SessionAffinity represents the session affinity settings for a analysis run.
	// +optional
	SessionAffinity *SessionAffinity `json:"sessionAffinity,omitempty"`
}

func (*TrafficAnalysis) DeepCopy added in v0.6.0

func (in *TrafficAnalysis) DeepCopy() *TrafficAnalysis

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

func (*TrafficAnalysis) DeepCopyInto added in v0.6.0

func (in *TrafficAnalysis) DeepCopyInto(out *TrafficAnalysis)

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

type TrafficRoutingConfig added in v0.6.0

type TrafficRoutingConfig struct {
	// TimeoutSeconds of the HTTP or gRPC request.
	// +optional
	TimeoutSeconds int `json:"timeoutSeconds,omitempty"`

	// Gateways attached to the generated Istio virtual service.
	// Defaults to the internal mesh gateway.
	// +optional
	Gateways []string `json:"gateways,omitempty"`

	// Defaults to the RolloutConfig.ServiceName
	// +optional
	Hosts []string `json:"hosts,omitempty"`

	// Retries describes the retry policy to use when a HTTP request fails.
	// For example, the following rule sets the maximum number of retries to three,
	// with a 2s timeout per retry attempt.
	// e.g.:
	//
	// “`yaml
	// retries:
	//   attempts: 3
	//   perTryTimeout: 2s
	//   retryOn: gateway-error,connect-failure,refused-stream
	// “`
	//
	// +optional
	Retries *istiov1alpha3.HTTPRetry `json:"retries,omitempty"`

	// Headers operations for the Request.
	// e.g.
	//
	// “`yaml
	// headers:
	//   request:
	//     add:
	//       x-some-header: "value"
	// “`
	//
	// +optional
	Headers *istiov1alpha3.Headers `json:"headers,omitempty"`

	// Cross-Origin Resource Sharing policy for the request.
	// e.g.
	//
	// “`yaml
	// corsPolicy:
	//   allowHeaders:
	//   - x-some-header
	//   allowMethods:
	//   - GET
	//   allowOrigin:
	//   - example.com
	//   maxAge: 24h
	// “`
	//
	// +optional
	CorsPolicy *istiov1alpha3.CorsPolicy `json:"corsPolicy,omitempty"`

	// CanaryStrategy defines parameters for Canary Deployment.
	// Note: Kurator determines A/B Testing, Blue/Green Deployment, or Canary Deployment
	// based on the presence of content in the canaryStrategy field.
	// So can't configure canaryStrategy and analysisTimes at the same time.
	// +optional
	CanaryStrategy *CanaryConfig `json:"canaryStrategy,omitempty"`

	// AnalysisTimes defines the number of traffic analysis checks to run for A/B Testing and Blue/Green Deployment
	// If set "analysisTimes: 10". It means Kurator will checks the preview service ten times.
	// +kubebuilder:validation:Minimum=0
	// +optional
	AnalysisTimes int `json:"analysisTimes,omitempty"`

	// Match conditions of A/B Testing HTTP header.
	// The header keys must be lowercase and use hyphen as the separator.
	// values are case-sensitive and formatted as follows:
	// - `exact: "value"` for exact string match
	// - `prefix: "value"` for prefix-based match
	// - `regex: "value"` for ECMAscript style regex-based match
	// e.g.:
	//
	// “`yaml
	// match:
	//   - headers:
	//       myheader:
	//         regex: ".*XXXX.*"
	//   - headers:
	//       cookie:
	//         regex: "^(.*?;)?(type=insider)(;.*)?$"
	// “`
	//
	// Note: If you want to use A/B Testing, you need to configure analysisTimes and match.
	// If you only configure analysisTimes, it will trigger Blue/Green Deployment.
	// You can configure both canaryStrategy and match.
	// If configure both canaryStrategy and match, Traffic that meets match goes towards the preview service.
	// Traffic that doesn't meet the match will go to the primary service and preview service proportionally.
	// +optional
	Match []istiov1alpha3.HTTPMatchRequest `json:"match,omitempty"`
}

func (*TrafficRoutingConfig) DeepCopy added in v0.6.0

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

func (*TrafficRoutingConfig) DeepCopyInto added in v0.6.0

func (in *TrafficRoutingConfig) DeepCopyInto(out *TrafficRoutingConfig)

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

type Webhook added in v0.6.0

type Webhook struct {
	// TimeoutSeconds defines request timeout for this webhook
	// Defaults to 60
	TimeoutSeconds *int `json:"timeoutSeconds,omitempty"`

	// Commands define to commends that executed by webhook.
	// +optional
	Commands []string `json:"command,omitempty"`
}

Kurator generates traffic load by invoking the testloader through a webhook to request the service. e.g.

```yaml webhooks:

```

The above example means that during trafficAnalysis, the cmd of "http://flagger-loadtester.test/" is invoked to execute the command "hey -z 1m -q 10 -c 2 http://podinfo-canary.test:9898/"

func (*Webhook) DeepCopy added in v0.6.0

func (in *Webhook) DeepCopy() *Webhook

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

func (*Webhook) DeepCopyInto added in v0.6.0

func (in *Webhook) DeepCopyInto(out *Webhook)

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