Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +groupName=duck.cloud.google.com
Index ¶
- Constants
- Variables
- func DefaultGoogleCloudSecretSelector() *corev1.SecretKeySelector
- func GroupResource(resource string) schema.GroupResource
- func Kind(kind string) schema.GroupKind
- func SetAutoscalingAnnotationsDefaults(ctx context.Context, obj *metav1.ObjectMeta)
- func ValidateAutoscalingAnnotations(ctx context.Context, annotations map[string]string, errs *apis.FieldError) *apis.FieldError
- type PubSub
- type PubSubList
- type PubSubSpec
- type PubSubStatus
- func (in *PubSubStatus) DeepCopy() *PubSubStatus
- func (in *PubSubStatus) DeepCopyInto(out *PubSubStatus)
- func (ss *PubSubStatus) IsReady() bool
- func (s *PubSubStatus) MarkPullSubscriptionFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
- func (s *PubSubStatus) MarkPullSubscriptionNotConfigured(cs *apis.ConditionSet)
- func (s *PubSubStatus) MarkPullSubscriptionReady(cs *apis.ConditionSet)
- func (s *PubSubStatus) MarkPullSubscriptionUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
- func (s *PubSubStatus) MarkTopicFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
- func (s *PubSubStatus) MarkTopicNotConfigured(cs *apis.ConditionSet)
- func (s *PubSubStatus) MarkTopicReady(cs *apis.ConditionSet)
- func (s *PubSubStatus) MarkTopicUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
- type Resource
- type ResourceList
Constants ¶
const ( // Autoscaling refers to the autoscaling group. Autoscaling = "autoscaling.knative.dev" // AutoscalingClassAnnotation is the annotation for the explicit class of // scaler that a particular resource has opted into. AutoscalingClassAnnotation = Autoscaling + "/class" // AutoscalingMinScaleAnnotation is the annotation to specify the minimum number of pods to scale to. AutoscalingMinScaleAnnotation = Autoscaling + "/minScale" // AutoscalingMaxScaleAnnotation is the annotation to specify the maximum number of pods to scale to. AutoscalingMaxScaleAnnotation = Autoscaling + "/maxScale" // KEDA is Keda autoscaler. KEDA = "keda.autoscaling.knative.dev" // KedaAutoscalingPollingIntervalAnnotation is the annotation that refers to the interval in seconds Keda // uses to poll metrics in order to inform its scaling decisions. KedaAutoscalingPollingIntervalAnnotation = KEDA + "/pollingInterval" // KedaAutoscalingCooldownPeriodAnnotation is the annotation that refers to the period Keda waits until it // scales a Deployment down. KedaAutoscalingCooldownPeriodAnnotation = KEDA + "/cooldownPeriod" // KedaAutoscalingSubscriptionSizeAnnotation is the annotation that refers to the size of unacked messages in a // Pub/Sub subscription that Keda uses in order to decide when and by how much to scale out. KedaAutoscalingSubscriptionSizeAnnotation = KEDA + "/subscriptionSize" )
const ( // TopicReady has status True when the PubSub Topic is ready. TopicReady apis.ConditionType = "TopicReady" // PullSubscriptionReay has status True when the PullSubscription is ready. PullSubscriptionReady apis.ConditionType = "PullSubscriptionReady" )
const (
DefaultSecretName = "google-cloud-key"
)
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: duck.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func DefaultGoogleCloudSecretSelector ¶ added in v0.10.0
func DefaultGoogleCloudSecretSelector() *corev1.SecretKeySelector
DefaultGoogleCloudSecretSelector is the default secret selector used to load the creds for the objects that will auth with Google Cloud.
func GroupResource ¶ added in v0.13.0
func GroupResource(resource string) schema.GroupResource
GroupResource takes an unqualified resource and returns a Group qualified GroupResource
func SetAutoscalingAnnotationsDefaults ¶ added in v0.13.0
func SetAutoscalingAnnotationsDefaults(ctx context.Context, obj *metav1.ObjectMeta)
func ValidateAutoscalingAnnotations ¶ added in v0.13.0
func ValidateAutoscalingAnnotations(ctx context.Context, annotations map[string]string, errs *apis.FieldError) *apis.FieldError
ValidateAutoscalingAnnotations validates the autoscaling annotations. The class ensures that we reconcile using the corresponding controller.
Types ¶
type PubSub ¶
type PubSub struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PubSubSpec `json:"spec"` Status PubSubStatus `json:"status"` }
PubSub is a shared type that GCP sources which create a Topic / PullSubscription will use. This duck type is intended to allow implementors of GCP sources which use PubSub for their transport.
func (*PubSub) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PubSub.
func (*PubSub) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PubSub) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PubSub) GetFullType ¶
func (*PubSub) GetFullType() duck.Populatable
GetFullType implements duck.Implementable
func (*PubSub) GetListType ¶
GetListType implements apis.Listable
type PubSubList ¶
type PubSubList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []PubSub `json:"items"` }
PubSubList is a list of PubSub resources
func (*PubSubList) DeepCopy ¶
func (in *PubSubList) DeepCopy() *PubSubList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PubSubList.
func (*PubSubList) DeepCopyInto ¶
func (in *PubSubList) DeepCopyInto(out *PubSubList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PubSubList) DeepCopyObject ¶
func (in *PubSubList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PubSubSpec ¶
type PubSubSpec struct { // This brings in CloudEventOverrides and Sink. duckv1.SourceSpec `json:",inline"` // Secret is the credential to use to poll from a Cloud Pub/Sub subscription. // If not specified, defaults to: // Name: google-cloud-key // Key: key.json // +optional Secret *corev1.SecretKeySelector `json:"secret,omitempty"` // Project is the ID of the Google Cloud Project that the PubSub Topic exists in. // If omitted, defaults to same as the cluster. // +optional Project string `json:"project,omitempty"` }
func (*PubSubSpec) DeepCopy ¶
func (in *PubSubSpec) DeepCopy() *PubSubSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PubSubSpec.
func (*PubSubSpec) DeepCopyInto ¶
func (in *PubSubSpec) DeepCopyInto(out *PubSubSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PubSubSpec) SetPubSubDefaults ¶ added in v0.12.0
func (s *PubSubSpec) SetPubSubDefaults()
type PubSubStatus ¶
type PubSubStatus struct { // This brings in duck/v1beta1 Status as well as SinkURI duckv1.SourceStatus // ProjectID is the project ID of the Topic, might have been resolved. // +optional ProjectID string `json:"projectId,omitempty"` // TopicID where the notifications are sent to. // +optional TopicID string `json:"topicId,omitempty"` // SubscriptionID is the created subscription ID. // +optional SubscriptionID string `json:"subscriptionId,omitempty"` }
PubSubStatus shows how we expect folks to embed Addressable in their Status field.
func (*PubSubStatus) DeepCopy ¶
func (in *PubSubStatus) DeepCopy() *PubSubStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PubSubStatus.
func (*PubSubStatus) DeepCopyInto ¶
func (in *PubSubStatus) DeepCopyInto(out *PubSubStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PubSubStatus) IsReady ¶
func (ss *PubSubStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*PubSubStatus) MarkPullSubscriptionFailed ¶ added in v0.12.0
func (s *PubSubStatus) MarkPullSubscriptionFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
MarkPullSubscriptionFailed sets the condition that the PubSub PullSubscription is False and why.
func (*PubSubStatus) MarkPullSubscriptionNotConfigured ¶ added in v0.12.0
func (s *PubSubStatus) MarkPullSubscriptionNotConfigured(cs *apis.ConditionSet)
MarkPullSubscriptionNotConfigured changes the PullSubscriptionReady condition to be unknown to reflect that the PullSubscription does not yet have a Status.
func (*PubSubStatus) MarkPullSubscriptionReady ¶
func (s *PubSubStatus) MarkPullSubscriptionReady(cs *apis.ConditionSet)
MarkPullSubscriptionReady sets the condition that the PubSub PullSubscription is ready.
func (*PubSubStatus) MarkPullSubscriptionUnknown ¶ added in v0.12.0
func (s *PubSubStatus) MarkPullSubscriptionUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
MarkPullSubscriptionUnknown sets the condition that the PubSub PullSubscription is Unknown.
func (*PubSubStatus) MarkTopicFailed ¶ added in v0.12.0
func (s *PubSubStatus) MarkTopicFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
MarkTopicFailed sets the condition that the PubSub Topic is False and why.
func (*PubSubStatus) MarkTopicNotConfigured ¶ added in v0.12.0
func (s *PubSubStatus) MarkTopicNotConfigured(cs *apis.ConditionSet)
MarkTopicNotConfigured changes the TopicReady condition to be unknown to reflect that the Topic does not yet have a Status.
func (*PubSubStatus) MarkTopicReady ¶
func (s *PubSubStatus) MarkTopicReady(cs *apis.ConditionSet)
MarkTopicReady sets the condition that the PubSub Topic is ready.
func (*PubSubStatus) MarkTopicUnknown ¶ added in v0.12.0
func (s *PubSubStatus) MarkTopicUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})
MarkTopicUnknown sets the condition that the PubSub Topic is Unknown and why.
type Resource ¶
type Resource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` }
Resource is a skeleton type wrapping all Kubernetes resources. It is typically used to watch arbitrary other resources. This is not a real resource. TODO upstream to pkg
func (*Resource) DeepCopy ¶ added in v0.13.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶ added in v0.13.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Resource) DeepCopyObject ¶ added in v0.13.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Resource) GetFullType ¶ added in v0.13.0
func (*Resource) GetFullType() duck.Populatable
GetFullType implements duck.Implementable
func (*Resource) GetListType ¶ added in v0.13.0
GetListType implements apis.Listable
type ResourceList ¶ added in v0.13.0
type ResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Resource `json:"items"` }
ResourceList is a list of Resource resources
func (*ResourceList) DeepCopy ¶ added in v0.13.0
func (in *ResourceList) DeepCopy() *ResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.
func (*ResourceList) DeepCopyInto ¶ added in v0.13.0
func (in *ResourceList) DeepCopyInto(out *ResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceList) DeepCopyObject ¶ added in v0.13.0
func (in *ResourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.