Documentation ¶
Overview ¶
Package v1alpha1 contains the Delivery v1alpha1 API types.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Policy
- func (in *Policy) DeepCopy() *Policy
- func (in *Policy) DeepCopyInto(out *Policy)
- func (in *Policy) DeepCopyObject() runtime.Object
- func (*Policy) GetConditionSet() apis.ConditionSet
- func (p *Policy) GetGroupVersionKind() schema.GroupVersionKind
- func (t *Policy) GetStatus() *duckv1.Status
- func (p *Policy) SetDefaults(ctx context.Context)
- func (p *Policy) Validate(ctx context.Context) *apis.FieldError
- type PolicyList
- type PolicySpec
- type PolicyState
- func (in *PolicyState) DeepCopy() *PolicyState
- func (in *PolicyState) DeepCopyInto(out *PolicyState)
- func (in *PolicyState) DeepCopyObject() runtime.Object
- func (*PolicyState) GetConditionSet() apis.ConditionSet
- func (ps *PolicyState) GetGroupVersionKind() schema.GroupVersionKind
- func (t *PolicyState) GetStatus() *duckv1.Status
- type PolicyStateList
- type PolicyStateSpec
- type PolicyStateStatus
- type PolicyStateStatusFields
- type PolicyStatus
- type PolicyStatusFields
- type Stage
Constants ¶
const ( // PolicyStateConditionRouteConfigured is set to false if any failure prevents // PolicyState.Spec from being written to Route.Spec PolicyStateConditionRouteConfigured apis.ConditionType = "RouteConfigured" )
Variables ¶
var ( // SchemeBuilder registers the addKnownTypes function. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: delivery.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type Policy ¶
type Policy struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds info about the desired traffic behavior // +optional Spec PolicySpec `json:"spec,omitempty"` // Status holds info about the current traffic behavior // +optional Status PolicyStatus `json:"status,omitempty"` }
Policy is used to specify traffic behavior during progressive rollout reconciler will use Policy to compute the routing states
func (*Policy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Policy) GetConditionSet ¶
func (*Policy) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Policy) GetGroupVersionKind ¶
func (p *Policy) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Policy) GetStatus ¶
GetStatus retrieves the status of the Policy. Implements the KRShaped interface.
func (*Policy) SetDefaults ¶
SetDefaults implements apis.Defaultable
type PolicyList ¶
type PolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Policy `json:"items"` }
PolicyList is a list of Policy resources
func (*PolicyList) DeepCopy ¶
func (in *PolicyList) DeepCopy() *PolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.
func (*PolicyList) DeepCopyInto ¶
func (in *PolicyList) DeepCopyInto(out *PolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyList) DeepCopyObject ¶
func (in *PolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolicySpec ¶
type PolicySpec struct { // Mode specifies the metric that the policy is based on // Possible values are: "time", "request", "error" Mode string `json:"mode"` // DefaultThreshold is the threshold value that is used when a rollout stage doesn't specify // a threshold of its own; this can be useful when the threshold is a constant value across // all rollout stages, in which case there is no need to copy paste the same value in all entries // The interpretation of DefaultThreshold depends on the value of Mode DefaultThreshold int `json:"defaultThreshold"` // Stages specifies the traffic percentages that the NEW Revision is expected to have // at successive rollout stages; the list of integers must start at 0 // all entries must be in the range [0, 100), and must be sorted in increasing order // Technically the final rollout percentage is 100, but this is implicitly understood, // and should NOT be explicitly specified in Stages // In addition to the traffic percentages, each stage can OPTIONALLY specify its own threshold // this gives greater flexibility to policy design // The threshold value for stage N is the value that must be achieved BEFORE moving to stage N+1 Stages []Stage `json:"stages,omitempty"` }
PolicySpec holds info about the desired traffic behavior These fields are exactly the same as those defined in pkg/reconciler/delivery/policy.go
func (*PolicySpec) DeepCopy ¶
func (in *PolicySpec) DeepCopy() *PolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicySpec.
func (*PolicySpec) DeepCopyInto ¶
func (in *PolicySpec) DeepCopyInto(out *PolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyState ¶
type PolicyState struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds info about what the routing state SHOULD be // +optional Spec PolicyStateSpec `json:"spec,omitempty"` // Status holds info about what routing state has been written by the webhook // +optional Status PolicyStateStatus `json:"status,omitempty"` }
PolicyState is used by KCD controller to communicate routing information to the mutating webhook in order to sideline the Service reconciler
func (*PolicyState) DeepCopy ¶
func (in *PolicyState) DeepCopy() *PolicyState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyState.
func (*PolicyState) DeepCopyInto ¶
func (in *PolicyState) DeepCopyInto(out *PolicyState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyState) DeepCopyObject ¶
func (in *PolicyState) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PolicyState) GetConditionSet ¶
func (*PolicyState) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*PolicyState) GetGroupVersionKind ¶
func (ps *PolicyState) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*PolicyState) GetStatus ¶
func (t *PolicyState) GetStatus() *duckv1.Status
GetStatus retrieves the status of the PolicyState. Implements the KRShaped interface.
type PolicyStateList ¶
type PolicyStateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []PolicyState `json:"items"` }
PolicyStateList is a list of PolicyState resources
func (*PolicyStateList) DeepCopy ¶
func (in *PolicyStateList) DeepCopy() *PolicyStateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStateList.
func (*PolicyStateList) DeepCopyInto ¶
func (in *PolicyStateList) DeepCopyInto(out *PolicyStateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyStateList) DeepCopyObject ¶
func (in *PolicyStateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolicyStateSpec ¶
type PolicyStateSpec struct { // Traffic specifies how to distribute traffic over a collection of // revisions and configurations. Traffic []v1.TrafficTarget `json:"traffic,omitempty"` }
PolicyStateSpec holds the desired routing spec computed by reconciler Should be set by reconciler, and set by webhook to write Route appropriately
func (*PolicyStateSpec) DeepCopy ¶
func (in *PolicyStateSpec) DeepCopy() *PolicyStateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStateSpec.
func (*PolicyStateSpec) DeepCopyInto ¶
func (in *PolicyStateSpec) DeepCopyInto(out *PolicyStateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyStateStatus ¶
type PolicyStateStatus struct { duckv1.Status `json:",inline"` PolicyStateStatusFields `json:",inline"` }
PolicyStateStatus communicates the observed state of the PolicyState Should be set by the webhook
func (*PolicyStateStatus) DeepCopy ¶
func (in *PolicyStateStatus) DeepCopy() *PolicyStateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStateStatus.
func (*PolicyStateStatus) DeepCopyInto ¶
func (in *PolicyStateStatus) DeepCopyInto(out *PolicyStateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyStateStatus) InitializeConditions ¶
func (pss *PolicyStateStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*PolicyStateStatus) IsReady ¶
func (pss *PolicyStateStatus) IsReady() bool
IsReady returns if the route is ready to serve the requested configuration.
func (*PolicyStateStatus) MarkRouteNotConfigured ¶
func (pss *PolicyStateStatus) MarkRouteNotConfigured(name string)
MarkRouteNotConfigured sets the condition value to false
type PolicyStateStatusFields ¶
type PolicyStateStatusFields struct { // NextUpdateTimestamp specifies the next time when this PolicyState spec should be updated // it is used in conjunction with EnqueueAfter to help reconciler enforce time-based policies // it also helps prevent unexpected rollout behavior when controller restarts, etc. // optional because when a rollout is completed there is no more future updates to be done NextUpdateTimestamp *metav1.Time `json:"nextUpdateTimestamp,omitempty"` // Traffic describes the current routing spec that the webhook has enforced // If this doesn't agree with Spec.Traffic, then the webhook SetDefaults must set them to agree with each other Traffic []v1.TrafficTarget `json:"traffic,omitempty"` }
PolicyStateStatusFields holds the fields of PolicyState's status that are not generally shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.
func (*PolicyStateStatusFields) DeepCopy ¶
func (in *PolicyStateStatusFields) DeepCopy() *PolicyStateStatusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStateStatusFields.
func (*PolicyStateStatusFields) DeepCopyInto ¶
func (in *PolicyStateStatusFields) DeepCopyInto(out *PolicyStateStatusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyStatus ¶
type PolicyStatus struct { duckv1.Status `json:",inline"` PolicyStatusFields `json:",inline"` }
PolicyStatus holds info about the current traffic behavior
func (*PolicyStatus) DeepCopy ¶
func (in *PolicyStatus) DeepCopy() *PolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStatus.
func (*PolicyStatus) DeepCopyInto ¶
func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyStatus) InitializeConditions ¶
func (ps *PolicyStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*PolicyStatus) IsReady ¶
func (ps *PolicyStatus) IsReady() bool
IsReady returns if the route is ready to serve the requested configuration.
type PolicyStatusFields ¶
type PolicyStatusFields struct{}
PolicyStatusFields is the fields in PolicyStatus This is empty for now because nothing is needed here
func (*PolicyStatusFields) DeepCopy ¶
func (in *PolicyStatusFields) DeepCopy() *PolicyStatusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStatusFields.
func (*PolicyStatusFields) DeepCopyInto ¶
func (in *PolicyStatusFields) DeepCopyInto(out *PolicyStatusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Stage ¶
type Stage struct { // Percent is the percentage of traffic that should go to the new Revision at this stage Percent int `json:"percent"` // Threshold tells the condition for progressing to the next rollout stage // This field is optional; if not specified, then the threshold value defaults to PolicySpec.DefaultThreshold Threshold *int `json:"threshold,omitempty"` }
Stage specifies a single rollout stage