Documentation
¶
Overview ¶
Package v1alpha1 defines internal types in internal.events.cloud.google.com/v1alpha1 for use by other resources. +k8s:deepcopy-gen=package +groupName=internal.events.cloud.google.com
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type BrokerCell
- func (in *BrokerCell) DeepCopy() *BrokerCell
- func (in *BrokerCell) DeepCopyInto(out *BrokerCell)
- func (in *BrokerCell) DeepCopyObject() runtime.Object
- func (*BrokerCell) GetConditionSet() apis.ConditionSet
- func (bc *BrokerCell) GetGroupVersionKind() schema.GroupVersionKind
- func (bc *BrokerCell) GetStatus() *duckv1.Status
- func (bc *BrokerCell) GetUntypedSpec() interface{}
- func (bc *BrokerCell) SetDefaults(ctx context.Context)
- func (bc *BrokerCell) Validate(ctx context.Context) *apis.FieldError
- type BrokerCellList
- type BrokerCellSpec
- type BrokerCellStatus
- func (in *BrokerCellStatus) DeepCopy() *BrokerCellStatus
- func (in *BrokerCellStatus) DeepCopyInto(out *BrokerCellStatus)
- func (bs *BrokerCellStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (bs *BrokerCellStatus) GetTopLevelCondition() *apis.Condition
- func (bs *BrokerCellStatus) InitializeConditions()
- func (bs *BrokerCellStatus) IsReady() bool
- func (bs *BrokerCellStatus) MarkFanoutFailed(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkFanoutUnknown(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkIngressFailed(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkIngressUnknown(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkRetryFailed(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkRetryUnknown(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkTargetsConfigFailed(reason, format string, args ...interface{})
- func (bs *BrokerCellStatus) MarkTargetsConfigReady()
- func (bs *BrokerCellStatus) PropagateFanoutAvailability(d *appsv1.Deployment) bool
- func (bs *BrokerCellStatus) PropagateIngressAvailability(ep *corev1.Endpoints, ind *appsv1.Deployment) bool
- func (bs *BrokerCellStatus) PropagateRetryAvailability(d *appsv1.Deployment) bool
- func (bs *BrokerCellStatus) SetIngressTemplate(address string)
- type ComponentParameters
- func (in *ComponentParameters) DeepCopy() *ComponentParameters
- func (in *ComponentParameters) DeepCopyInto(out *ComponentParameters)
- func (componentParams *ComponentParameters) ValidateAutoscalingSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
- func (componentParams *ComponentParameters) ValidateQuantityFormats(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
- func (componentParams *ComponentParameters) ValidateResourceRequirementSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
- func (componentParams *ComponentParameters) ValidateResourceSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
- type ComponentsParametersSpec
- type ResourceSpecification
- type SystemResource
Constants ¶
const ( // BrokerCellConditionReady has status true when all subconditions below // have been set to True. BrokerCellConditionReady apis.ConditionType = apis.ConditionReady // BrokerCellConditionIngress reports the availability of the // BrokerCell's ingress service. BrokerCellConditionIngress apis.ConditionType = "IngressReady" // BrokerCellConditionFanout reports the readiness of the BrokerCell's // fanout service. BrokerCellConditionFanout apis.ConditionType = "FanoutReady" // BrokerCellConditionRetry reports the readiness of the BrokerCell's retry // service. BrokerCellConditionRetry apis.ConditionType = "RetryReady" // BrokerCellConditionTargetsConfig reports the readiness of the // BrokerCell's targets configmap. BrokerCellConditionTargetsConfig apis.ConditionType = "TargetsConfigReady" )
const ( // Annotations to tell if the brokercell is created automatically by the GCP broker controller. CreatorKey = "internal.events.cloud.google.com/creator" Creator = "googlecloud" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: intevents.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
var TestHelper = testHelper{}
TestHelper contains helpers for unit tests.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type BrokerCell ¶
type BrokerCell struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired state of the BrokerCell.
Spec BrokerCellSpec `json:"spec,omitempty"`
// Status represents the current state of the BrokerCell. This data may be out of
// date.
// +optional
Status BrokerCellStatus `json:"status,omitempty"`
}
BrokerCell manages the set of data plane components servicing one or more Broker objects and their associated Triggers.
func (*BrokerCell) DeepCopy ¶
func (in *BrokerCell) DeepCopy() *BrokerCell
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerCell.
func (*BrokerCell) DeepCopyInto ¶
func (in *BrokerCell) DeepCopyInto(out *BrokerCell)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerCell) DeepCopyObject ¶
func (in *BrokerCell) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BrokerCell) GetConditionSet ¶ added in v0.16.0
func (*BrokerCell) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*BrokerCell) GetGroupVersionKind ¶
func (bc *BrokerCell) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns GroupVersionKind for Brokers
func (*BrokerCell) GetStatus ¶ added in v0.16.0
func (bc *BrokerCell) GetStatus() *duckv1.Status
GetStatus retrieves the status of the BrokerCell. Implements the KRShaped interface.
func (*BrokerCell) GetUntypedSpec ¶
func (bc *BrokerCell) GetUntypedSpec() interface{}
GetUntypedSpec returns the spec of the BrokerCell.
func (*BrokerCell) SetDefaults ¶
func (bc *BrokerCell) SetDefaults(ctx context.Context)
SetDefaults sets the default field values for a BrokerCell.
func (*BrokerCell) Validate ¶
func (bc *BrokerCell) Validate(ctx context.Context) *apis.FieldError
Validate verifies that the BrokerCell is valid.
type BrokerCellList ¶
type BrokerCellList struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ListMeta `json:"metadata,omitempty"`
Items []BrokerCell `json:"items"`
}
BrokerCellList is a collection of BrokerCells.
func (*BrokerCellList) DeepCopy ¶
func (in *BrokerCellList) DeepCopy() *BrokerCellList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerCellList.
func (*BrokerCellList) DeepCopyInto ¶
func (in *BrokerCellList) DeepCopyInto(out *BrokerCellList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerCellList) DeepCopyObject ¶
func (in *BrokerCellList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BrokerCellSpec ¶
type BrokerCellSpec struct {
// Components specifies parameters of each component (fanout, ingress,
// retry) of a BrokerCell.
Components ComponentsParametersSpec `json:"components,omitempty"`
}
BrokerCellSpec defines the desired state of a Brokercell.
func (*BrokerCellSpec) DeepCopy ¶
func (in *BrokerCellSpec) DeepCopy() *BrokerCellSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerCellSpec.
func (*BrokerCellSpec) DeepCopyInto ¶
func (in *BrokerCellSpec) DeepCopyInto(out *BrokerCellSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerCellSpec) SetDefaults ¶ added in v0.17.0
func (bcs *BrokerCellSpec) SetDefaults(ctx context.Context)
SetDefaults sets the default field values for a BrokerCellSpec.
func (*BrokerCellSpec) Validate ¶ added in v0.17.0
func (bcs *BrokerCellSpec) Validate(ctx context.Context) *apis.FieldError
type BrokerCellStatus ¶
type BrokerCellStatus struct {
// inherits duck/v1 Status, which currently provides:
// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
// * Conditions - the latest available observations of a resource's current state.
duckv1.Status `json:",inline"`
// IngressTemplate contains a URI template as specified by RFC6570 to
// generate Broker ingress URIs. It may contain variables `name` and
// `namespace`.
// Example: "http://broker-ingress.cloud-run-events.svc.cluster.local/{namespace}/{name}"
IngressTemplate string `json:"ingressTemplate,omitempty"`
}
BrokerCellStatus represents the current state of a BrokerCell.
func (*BrokerCellStatus) DeepCopy ¶
func (in *BrokerCellStatus) DeepCopy() *BrokerCellStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerCellStatus.
func (*BrokerCellStatus) DeepCopyInto ¶
func (in *BrokerCellStatus) DeepCopyInto(out *BrokerCellStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BrokerCellStatus) GetCondition ¶
func (bs *BrokerCellStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*BrokerCellStatus) GetTopLevelCondition ¶
func (bs *BrokerCellStatus) GetTopLevelCondition() *apis.Condition
GetTopLevelCondition returns the top level Condition.
func (*BrokerCellStatus) InitializeConditions ¶
func (bs *BrokerCellStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*BrokerCellStatus) IsReady ¶
func (bs *BrokerCellStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*BrokerCellStatus) MarkFanoutFailed ¶
func (bs *BrokerCellStatus) MarkFanoutFailed(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkFanoutUnknown ¶ added in v0.16.0
func (bs *BrokerCellStatus) MarkFanoutUnknown(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkIngressFailed ¶
func (bs *BrokerCellStatus) MarkIngressFailed(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkIngressUnknown ¶ added in v0.20.0
func (bs *BrokerCellStatus) MarkIngressUnknown(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkRetryFailed ¶
func (bs *BrokerCellStatus) MarkRetryFailed(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkRetryUnknown ¶ added in v0.16.0
func (bs *BrokerCellStatus) MarkRetryUnknown(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkTargetsConfigFailed ¶
func (bs *BrokerCellStatus) MarkTargetsConfigFailed(reason, format string, args ...interface{})
func (*BrokerCellStatus) MarkTargetsConfigReady ¶
func (bs *BrokerCellStatus) MarkTargetsConfigReady()
func (*BrokerCellStatus) PropagateFanoutAvailability ¶
func (bs *BrokerCellStatus) PropagateFanoutAvailability(d *appsv1.Deployment) bool
PropagateFanoutAvailability uses the availability of the provided Deployment to determine if BrokerCellConditionFanout should be marked as true or false. For authentication check purpose, this method will return false if a false condition is caused by deployment's replicaset unavailable. ReplicaSet unavailable is a sign for potential authentication problems.
func (*BrokerCellStatus) PropagateIngressAvailability ¶
func (bs *BrokerCellStatus) PropagateIngressAvailability(ep *corev1.Endpoints, ind *appsv1.Deployment) bool
PropagateIngressAvailability uses the availability of the provided Endpoints to determine if BrokerCellConditionIngress should be marked as true or false. For authentication check purpose, this method will return false if a false condition is caused by deployment's replicaset unavailable. ReplicaSet unavailable is a sign for potential authentication problems.
func (*BrokerCellStatus) PropagateRetryAvailability ¶
func (bs *BrokerCellStatus) PropagateRetryAvailability(d *appsv1.Deployment) bool
PropagateRetryAvailability uses the availability of the provided Deployment to determine if BrokerCellConditionRetry should be marked as true or unknown. For authentication check purpose, this method will return true if a false condition is caused by deployment's replicaset unavailable. ReplicaSet unavailable is a sign for potential authentication problems.
func (*BrokerCellStatus) SetIngressTemplate ¶
func (bs *BrokerCellStatus) SetIngressTemplate(address string)
type ComponentParameters ¶ added in v0.17.0
type ComponentParameters struct {
// AvgCPUUtilization specifies the average CPU consumption targeted by the component's Horizontal Pod Autoscaler
AvgCPUUtilization *int32 `json:"avgCPUUtilization,omitempty"`
// AvgMemoryUsage specifies the average memory consumption targeted by the component's Horizontal Pod Autoscaler
AvgMemoryUsage *string `json:"avgMemoryUsage,omitempty"`
// CPURequest specifies the minimal amount of the CPU for the deployment to be schedulable
CPURequest string `json:"cpuRequest,omitempty"`
// CPULimit specifies the maximal amount of the CPU to be consumable by the deployment
CPULimit string `json:"cpuLimit,omitempty"`
// MemoryRequest specifies the minimal amount of the CPU for the deployment to be schedulable
MemoryRequest string `json:"memoryRequest,omitempty"`
// MemoryLimit specifies the maximal amount of memory to be consumable by the deployment
MemoryLimit string `json:"memoryLimit,omitempty"`
// MinReplicas specifies the minimum replica count for the component.
MinReplicas *int32 `json:"minReplicas,omitempty"`
// MaxReplicas specifies the maximum replica count for the component.
MaxReplicas *int32 `json:"maxReplicas,omitempty"`
}
ComponentParameters specifies scaling and resource parameters to be used by a single component of a BrokerCell.
func (*ComponentParameters) DeepCopy ¶ added in v0.17.0
func (in *ComponentParameters) DeepCopy() *ComponentParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameters.
func (*ComponentParameters) DeepCopyInto ¶ added in v0.17.0
func (in *ComponentParameters) DeepCopyInto(out *ComponentParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentParameters) ValidateAutoscalingSpecification ¶ added in v0.17.0
func (componentParams *ComponentParameters) ValidateAutoscalingSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
func (*ComponentParameters) ValidateQuantityFormats ¶ added in v0.17.0
func (componentParams *ComponentParameters) ValidateQuantityFormats(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
func (*ComponentParameters) ValidateResourceRequirementSpecification ¶ added in v0.17.0
func (componentParams *ComponentParameters) ValidateResourceRequirementSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
func (*ComponentParameters) ValidateResourceSpecification ¶ added in v0.18.0
func (componentParams *ComponentParameters) ValidateResourceSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError
type ComponentsParametersSpec ¶ added in v0.17.0
type ComponentsParametersSpec struct {
Fanout *ComponentParameters `json:"fanout,omitempty"`
Ingress *ComponentParameters `json:"ingress,omitempty"`
Retry *ComponentParameters `json:"retry,omitempty"`
}
ComponentsParametersSpec specifies separate parameters for each component of a BrokerCell.
func (*ComponentsParametersSpec) DeepCopy ¶ added in v0.17.0
func (in *ComponentsParametersSpec) DeepCopy() *ComponentsParametersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentsParametersSpec.
func (*ComponentsParametersSpec) DeepCopyInto ¶ added in v0.17.0
func (in *ComponentsParametersSpec) DeepCopyInto(out *ComponentsParametersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpecification ¶ added in v0.17.0
type ResourceSpecification struct {
// Request specifies the minimal amount of the resource for the deployment to be schedulable
Requests SystemResource `json:"requests,omitempty"`
// Limit specifies the maximal amount of the resource that the deployment is allowed to consume
Limits SystemResource `json:"limits,omitempty"`
}
ResourceSpecification defines requests and limits for the system resources
func (*ResourceSpecification) DeepCopy ¶ added in v0.17.0
func (in *ResourceSpecification) DeepCopy() *ResourceSpecification
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpecification.
func (*ResourceSpecification) DeepCopyInto ¶ added in v0.17.0
func (in *ResourceSpecification) DeepCopyInto(out *ResourceSpecification)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemResource ¶ added in v0.17.0
type SystemResource struct {
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
}
SystemResource specifies quantities for resources such as CPU and memory
func (*SystemResource) DeepCopy ¶ added in v0.17.0
func (in *SystemResource) DeepCopy() *SystemResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemResource.
func (*SystemResource) DeepCopyInto ¶ added in v0.17.0
func (in *SystemResource) DeepCopyInto(out *SystemResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.